Skip to content

Commit

Permalink
Because of the multiple inheritance, the init methods must be explici…
Browse files Browse the repository at this point in the history
…tly defined
  • Loading branch information
dpgrote committed Dec 12, 2024
1 parent 4e0e5fc commit b15246d
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Python/pywarpx/picmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,18 @@ class AnalyticFluxDistribution(
FluxDistributionBase,
DensityDistributionBase,
):
"""
Parameters
----------
warpx_inject_from_embedded_boundary: bool
When true, the flux is injected from the embedded boundaries instead
of a plane.
"""

def init(self, kw):
FluxDistributionBase.init(self, kw)

def initialize_flux_profile_func(self, species, density_scale, source_name):
species.add_new_group_attr(source_name, "flux_profile", "parse_flux_function")
if density_scale is not None:
Expand All @@ -781,6 +793,18 @@ class UniformFluxDistribution(
FluxDistributionBase,
DensityDistributionBase,
):
"""
Parameters
----------
warpx_inject_from_embedded_boundary: bool
When true, the flux is injected from the embedded boundaries instead
of a plane.
"""

def init(self, kw):
FluxDistributionBase.init(self, kw)

def initialize_flux_profile_func(self, species, density_scale, source_name):
species.add_new_group_attr(source_name, "flux_profile", "constant")
species.add_new_group_attr(source_name, "flux", self.flux)
Expand Down

0 comments on commit b15246d

Please sign in to comment.