|
Peano
|
One step. More...
Public Member Functions | |
| __init__ (self, name, add_user_defined_actions=True) | |
| By default, the step generates at least one action set for the user. | |
| str | get_observer_class_name (self) |
| Class name of the observer this step is translated into. | |
| remove_all_actions (self) | |
| Each step holds a set of actions. | |
| add_action_set (self, action_set) | |
| Add a new action set to this mesh traversal step. | |
| set_project (self, project) | |
| Tie step to project. | |
| use_cell (self, submodel) | |
| use_face (self, submodel) | |
| use_vertex (self, submodel) | |
| highest_descend_invocation_order (self) | |
| Return max descend_invocation_order over all action sets associated with this step. | |
| lowest_descend_invocation_order (self) | |
| Return minimum descend_invocation_order over all action sets associated with this step. | |
| get_vertex_operations_signature (self) | |
| get_face_operations_signature (self) | |
| get_cell_operations_signature (self) | |
| get_touch_cell_signature (self) | |
| construct_output (self, output) | |
| Each solver step basically gives us two big files/classes: A class which handles the actual data movements, i.e. | |
| copy_action_sets_from_other_step (self, other_step) | |
Data Fields | |
| name | |
| cell_data | |
| face_data | |
| vertex_data | |
| cell_data_access | |
| face_data_access | |
| vertex_data_access | |
| action_sets | |
| action_set_generator | |
| observer_generator | |
| project | |
| namespace | |
| subdirectory | |
Private Member Functions | |
| __sort (self) | |
| Simple bubble sort the action sets, such that their descend_invocation_order is preserved. | |
One step.
Most generic version of a solver step. A solverstep describes what Peano 4 should do when it runs over the grid. As users have to specify which pieces of data from the data model are used by the solver step, it can handle all the user data stack flow.
This class also is responsible to generate all function signatures of all the steps, observers and action sets. In the Peano terminology, a step corresponds to an observer. For any given step, we run through the mesh and pass the traversal automaton an observer which accepts events (aka state transition observations).
It is the observer's job to then distribute these observations, broken down into grid actions such as "touch vertex first time", among the action sets that are tied to this observer. In Python you can have one action set and associate it with several observers. In the C++ code, we will flatten such a relation, i.e. create the corresponding action set multiple times.
name: String This name is used to create the underlying action set later on
| peano4.api.solversteps.Step.Step.__init__ | ( | self, | |
| name, | |||
add_user_defined_actions = True |
|||
| ) |
|
private |
Simple bubble sort the action sets, such that their descend_invocation_order is preserved.
Definition at line 98 of file Step.py.
References peano4.api.solversteps.Step.Step.action_sets.
Referenced by peano4.api.solversteps.Step.Step.add_action_set(), peano4.api.solversteps.Step.Step.highest_descend_invocation_order(), and peano4.api.solversteps.Step.Step.lowest_descend_invocation_order().

| peano4.api.solversteps.Step.Step.add_action_set | ( | self, | |
| action_set | |||
| ) |
Add a new action set to this mesh traversal step.
Each step holds a set of action_sets. They describe what the step actually should do whenever it loads a vertex, runs into a cell, and so forth. By default, the step holds one user-defined action_set (UserActionSet) which means that a stub is generated where users can insert their functionality. It is important in which order you add your action_sets: The whole tree traversal is a top-down/depth-first tree traversal. So all the enter, create, ... operations of a action_set are invoked exactly in the order you add them to the step. All the delete, leave, ... operations are invokved in reversed order.
I used to have a flag append_at_end with the default True, but this one is now replaced, as each action set knows its priority.
Definition at line 117 of file Step.py.
References peano4.api.solversteps.Step.Step.__sort(), and peano4.api.solversteps.Step.Step.action_sets.

