ComputationalRadiationPhysics / picongpu

Performance-Portable Particle-in-Cell Simulations for the Exascale Era :sparkles:
https://picongpu.readthedocs.io
Other
705 stars 218 forks source link

Refactor PICMI species constand dependency retrieval #5139

Open BrianMarre opened 1 month ago

BrianMarre commented 1 month ago

In the review of PR #5007, here chillenzer identified the constant dependency retrieval functions as overly long and suggested to replace them with something along the lines of

from functools import reduce
return reduce(set.union, (model.get_constant_dependencies() for model in self.ionization_model_list), set())

_Originally posted by @chillenzer in https://github.com/ComputationalRadiationPhysics/picongpu/pull/5007#discussion_r1709314530_