-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bdc353f
commit 80f0fc8
Showing
23 changed files
with
802 additions
and
422 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from .interactioninterface import InteractionInterface | ||
from .interaction import Interaction | ||
from . import ionization | ||
|
||
__all__ = ["Interaction", "ionization"] | ||
__all__ = ["InteractionInterface", "Interaction", "ionization"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
lib/python/picongpu/picmi/interaction/interactioninterface.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
""" | ||
This file is part of PIConGPU. | ||
Copyright 2024 PIConGPU contributors | ||
Authors: Brian Edward Marre | ||
License: GPLv3+ | ||
""" | ||
|
||
from ... import pypicongpu | ||
|
||
import picmistandard | ||
import pydantic | ||
|
||
|
||
class InteractionInterface(pydantic.BaseModel): | ||
""" | ||
interface for forward declaration | ||
""" | ||
|
||
def get_interaction_constants( | ||
self, species: picmistandard.PICMI_Species | ||
) -> list[pypicongpu.species.constant.Constant]: | ||
"""get list of all constants required by interactions for the given species""" | ||
raise NotImplementedError("abstract interface for forward declaration only!") | ||
|
||
def fill_in_ionization_electron_species( | ||
self, pypicongpu_by_picmi_species: dict[picmistandard.PICMI_Species, pypicongpu.species.Species] | ||
): | ||
"""add ionization electron species to pypicongpu species' ionization model""" | ||
raise NotImplementedError("abstract interface for forward declaration only!") |
10 changes: 7 additions & 3 deletions
10
lib/python/picongpu/picmi/interaction/ionization/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
from .ionizationmodel import IonizationModel | ||
from . import ionizationcurrent | ||
from .groundstateionizationmodel import GroundStateIonizationModel | ||
from . import fieldionization | ||
from . import electroniccollisionalequilibrium | ||
|
||
__all__ = ["IonizationModel", "ionizationcurrent", "fieldionization", "electroniccollisionalequilibrium"] | ||
__all__ = [ | ||
"IonizationModel", | ||
"GroundStateIonizationModel", | ||
"fieldionization", | ||
"electroniccollisionalequilibrium", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
lib/python/picongpu/picmi/interaction/ionization/groundstateionizationmodel.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
""" | ||
This file is part of PIConGPU. | ||
Copyright 2024 PIConGPU contributors | ||
Authors: Brian Edward Marre | ||
License: GPLv3+ | ||
""" | ||
|
||
from .ionizationmodel import IonizationModel | ||
|
||
from .... import pypicongpu | ||
|
||
|
||
class GroundStateIonizationModel(IonizationModel): | ||
def get_constants(self) -> list[pypicongpu.species.constant.Constant]: | ||
"""get all PyPIConGPU constants required by a ground state ionization model in PIConGPU""" | ||
Z = self.ion_species.picongpu_element.get_atomic_number() | ||
assert self.ion_species.charge_state <= Z, f"charge_state must be <= atomic number ({Z})" | ||
|
||
element_properties_const = pypicongpu.species.constant.ElementProperties() | ||
element_properties_const.element = self.ion_species.picongpu_element | ||
return element_properties_const |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.