| peano4.api.solversteps.Step.Step.construct_output | ( | self, | |
| output | |||
| ) |
Each solver step basically gives us two big files/classes: A class which handles the actual data movements, i.e.
is an implementation of the tree visitor pattern over the Peano4 tree. The other type is an interface which provides plugin points into the created data transitions from a user's perspective.
Markers of type peano4.api.solversteps.SynchroniseActionSets.SynchroniseActionSets yield no C++ code. They only separate the task groups which we hand over to the observer (peano4.api.solversteps.SynchroniseActionSets.get_task_groups()).
Definition at line 245 of file Step.py.
References peano4.api.solversteps.Step.Step.action_set_generator, peano4.api.solversteps.Step.Step.action_sets, peano4.api.solversteps.Step.Step.construct_output(), and peano4.api.solversteps.Step.Step.observer_generator.
Referenced by peano4.api.solversteps.Step.Step.construct_output().


| peano4.api.solversteps.Step.Step.copy_action_sets_from_other_step | ( | self, | |
| other_step | |||
| ) |
Definition at line 277 of file Step.py.
References peano4.api.solversteps.Step.Step.action_sets.
| peano4.api.solversteps.Step.Step.get_cell_operations_signature | ( | self | ) |
Definition at line 211 of file Step.py.
References peano4.api.datamodel.Model.Model.cell_data, peano4.api.solversteps.Step.Step.cell_data, tarch.plotter.api.input.PatchFileParser.UnknownAttributes.cell_data, peano4.api.datamodel.Model.Model.face_data, peano4.api.solversteps.Step.Step.face_data, peano4.api.datamodel.Model.Model.vertex_data, and peano4.api.solversteps.Step.Step.vertex_data.
| peano4.api.solversteps.Step.Step.get_face_operations_signature | ( | self | ) |
Definition at line 197 of file Step.py.
References peano4.api.datamodel.Model.Model.cell_data, peano4.api.solversteps.Step.Step.cell_data, tarch.plotter.api.input.PatchFileParser.UnknownAttributes.cell_data, peano4.api.datamodel.Model.Model.face_data, peano4.api.solversteps.Step.Step.face_data, peano4.api.datamodel.Model.Model.vertex_data, and peano4.api.solversteps.Step.Step.vertex_data.
| str peano4.api.solversteps.Step.Step.get_observer_class_name | ( | self | ) |
Class name of the observer this step is translated into.
This is the step's name, cut down to 64 characters plus a consecutive number if it is longer (
Definition at line 72 of file Step.py.
References solvers.aderdg.kernels.Gemms.Gemms.name, solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.name(), solvers.fv.FV.FV.name(), convert::data::Variable.name, dastgen2.attributes.Attribute.Attribute.name(), dastgen2.DataModel.DataModel.name(), exagrype.api.CCZ4Solver.CCZ4Solver.name, exahype2.api.PDETerm.PDETerm.name, exahype2.api.Solver.Solver.Plotter.name, exahype2.api.Solver.Solver.name(), exaparty.api.particle.AlgorithmStep.AlgorithmStep.name, exaparty.api.particle.Particle.Particle.name, exaparty.api.particle.tests.DisappearingParticleTest.DisappearingParticleTest.name, exaparty.api.particle.tests.testLeapfrogFixedTimeStepSize.testLeapfrogFixedTimeStepSize.name, solvers.api.Solver.Solver.name(), api.solvers.Solver.Solver.name(), peano4.api.datamodel.DoF.DoF.name, peano4.api.solversteps.Step.Step.name, peano4.api.solversteps.UserActionSet.UserActionSet.name, peano4.api.taskgraph.compiler.fuse-steps-illustrations._IllustrationActionSet.name, peano4.api.taskgraph.compiler.fuse-steps-illustrations._IllustrationSubmodel.name, peano4.api.taskgraph.Task.Task.name, peano4.api.toolbox.particles.Particle.Particle.name, test_derive_load_store_compute_flag._FakeSubmodel.name, test_fuse_steps._FakeActionSet.name, test_fuse_steps._FakeSubmodel.name, test_propagate_use_statements._FakeSubmodel.name, and test_task_groups._FakeActionSet.name.

