![]() |
Peano
|
Defines the meta data around one algorithmic step per particle. More...
Data Structures | |
class | Dependencies |
An algorithmic step for one particle can depend on different pre-conditions: More... | |
class | Effect |
What happens in this algorithmic step per particle: More... | |
class | PeanoEventUsedBySwift |
Enumeration of different Peano events during a grid traversal into which Swift 2 plugs in. More... | |
Public Member Functions | |
may_trigger_rerun (Effect effect) | |
Return True if the effect object may trigger a rerun. | |
__init__ (self, name, Dependencies dependencies, Effect effect, cell_kernel=None, touch_vertex_first_time_kernel=None, touch_vertex_last_time_kernel=None, prepare_traversal_kernel="", unprepare_traversal_kernel="", input_particles=None, includes="", cell_kernel_dependency_policy=None, touch_vertex_first_time_dependency_policy=None, touch_vertex_last_time_dependency_policy=None) | |
The algorithmic step description is a meta data object, i.e. | |
__str__ (self) | |
Static Public Member Functions | |
get_event_name (PeanoEventUsedBySwift stage) | |
Get the name as a string of a sweep stage for a given PeanoEventUsedBySwift enum. | |
Defines the meta data around one algorithmic step per particle.
A sequence of these steps describes the particle lifecycle per time step. It is Peano's/SWIFT's responsibility to arrange these steps in grid sweeps and to identify concurrency.
Definition at line 11 of file AlgorithmStep.py.
swift2.particle.AlgorithmStep.AlgorithmStep.__init__ | ( | self, | |
name, | |||
Dependencies | dependencies, | ||
Effect | effect, | ||
cell_kernel = None, | |||
touch_vertex_first_time_kernel = None, | |||
touch_vertex_last_time_kernel = None, | |||
prepare_traversal_kernel = "", | |||
unprepare_traversal_kernel = "", | |||
input_particles = None, | |||
includes = "", | |||
cell_kernel_dependency_policy = None, | |||
touch_vertex_first_time_dependency_policy = None, | |||
touch_vertex_last_time_dependency_policy = None ) |
The algorithmic step description is a meta data object, i.e.
it only holds properties.
cell_kernel | C++ code (string) Kernel invocation what happens in a cell. Set to None if nothing is to be done per cell. |
touch_vertex_first_time_kernel | C++ code (string) Kernel invocation what happens when we read a vertex and its particles for the first time. Set to None if nothing is to be done. |
touch_vertex_last_time_kernel | C++ code (string) Kernel invocation what happens when we read a vertex and its particles for the last time. Set to None if nothing is to be done. |
input_particles | ParticleSet Switch to None in most cases. This fragment gives you the opportunity to couple the particles of one step with another particle species. If you hand in None, then we assume that the algorithm step updates the particles as input function from the particles. |
includes | String Additional include statements |
prepare_traversals_kernel = None,
prepare_traversal_kernel | String (C++ code snippet) Whenever Peano runs through the mesh, it creates one instance of the mesh observer and then runs through all subpartitions (trees) in parallel. Each replica of the observer issues its own touchVertexFirstTime(), touchCellLastTime(), ... events, and each replica starts its traversal with a call to beginTraversal() and endTraversal(). If you want to plug into the phase such before these parallel instances are created, you can use prepareTraversal() - the C++ code snippet passed to this attribute is copied into prepareTraversal(). The overview over action sets provides more details. Note that no action set (or observer object) is created at this point, i.e. the C++ code snippet will be injected into a static routine and can therefore only access static information. Often, this routine is used for some MPI communication (global data exchange), e.g., or to update some other static properties for whole sets of objects. |
unprepare_traversal_kernel | String (C++ code snippet) Counterpart of prepare_traversal_kernel. Consult action sets for more context. |
cell_kernel_dependency_policy | String or None If it is a string, it should identify one of the variants of swift2::dependencychecks::Invariant. If you pick None, Swift 2 will add default dependencies. They might be too strict. |
touch_vertex_first_time_dependency_policy | String or None If it is a string, it should identify one of the variants of swift2::dependencychecks::Invariant. If you pick None, Swift 2 will add default dependencies. They might be too strict. |
touch_vertex_last_time_dependency_policy | String or None If it is a string, it should identify one of the variants of swift2::dependencychecks::Invariant. If you pick None, Swift 2 will add default dependencies. They might be too strict. |
Definition at line 119 of file AlgorithmStep.py.
swift2.particle.AlgorithmStep.AlgorithmStep.__str__ | ( | self | ) |
Definition at line 232 of file AlgorithmStep.py.
References swift2.particle.AlgorithmStep.AlgorithmStep.dependencies, swift2.particle.AlgorithmStep.AlgorithmStep.effect, dastgen2.attributes.Attribute.Attribute.name(), exahype2.solvers.aderdg.kernels.Gemms.Gemms.name, exahype2.solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.name(), exahype2.solvers.fv.FV.FV.name(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.name(), peano4.datamodel.DoF.DoF.name, peano4.solversteps.Step.Step.name, peano4.solversteps.UserActionSet.UserActionSet.name, peano4.toolbox.particles.Particle.Particle.name, swift2.particle.AlgorithmStep.AlgorithmStep.name, swift2.particle.Particle.Particle.name, swift2.particle.tests.DisappearingParticleTest.DisappearingParticleTest.name, swift2.particle.tests.testLeapfrogFixedTimeStepSize.testLeapfrogFixedTimeStepSize.name, convert::data::Variable.name, solvers.api.Solver.Solver.name(), and api.solvers.Solver.Solver.name().
Referenced by peano4.toolbox.particles.postprocessing.ParticleVTUReader.VTUParticleSet.__repr__().
|
static |
Get the name as a string of a sweep stage for a given PeanoEventUsedBySwift enum.
Definition at line 105 of file AlgorithmStep.py.
swift2.particle.AlgorithmStep.AlgorithmStep.may_trigger_rerun | ( | Effect | effect | ) |
Return True if the effect object may trigger a rerun.
Definition at line 71 of file AlgorithmStep.py.
swift2.particle.AlgorithmStep.AlgorithmStep.cell_kernel |
Definition at line 205 of file AlgorithmStep.py.
swift2.particle.AlgorithmStep.AlgorithmStep.cell_kernel_dependency_policy |
Definition at line 224 of file AlgorithmStep.py.
swift2.particle.AlgorithmStep.AlgorithmStep.dependencies |
Definition at line 202 of file AlgorithmStep.py.
Referenced by swift2.particle.AlgorithmStep.AlgorithmStep.__str__().
swift2.particle.AlgorithmStep.AlgorithmStep.effect |
Definition at line 203 of file AlgorithmStep.py.
Referenced by swift2.particle.AlgorithmStep.AlgorithmStep.__str__().
swift2.particle.AlgorithmStep.AlgorithmStep.includes |
Definition at line 212 of file AlgorithmStep.py.
Referenced by peano4.datamodel.PatchToDoubleArray.PatchToDoubleArray._get_dictionary_for_output(), and peano4.dastgen2.MPIAndStorageAspect.MPIAndStorageAspect.get_include().
swift2.particle.AlgorithmStep.AlgorithmStep.input_particles |
Definition at line 211 of file AlgorithmStep.py.
swift2.particle.AlgorithmStep.AlgorithmStep.name |
Definition at line 201 of file AlgorithmStep.py.
Referenced by exahype2.solvers.aderdg.kernels.Gemms.Gemms.__repr__(), swift2.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.__setup_algorithm_steps(), swift2.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius.__setup_algorithm_steps(), swift2.particle.AlgorithmStep.AlgorithmStep.__str__(), peano4.datamodel.DoF.DoF.additional_load_and_store_arguments_for_other_dof(), swift2.particle.ExplicitEulerDynamicSearchRadius.ExplicitEulerDynamicSearchRadius.algorithm_steps(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle.algorithm_steps(), peano4.solversteps.UserActionSet.UserActionSet.get_action_set_name(), peano4.datamodel.DoF.DoF.get_full_qualified_type(), peano4.datamodel.DoF.DoF.get_logical_type_name(), dastgen2.attributes.Enumeration.Enumeration.get_to_string(), and swift2.particle.Particle.Particle.readme_descriptor().
swift2.particle.AlgorithmStep.AlgorithmStep.prepare_traversal_kernel |
Definition at line 208 of file AlgorithmStep.py.
swift2.particle.AlgorithmStep.AlgorithmStep.touch_vertex_first_time_dependency_policy |
Definition at line 225 of file AlgorithmStep.py.
swift2.particle.AlgorithmStep.AlgorithmStep.touch_vertex_first_time_kernel |
Definition at line 206 of file AlgorithmStep.py.
swift2.particle.AlgorithmStep.AlgorithmStep.touch_vertex_last_time_dependency_policy |
Definition at line 228 of file AlgorithmStep.py.
swift2.particle.AlgorithmStep.AlgorithmStep.touch_vertex_last_time_kernel |
Definition at line 207 of file AlgorithmStep.py.
swift2.particle.AlgorithmStep.AlgorithmStep.unprepare_traversal_kernel |
Definition at line 209 of file AlgorithmStep.py.