| peano4.api.solversteps.Step.Step.get_touch_cell_signature | ( | self | ) |
Definition at line 227 of file Step.py.
References peano4.api.datamodel.Model.Model.cell_data, peano4.api.solversteps.Step.Step.cell_data, tarch.plotter.api.input.PatchFileParser.UnknownAttributes.cell_data, peano4.api.datamodel.Model.Model.face_data, peano4.api.solversteps.Step.Step.face_data, peano4.api.datamodel.Model.Model.vertex_data, and peano4.api.solversteps.Step.Step.vertex_data.
| peano4.api.solversteps.Step.Step.get_vertex_operations_signature | ( | self | ) |
Definition at line 185 of file Step.py.
References peano4.api.datamodel.Model.Model.cell_data, peano4.api.solversteps.Step.Step.cell_data, tarch.plotter.api.input.PatchFileParser.UnknownAttributes.cell_data, peano4.api.datamodel.Model.Model.face_data, peano4.api.solversteps.Step.Step.face_data, peano4.api.datamodel.Model.Model.vertex_data, and peano4.api.solversteps.Step.Step.vertex_data.
| peano4.api.solversteps.Step.Step.highest_descend_invocation_order | ( | self | ) |
Return max descend_invocation_order over all action sets associated with this step.
Definition at line 159 of file Step.py.
References peano4.api.solversteps.Step.Step.__sort(), and peano4.api.solversteps.Step.Step.action_sets.

| peano4.api.solversteps.Step.Step.lowest_descend_invocation_order | ( | self | ) |
Return minimum descend_invocation_order over all action sets associated with this step.
Definition at line 172 of file Step.py.
References peano4.api.solversteps.Step.Step.__sort(), and peano4.api.solversteps.Step.Step.action_sets.

| peano4.api.solversteps.Step.Step.remove_all_actions | ( | self | ) |
Each step holds a set of actions.
They describe what the step actually should do whenever it loads a vertex, runs into a cell, and so forth. By default, the step holds one user-defined actions which means that a stub is generated where users can insert their functionality. You can remove this one (or any other one added so far) with this routine.
Definition at line 88 of file Step.py.
References peano4.api.solversteps.Step.Step.action_sets.
| peano4.api.solversteps.Step.Step.set_project | ( | self, | |
| project | |||
| ) |
| peano4.api.solversteps.Step.Step.use_cell | ( | self, | |
| submodel | |||
| ) |
Definition at line 150 of file Step.py.
References peano4.api.datamodel.Model.Model.cell_data, peano4.api.solversteps.Step.Step.cell_data, and tarch.plotter.api.input.PatchFileParser.UnknownAttributes.cell_data.
| peano4.api.solversteps.Step.Step.use_face | ( | self, | |
| submodel | |||
| ) |
Definition at line 153 of file Step.py.
References peano4.api.datamodel.Model.Model.face_data, and peano4.api.solversteps.Step.Step.face_data.
| peano4.api.solversteps.Step.Step.use_vertex | ( | self, | |
| submodel | |||
| ) |
Definition at line 156 of file Step.py.
References peano4.api.datamodel.Model.Model.vertex_data, and peano4.api.solversteps.Step.Step.vertex_data.
| peano4.api.solversteps.Step.Step.action_set_generator |
Definition at line 69 of file Step.py.
Referenced by peano4.api.solversteps.Step.Step.construct_output().
| peano4.api.solversteps.Step.Step.action_sets |
Definition at line 66 of file Step.py.
Referenced by peano4.api.solversteps.Step.Step.__sort(), peano4.api.taskgraph.Task.Task.add_action_set(), peano4.api.solversteps.Step.Step.add_action_set(), peano4.api.solversteps.Step.Step.construct_output(), peano4.api.solversteps.Step.Step.copy_action_sets_from_other_step(), peano4.api.solversteps.Step.Step.highest_descend_invocation_order(), peano4.api.solversteps.Step.Step.lowest_descend_invocation_order(), and peano4.api.solversteps.Step.Step.remove_all_actions().
| peano4.api.solversteps.Step.Step.cell_data |
Definition at line 49 of file Step.py.
Referenced by peano4.api.datamodel.Model.Model.__str__(), peano4.api.datamodel.Model.Model.add_cell(), tarch.plotter.api.input.PatchFileParser.UnknownAttributes.append_patch(), peano4.api.datamodel.Model.Model.clear(), peano4.api.datamodel.Model.Model.construct_output(), peano4.api.solversteps.Step.Step.get_cell_operations_signature(), peano4.api.solversteps.Step.Step.get_face_operations_signature(), peano4.api.solversteps.Step.Step.get_touch_cell_signature(), peano4.api.solversteps.Step.Step.get_vertex_operations_signature(), tarch.plotter.api.input.PatchFileParser.UnknownAttributes.set_celldata(), peano4.api.taskgraph.Task.Task.use_cell(), and peano4.api.solversteps.Step.Step.use_cell().
| peano4.api.solversteps.Step.Step.cell_data_access |
Definition at line 62 of file Step.py.
Referenced by peano4.api.taskgraph.Task.Task.use_cell().
| peano4.api.solversteps.Step.Step.face_data |
Definition at line 50 of file Step.py.
Referenced by peano4.api.datamodel.Model.Model.__str__(), peano4.api.datamodel.Model.Model.add_face(), peano4.api.datamodel.Model.Model.clear(), peano4.api.datamodel.Model.Model.construct_output(), peano4.api.solversteps.Step.Step.get_cell_operations_signature(), peano4.api.solversteps.Step.Step.get_face_operations_signature(), peano4.api.solversteps.Step.Step.get_touch_cell_signature(), peano4.api.solversteps.Step.Step.get_vertex_operations_signature(), peano4.api.taskgraph.Task.Task.use_face(), and peano4.api.solversteps.Step.Step.use_face().
| peano4.api.solversteps.Step.Step.face_data_access |
Definition at line 63 of file Step.py.
Referenced by peano4.api.taskgraph.Task.Task.use_face().
| peano4.api.solversteps.Step.Step.name |
Definition at line 48 of file Step.py.
Referenced by solvers.aderdg.kernels.Gemms.Gemms.__repr__(), test_derive_load_store_compute_flag._FakeSubmodel.__repr__(), test_propagate_use_statements._FakeSubmodel.__repr__(), exaparty.api.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.__setup_algorithm_steps(), exaparty.api.particle.AlgorithmStep.AlgorithmStep.__str__(), exahype2.api.Solver.Solver.Plotter._add_time_interval_bookkeeping_to_solver(), exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius._setup_algorithm_steps_dict(), exagrype.api.CCZ4Solver.CCZ4Solver._tasks_of_this_solver(), peano4.api.datamodel.DoF.DoF.additional_load_and_store_arguments_for_other_dof(), exaparty.api.particle.ExplicitEulerDynamicSearchRadius.ExplicitEulerDynamicSearchRadius.algorithm_steps(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle.algorithm_steps(), exahype2.api.Solver.Solver.Plotter.create_finish_call(), exahype2.api.Solver.Solver.Plotter.create_is_active_predicate(), peano4.api.solversteps.UserActionSet.UserActionSet.get_action_set_name(), peano4.api.taskgraph.compiler.fuse-steps-illustrations._IllustrationActionSet.get_action_set_name(), test_fuse_steps._FakeActionSet.get_action_set_name(), peano4.api.datamodel.DoF.DoF.get_full_qualified_type(), peano4.api.datamodel.DoF.DoF.get_logical_type_name(), peano4.api.solversteps.Step.Step.get_observer_class_name(), dastgen2.attributes.Enumeration.Enumeration.get_to_string(), and exaparty.api.particle.Particle.Particle.readme_descriptor().
| peano4.api.solversteps.Step.Step.namespace |
Definition at line 147 of file Step.py.
Referenced by peano4.api.output.Observer.Observer.__generate_header(), peano4.api.output.ActionSet.ActionSet.__get_full_qualified_class_name(), peano4.api.datamodel.Model.Model.add_cell(), peano4.api.datamodel.Model.Model.add_face(), peano4.api.datamodel.Model.Model.add_global_object(), peano4.api.Project.Project.add_subproject(), peano4.api.datamodel.Model.Model.add_vertex(), peano4.api.datamodel.DoF.DoF.configure(), and peano4.api.datamodel.DoF.DoF.get_full_qualified_type().
| peano4.api.solversteps.Step.Step.observer_generator |
Definition at line 70 of file Step.py.
Referenced by peano4.api.solversteps.Step.Step.construct_output().
| peano4.api.solversteps.Step.Step.project |
Definition at line 146 of file Step.py.
Referenced by exahype2.api.generators.DefaultSimulationMain._ExaHyPEMainFileSequence.construct_output(), peano4.api.runner.DefaultSequence.DefaultSequence.construct_output(), exahype2.api.generators.DefaultSimulationMain.DefaultSimulationMain.construct_output(), and exahype2.api.generators.SolverRepositoryGenerator.SolverRepositoryGenerator.construct_output().
| peano4.api.solversteps.Step.Step.subdirectory |
Definition at line 148 of file Step.py.
Referenced by peano4.api.output.ActionSet.ActionSet.__generate_header(), peano4.api.output.Observer.Observer.__generate_header(), peano4.api.datamodel.Model.Model.add_cell(), peano4.api.datamodel.Model.Model.add_face(), peano4.api.datamodel.Model.Model.add_global_object(), peano4.api.datamodel.Model.Model.add_vertex(), peano4.api.output.ActionSet.ActionSet.generate(), peano4.api.output.InvokeExternalTool.InvokeExternalTool.generate(), peano4.api.output.Jinja2TemplatedHeaderFile.Jinja2TemplatedHeaderFile.generate(), peano4.api.output.Jinja2TemplatedHeaderImplementationFilePair.Jinja2TemplatedHeaderImplementationFilePair.generate(), peano4.api.output.Jinja2TemplateStringHeaderImplementationFilePair.Jinja2TemplateStringHeaderImplementationFilePair.generate(), peano4.api.output.Observer.Observer.generate(), peano4.api.output.TemplatedHeaderFile.TemplatedHeaderFile.generate(), peano4.api.output.TemplatedHeaderImplementationFilePair.TemplatedHeaderImplementationFilePair.generate(), peano4.api.output.ActionSet.ActionSet.get_cpp_file_name(), peano4.api.output.Observer.Observer.get_cpp_file_name(), and peano4.api.datamodel.DoF.DoF.subnamespace().
| peano4.api.solversteps.Step.Step.vertex_data |
Definition at line 51 of file Step.py.
Referenced by peano4.api.datamodel.Model.Model.__str__(), peano4.api.datamodel.Model.Model.add_vertex(), peano4.api.datamodel.Model.Model.clear(), peano4.api.datamodel.Model.Model.construct_output(), peano4.api.solversteps.Step.Step.get_cell_operations_signature(), peano4.api.solversteps.Step.Step.get_face_operations_signature(), peano4.api.solversteps.Step.Step.get_touch_cell_signature(), peano4.api.solversteps.Step.Step.get_vertex_operations_signature(), peano4.api.taskgraph.Task.Task.use_vertex(), and peano4.api.solversteps.Step.Step.use_vertex().
| peano4.api.solversteps.Step.Step.vertex_data_access |
Definition at line 64 of file Step.py.
Referenced by peano4.api.taskgraph.Task.Task.use_vertex().