|
Peano
|
Abstract base class for all ExaHyPE 2 solvers. More...


Data Structures | |
| class | SolverGenerator |
| Turns a Solver into actual classes. More... | |
| class | NumericalScheme |
| The concrete discretisation (Finite Volumes, ADER-DG, ...) realised by a Solver. More... | |
| class | GridConstruction |
| How a Solver drives the construction of the mesh it runs on. More... | |
| class | Plotter |
| How a Solver writes out its solution. More... | |
| class | MeshAdaptation |
| How a Solver adapts its mesh and rebalances its load between two time steps. More... | |
Public Member Functions | |
| __init__ (self, str name, VariableSpecification unknowns) | |
| Create solver. | |
| str | __str__ (self) |
| str | name (self) |
| Unique solver name. | |
| "Solver.NumericalScheme" | numerical_scheme (self) |
| numerical_scheme (self, "Solver.NumericalScheme" value) | |
| List["Solver.Plotter"] | plotters (self) |
| All plotters of the solver, in the order they have been added. | |
| add_plotter (self, "Solver.Plotter" plotter) | |
| Add a plotter to the solver. | |
| "Solver.Plotter" | plotter (self) |
| Shorthand for solvers with at most one plotter. | |
| plotter (self, "Solver.Plotter" value) | |
| int | unknowns (self) |
| List["AuxiliaryVariables"] | auxiliary_variables (self) |
| All sets of auxiliary variables in the order they have been attached. | |
| int | number_of_auxiliary_variables (self) |
| Total number of entries of all sets of auxiliary variables. | |
| int | auxiliary_variable_offset (self, "AuxiliaryVariables" auxiliary) |
| Offset of the first entry of a set within the buffer the compute kernels work on, i.e. | |
| add_auxiliary_variables (self, "AuxiliaryVariables" auxiliary) | |
| Attach a set of auxiliary variables to the solver. | |
| str | signature_of (self, PDETerm term) |
| The signature of a PDE term including the pointers to the auxiliary variables. | |
| str | user_solver_includes (self) |
| Add further includes to this property, if your solver requires some additional routines from other header files. | |
| add_user_solver_includes (self, str value) | |
| Add further includes to this property, if your solver requires some additional routines from other header files. | |
| set_solver_constants (self, str datastring) | |
| add_solver_constants (self, str datastring) | |
| List[str] | variable_names_per_entry (self) |
| One name per entry of Q, i.e. | |
| str | get_name_of_global_instance (self) |
| List[PDETerm] | pde_terms (self) |
| All PDE terms (flux, eigenvalues, ...) registered with this solver, in registration order. | |
| bool | requires_user_class (self) |
| True iff at least one PDE term has no implementation. | |
| str | get_name_of_solver_class (self) |
| Name of the C++ class the solver repository instantiates: <SolverName> if requires_user_class, Abstract<SolverName> otherwise. | |
| add_pde_term (self, PDETerm term) | |
| Register a PDE term with this solver, or replace the one already registered under the same name and statelessness. | |
| remove_pde_term (self, str name, bool stateless=False) | |
| Remove a previously registered PDE term by name and statelessness. | |
| PDETerm | get_pde_term (self, str name, bool stateless=False) |
| Look up a previously registered PDE term by name and statelessness. | |
| add_abstract_solver_attribute (self, str declaration) | |
| Add a raw C++ member attribute declaration to the generated Abstract<SolverName> class (. | |
| add_abstract_solver_method (self, str declaration, Callable[[str], str] definition_generator) | |
| Add a raw C++ method to the generated Abstract<SolverName> class: declaration goes into the class body (public section), verbatim. | |
| str | create_readme_descriptor (self, domain_offset, domain_size) |
| Return a human-readable description of this solver instance, to be embedded into the generated project's README. | |
| generate_solver_realisation (self, exahype2_project, peano_project, setup_simulation, time_step, plot, mesh_adaptation, add_global_tasks=True) | |
| Turn this solver specification into a task graph and create the required C++ kernels/stubs. | |
Data Fields | |
| solver_generator = SolverToCPPFiles(self) | |
| grid_construction = None | |
| tuple | mesh_adaptation = None |
| Turn this solver specification into a task graph and create the required C++ kernels/stubs. | |
| tuple | grid_selector |
| str | compute_kernel_call = None |
| pde_terms | |
| True iff at least one PDE term has no implementation. | |
Static Public Attributes | |
| str | SolutionUpdateTaskTag = "exahype2.api.Solver.SolutionUpdateTaskTag" |
| Tag of all tasks which write a new solution. | |
| str | IntermediateSolutionUpdateTag = "exahype2.api.Solver.IntermediateSolutionUpdateTag" |
| Tag of all tasks which write an intermediate solution. | |
Protected Member Functions | |
| int | _register_variables (self, VariableSpecification variables, int offset) |
| Translate a plain int or a name-to-multiplicity dict into a total variable count, and - for the dict case - add each name's position within Q to _variable_positions. | |
| str | _get_default_includes (self) |
| Includes every generated action set can rely on being available, regardless of which action sets a concrete discretisation (e.g. | |
| str | _unknown_identifier (self) |
| _add_wants_to_plot_to_solver (self) | |
| Add wantsToPlot() to the solver's C++ class: It holds if any of the solver's plotters is active (exahype2.api.Solver.Solver.Plotter). | |
| _add_checkpoint_meta_data_to_solver (self) | |
| Override exahype2.Solver.toCheckpointMetaData() in the solver's C++ class such that it also writes the attributes added through add_abstract_solver_attribute(), e.g. | |
Protected Attributes | |
| str | _name = name |
| Create solver. | |
| dict | _variable_positions = {} |
| Translate a plain int or a name-to-multiplicity dict into a total variable count, and - for the dict case - add each name's position within Q to _variable_positions. | |
| int | _unknowns = self._register_variables(unknowns, 0) |
| list | _auxiliary_variables = [] |
| All sets of auxiliary variables in the order they have been attached. | |
| str | _user_solver_includes = "" |
| str | _solver_constants = "" |
| dict | _pde_terms = {} |
| list | _abstract_solver_attributes = [] |
| list | _abstract_solver_methods = [] |
| _numerical_scheme = None | |
| list | _plotters = [] |
| Turn this solver specification into a task graph and create the required C++ kernels/stubs. | |
Abstract base class for all ExaHyPE 2 solvers.
Every discretisation ExaHyPE 2 ships (Finite Volumes, ADER-DG, Runge-Kutta Discontinuous Galerkin, Runge-Kutta Finite Differences, ...) is, from the project's point of view, a black box that has to answer a small set of questions: what data does it need on the mesh, which action sets realise its algorithmic steps, and how does it plug into the code generation. This class holds exactly that common contract plus the bits of bookkeeping (name, includes, solver constants, the unknowns and the auxiliary variables) that every concrete solver has historically reimplemented identically. It does not know anything about a concrete discretisation - it neither creates the actual mesh data structures nor the actual action sets, as this remains solver-specific and thus has to be added by all subclasses.
A concrete solver typically extends the constructor with its own discretisation-specific parameters (patch size, polynomial order, time stepping scheme, ...), calls Solver.__init__() for the shared part, and then implements the abstract methods below.
| exahype2.api.Solver.Solver.__init__ | ( | self, | |
| str | name, | ||
| VariableSpecification | unknowns ) |
Create solver.
name: str A unique name for the solver. This one is used for all generated classes. The generated C++ object instance also incorporates this name.
unknowns: int or dict Number of unknowns per mesh entry (Finite Volume voxel, DG degree of freedom, ...). Can be specified either as a plain int, or as a dict mapping variable name onto multiplicity (e.g. {"rho": 1, "j": 3} for a scalar density plus a 3d momentum). If dicts are used, the generated Abstract<SolverName> class hosts a nested struct Variables with one constant per name, so user code can write Q[Variables.j+1] instead of having to remember the offset into the unknowns array by hand.
Quantities which are space-dependent yet do not change over time are not unknowns. Attach them to the solver as auxiliary variables via add_auxiliary_variables().
The unknowns cannot be changed after construction: the numerical scheme sizes its data structures from them as soon as it is assigned to the solver.
| str exahype2.api.Solver.Solver.__str__ | ( | self | ) |
Definition at line 644 of file Solver.py.
References peano4.api.output.ActionSet.ActionSet.__class__, peano4.api.output.Jinja2TemplatedHeaderImplementationFilePair.Jinja2TemplatedHeaderImplementationFilePair.__class__, peano4.api.output.TemplatedHeaderFile.TemplatedHeaderFile.__class__, _auxiliary_variables, dastgen2.attributes.Attribute.Attribute._name, dastgen2.attributes.BooleanArray.BooleanArray._name, dastgen2.attributes.Enumeration.Enumeration._name, exagrype.api.euler.CCZ4WithEuler_OuterAdditiveCoupling.CCZ4WithEuler_OuterAdditiveCoupling._name, exagrype.api.euler.CCZ4WithEuler_OuterMultiplicativeCoupling.CCZ4WithEuler_OuterMultiplicativeCoupling._name, exagrype.api.FOSOSolver.FOSOSolver._name, exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling.CCZ4WithScalarField_InnerCoupling._name, exagrype.api.scalarfield.CCZ4WithScalarField_OuterMultiplicativeCoupling.CCZ4WithScalarField_OuterMultiplicativeCoupling._name, exahype2.api.AuxiliaryVariables.AuxiliaryVariables._name, exahype2.api.dslhype.SyntaxTree.Construction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromDotProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromExisting._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromFunction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromMatrixVectorProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromOperation._name, exahype2.api.dslhype.SyntaxTree.MemoryAllocation._name, exahype2.api.dslhype.SyntaxTree.MemoryDeallocation._name, _name, and _unknowns.
Referenced by peano4.api.toolbox.particles.postprocessing.ParticleVTUReader.VTUParticleSet.__repr__().

|
protected |
Override exahype2.Solver.toCheckpointMetaData() in the solver's C++ class such that it also writes the attributes added through add_abstract_solver_attribute(), e.g.
the time stamps of the next outputs of the plotters. Only attributes of type double, float or int are written, with their name without leading underscore as key.
The counterpart override of exahype2.Solver.fromCheckpointMetaData() restores these attributes. Afterwards, it calls finish<Name>() of all plotters: A plotter which has written output at the time of the checkpoint has done so before it has moved on to its next output, as it only moves on at the end of the plot phase (exahype2.api.Solver.Solver.Plotter). The checkpoint hence holds the time stamp of an output which has already been written. finish<Name>() moves such a plotter on, exactly as the original run has done after the checkpoint, so the restarted simulation does not write this output again.
The overrides evaluate the attributes and plotters the solver has when the C++ code is written, and they are added only once, even if several checkpoints use them or the Peano 4 project is generated multiple times.
Definition at line 1039 of file Solver.py.
References _abstract_solver_attributes, _abstract_solver_methods, _plotters, and add_abstract_solver_method().

|
protected |
Add wantsToPlot() to the solver's C++ class: It holds if any of the solver's plotters is active (exahype2.api.Solver.Solver.Plotter).
Solvers without plotters do not get the method, as nobody asks them. The method is added only once, even if the Peano 4 project is generated multiple times, and it evaluates the plotters the solver has when the C++ code is written.
Definition at line 1012 of file Solver.py.
References _abstract_solver_methods, _plotters, and add_abstract_solver_method().

|
protected |
Includes every generated action set can rely on being available, regardless of which action sets a concrete discretisation (e.g.
exahype2.api.fv) actually attaches -
Definition at line 832 of file Solver.py.
Referenced by exagrype.api.CCZ4SolverBase.CCZ4SolverBase._insert_constraint_enforcement(), and solvers.fv.FV.FV.create_action_sets().

|
protected |
Translate a plain int or a name-to-multiplicity dict into a total variable count, and - for the dict case - add each name's position within Q to _variable_positions.
Called once for unknowns (offset 0) so the names end up in one name/offset table.
Definition at line 617 of file Solver.py.
References _variable_positions.
|
protected |
Definition at line 854 of file Solver.py.
References dastgen2.attributes.Attribute.Attribute._name, dastgen2.attributes.BooleanArray.BooleanArray._name, dastgen2.attributes.Enumeration.Enumeration._name, exagrype.api.euler.CCZ4WithEuler_OuterAdditiveCoupling.CCZ4WithEuler_OuterAdditiveCoupling._name, exagrype.api.euler.CCZ4WithEuler_OuterMultiplicativeCoupling.CCZ4WithEuler_OuterMultiplicativeCoupling._name, exagrype.api.FOSOSolver.FOSOSolver._name, exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling.CCZ4WithScalarField_InnerCoupling._name, exagrype.api.scalarfield.CCZ4WithScalarField_OuterMultiplicativeCoupling.CCZ4WithScalarField_OuterMultiplicativeCoupling._name, exahype2.api.AuxiliaryVariables.AuxiliaryVariables._name, exahype2.api.dslhype.SyntaxTree.Construction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromDotProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromExisting._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromFunction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromMatrixVectorProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromOperation._name, exahype2.api.dslhype.SyntaxTree.MemoryAllocation._name, exahype2.api.dslhype.SyntaxTree.MemoryDeallocation._name, and _name.
Referenced by solvers.aderdg.ADERDG.ADERDG._init_dictionary_with_default_parameters(), solvers.fv.FV.FV._init_dictionary_with_default_parameters(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._init_dictionary_with_default_parameters(), solvers.fv.FV.FV.add_actions_to_checkpoint_solution(), solvers.aderdg.ADERDG.ADERDG.add_actions_to_plot_solution(), solvers.fv.FV.FV.add_actions_to_plot_solution(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.add_actions_to_plot_solution(), and solvers.elliptic.AMRMarker.AMRMarker.couple_with_FV_solver().

| exahype2.api.Solver.Solver.add_abstract_solver_attribute | ( | self, | |
| str | declaration ) |
Add a raw C++ member attribute declaration to the generated Abstract<SolverName> class (.
Nothing calls this unconditionally: a plain Solver carries no attributes beyond what PDE terms need. It is up to whichever NumericalScheme/GridConstruction/Plotter a solver uses to call this, if it needs solver-level state of its own that genuinely has no home on exahype2.Solver already - e.g. exahype2.api.fv.RusanovWithExplicitEuler deliberately does not use this for time stamp/time step size bookkeeping, since exahype2.Solver (which every generated Abstract<SolverName> already inherits from) already carries _minTimeStamp/_maxTimeStamp/_minTimeStepSize/_maxTimeStepSize and the updateCell()/startTimeStep()/finishTimeStep() lifecycle to maintain them -
Definition at line 947 of file Solver.py.
References _abstract_solver_attributes.
Referenced by exahype2.api.Solver.Solver.Plotter._add_time_interval_bookkeeping_to_solver().

| exahype2.api.Solver.Solver.add_abstract_solver_method | ( | self, | |
| str | declaration, | ||
| Callable[[str], str] | definition_generator ) |
Add a raw C++ method to the generated Abstract<SolverName> class: declaration goes into the class body (public section), verbatim.
definition_generator is called with the class' fully qualified name once it is known (
Definition at line 974 of file Solver.py.
References _abstract_solver_methods.
Referenced by _add_checkpoint_meta_data_to_solver(), exahype2.api.Solver.Solver.Plotter._add_time_interval_bookkeeping_to_solver(), _add_wants_to_plot_to_solver(), and exagrype.api.FOSOReconstructionSolver.FOSOReconstructionSolver._forward_time_stamps_and_time_step_sizes().

| exahype2.api.Solver.Solver.add_auxiliary_variables | ( | self, | |
| "AuxiliaryVariables" | auxiliary ) |
Attach a set of auxiliary variables to the solver.
Any number of sets can be attached. They have to be attached before the code is generated. Each set is held by its own cell data object. The first solver which a set is attached to owns it and initialises it. Further solvers can attach the same set object and thereby share the data. exahype2.api.AuxiliaryVariables explains the impact on the C++ signatures.
| auxiliary | exahype2.api.AuxiliaryVariables |
Reimplemented in exagrype.api.euler.Euler.Euler.
Definition at line 776 of file Solver.py.
References _auxiliary_variables.
Referenced by exagrype.api.scalarfield.ScalarField.ScalarField.__init__().

| exahype2.api.Solver.Solver.add_pde_term | ( | self, | |
| PDETerm | term ) |
Register a PDE term with this solver, or replace the one already registered under the same name and statelessness.
A solver aggregates an arbitrary number of terms - the well-known ones (Flux(), MaxEigenvalue(), ...) as well as new, solver-specific ones users construct themselves via PDETerm(name=..., implementation=...).
Each term generates exactly one C++ method: the static, GPU-offloadable overload if term.stateless, otherwise the virtual instance method (
Definition at line 916 of file Solver.py.
References _pde_terms.
Referenced by exagrype.api.FOSOCCZ4Solver.FOSOCCZ4Solver.__init__(), exagrype.api.scalarfield.ScalarField.ScalarField.__init__(), exagrype.api.CCZ4SolverBase.CCZ4SolverBase._register_non_conservative_product(), and exagrype.api.CCZ4SolverBase.CCZ4SolverBase._register_pde_terms().

| exahype2.api.Solver.Solver.add_plotter | ( | self, | |
| "Solver.Plotter" | plotter ) |
Add a plotter to the solver.
A solver can have an arbitrary number of plotters, which are independent of each other (exahype2.api.Solver.Solver.Plotter). If the plotter has no name yet, it gets the name of its class, followed by a number if the solver has another plotter of that name already.
| plotter | exahype2.api.Solver.Plotter The plotter. Its solver has to be this solver. |
Definition at line 679 of file Solver.py.
References _plotters.
Referenced by plotter().

| exahype2.api.Solver.Solver.add_solver_constants | ( | self, | |
| str | datastring ) |
Definition at line 851 of file Solver.py.
References _solver_constants.
| exahype2.api.Solver.Solver.add_user_solver_includes | ( | self, | |
| str | value ) |
Add further includes to this property, if your solver requires some additional routines from other header files.
Definition at line 825 of file Solver.py.
References _user_solver_includes.
Referenced by exagrype.api.scalarfield.ScalarField.ScalarField.__init__(), and solvers.rkdg.RungeKuttaDG.RungeKuttaDG.set_implementation().

| int exahype2.api.Solver.Solver.auxiliary_variable_offset | ( | self, | |
| "AuxiliaryVariables" | auxiliary ) |
Offset of the first entry of a set within the buffer the compute kernels work on, i.e.
the unknowns are followed by the sets in the order of their attachment.
Definition at line 763 of file Solver.py.
References _auxiliary_variables, and _unknowns.
| List["AuxiliaryVariables"] exahype2.api.Solver.Solver.auxiliary_variables | ( | self | ) |
All sets of auxiliary variables in the order they have been attached.
Definition at line 754 of file Solver.py.
References _auxiliary_variables.
Referenced by exagrype.api.euler.Euler.Euler._ccz4_fields_set().

| str exahype2.api.Solver.Solver.create_readme_descriptor | ( | self, | |
| domain_offset, | |||
| domain_size ) |
Return a human-readable description of this solver instance, to be embedded into the generated project's README.
Reimplemented in exagrype.api.FOSOReconstructionSolver.FOSOReconstructionSolver.
| exahype2.api.Solver.Solver.generate_solver_realisation | ( | self, | |
| exahype2_project, | |||
| peano_project, | |||
| setup_simulation, | |||
| time_step, | |||
| plot, | |||
| mesh_adaptation, | |||
| add_global_tasks = True ) |
Turn this solver specification into a task graph and create the required C++ kernels/stubs.
peano_project: peano4.api.Project The Peano 4 project that exahype2_project.generate_Peano4_project() is currently assembling. It is a local variable there, not an attribute - merely passed through here, so this solver can add its own artefacts to it.
setup_simulation, time_step, plot, mesh_adaptation: peano4.api.taskgraph.Graph The task graphs of the four algorithmic phases of the surrounding exahype2_project. They are owned by exahype2_project.generate_Peano4_project() and merely passed through here, so this solver can add its own tasks into them.
| add_global_tasks | bool Passed on to the numerical scheme, |
Reimplemented in exagrype.api.CCZ4SolverBase.CCZ4SolverBase, and exagrype.api.euler.Euler.Euler.
| str exahype2.api.Solver.Solver.get_name_of_global_instance | ( | self | ) |
Definition at line 882 of file Solver.py.
References dastgen2.attributes.Attribute.Attribute._name, dastgen2.attributes.BooleanArray.BooleanArray._name, dastgen2.attributes.Enumeration.Enumeration._name, exagrype.api.euler.CCZ4WithEuler_OuterAdditiveCoupling.CCZ4WithEuler_OuterAdditiveCoupling._name, exagrype.api.euler.CCZ4WithEuler_OuterMultiplicativeCoupling.CCZ4WithEuler_OuterMultiplicativeCoupling._name, exagrype.api.FOSOSolver.FOSOSolver._name, exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling.CCZ4WithScalarField_InnerCoupling._name, exagrype.api.scalarfield.CCZ4WithScalarField_OuterMultiplicativeCoupling.CCZ4WithScalarField_OuterMultiplicativeCoupling._name, exahype2.api.AuxiliaryVariables.AuxiliaryVariables._name, exahype2.api.dslhype.SyntaxTree.Construction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromDotProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromExisting._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromFunction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromMatrixVectorProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromOperation._name, exahype2.api.dslhype.SyntaxTree.MemoryAllocation._name, exahype2.api.dslhype.SyntaxTree.MemoryDeallocation._name, and _name.
Referenced by solvers.aderdg.SingleSweep.SingleSweep._delete_face_data_default_guard(), solvers.aderdg.ADERDG.ADERDG._init_dictionary_with_default_parameters(), solvers.fv.FV.FV._init_dictionary_with_default_parameters(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._init_dictionary_with_default_parameters(), solvers.aderdg.ADERDG.ADERDG._interpolate_face_data_default_guard(), solvers.aderdg.SingleSweep.SingleSweep._interpolate_face_data_default_guard(), solvers.aderdg.ADERDG.ADERDG._load_cell_data_default_guard(), solvers.fv.FV.FV._load_cell_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._load_cell_data_default_guard(), solvers.aderdg.ADERDG.ADERDG._load_face_data_default_guard(), solvers.fv.FV.FV._load_face_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._load_face_data_default_guard(), solvers.aderdg.ADERDG.ADERDG._provide_cell_data_to_compute_kernels_default_guard(), solvers.fv.FV.FV._provide_cell_data_to_compute_kernels_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._provide_cell_data_to_compute_kernels_default_guard(), solvers.aderdg.ADERDG.ADERDG._provide_face_data_to_compute_kernels_default_guard(), solvers.fv.FV.FV._provide_face_data_to_compute_kernels_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._provide_face_data_to_compute_kernels_default_guard(), solvers.aderdg.SingleSweep.SingleSweep._restrict_face_data_default_guard(), solvers.aderdg.ADERDG.ADERDG._store_boundary_data_default_guard(), solvers.aderdg.SingleSweep.SingleSweep._store_boundary_data_default_guard(), solvers.aderdg.ADERDG.ADERDG._store_cell_data_default_guard(), solvers.fv.FV.FV._store_cell_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._store_cell_data_default_guard(), solvers.aderdg.ADERDG.ADERDG._store_face_data_default_guard(), solvers.fv.FV.FV._store_face_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._store_face_data_default_guard(), solvers.aderdg.SingleSweep.SingleSweep.create_action_sets(), solvers.rkdg.SeparateSweeps.SeparateSweeps.create_action_sets(), solvers.fv.SingleSweep.SingleSweep.create_data_structures(), exahype2.api.Solver.Solver.Plotter.create_finish_call(), and exahype2.api.Solver.Solver.Plotter.create_is_active_predicate().

| str exahype2.api.Solver.Solver.get_name_of_solver_class | ( | self | ) |
Name of the C++ class the solver repository instantiates: <SolverName> if requires_user_class, Abstract<SolverName> otherwise.
Definition at line 909 of file Solver.py.
References dastgen2.attributes.Attribute.Attribute._name, dastgen2.attributes.BooleanArray.BooleanArray._name, dastgen2.attributes.Enumeration.Enumeration._name, exagrype.api.euler.CCZ4WithEuler_OuterAdditiveCoupling.CCZ4WithEuler_OuterAdditiveCoupling._name, exagrype.api.euler.CCZ4WithEuler_OuterMultiplicativeCoupling.CCZ4WithEuler_OuterMultiplicativeCoupling._name, exagrype.api.FOSOSolver.FOSOSolver._name, exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling.CCZ4WithScalarField_InnerCoupling._name, exagrype.api.scalarfield.CCZ4WithScalarField_OuterMultiplicativeCoupling.CCZ4WithScalarField_OuterMultiplicativeCoupling._name, exahype2.api.AuxiliaryVariables.AuxiliaryVariables._name, exahype2.api.dslhype.SyntaxTree.Construction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromDotProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromExisting._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromFunction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromMatrixVectorProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromOperation._name, exahype2.api.dslhype.SyntaxTree.MemoryAllocation._name, exahype2.api.dslhype.SyntaxTree.MemoryDeallocation._name, _name, and requires_user_class().

| PDETerm exahype2.api.Solver.Solver.get_pde_term | ( | self, | |
| str | name, | ||
| bool | stateless = False ) |
Look up a previously registered PDE term by name and statelessness.
Definition at line 943 of file Solver.py.
References _pde_terms.
| str exahype2.api.Solver.Solver.name | ( | self | ) |
Unique solver name.
Feeds into all generated class and instance names.
Definition at line 653 of file Solver.py.
References dastgen2.attributes.Attribute.Attribute._name, dastgen2.attributes.BooleanArray.BooleanArray._name, dastgen2.attributes.Enumeration.Enumeration._name, exagrype.api.euler.CCZ4WithEuler_OuterAdditiveCoupling.CCZ4WithEuler_OuterAdditiveCoupling._name, exagrype.api.euler.CCZ4WithEuler_OuterMultiplicativeCoupling.CCZ4WithEuler_OuterMultiplicativeCoupling._name, exagrype.api.FOSOSolver.FOSOSolver._name, exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling.CCZ4WithScalarField_InnerCoupling._name, exagrype.api.scalarfield.CCZ4WithScalarField_OuterMultiplicativeCoupling.CCZ4WithScalarField_OuterMultiplicativeCoupling._name, exahype2.api.AuxiliaryVariables.AuxiliaryVariables._name, exahype2.api.dslhype.SyntaxTree.Construction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromDotProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromExisting._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromFunction._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromMatrixVectorProduct._name, exahype2.api.dslhype.SyntaxTree.DataBlockConstructionFromOperation._name, exahype2.api.dslhype.SyntaxTree.MemoryAllocation._name, exahype2.api.dslhype.SyntaxTree.MemoryDeallocation._name, and _name.
Referenced by exagrype.api.CCZ4SolverBase.CCZ4SolverBase._insert_constraint_enforcement(), exagrype.api.CCZ4SolverBase.CCZ4SolverBase._tasks_of_this_solver(), and exagrype.api.FOSOReconstructionSolver.FOSOReconstructionSolver.create_task_graph().

| int exahype2.api.Solver.Solver.number_of_auxiliary_variables | ( | self | ) |
Total number of entries of all sets of auxiliary variables.
Definition at line 759 of file Solver.py.
References _auxiliary_variables.
| "Solver.NumericalScheme" exahype2.api.Solver.Solver.numerical_scheme | ( | self | ) |
Definition at line 660 of file Solver.py.
References exagrype.api.FOSOSolver.FOSOSolver._numerical_scheme, exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling.CCZ4WithScalarField_InnerCoupling._numerical_scheme, and _numerical_scheme.
Referenced by exagrype.api.CCZ4SolverBase.CCZ4SolverBase.generate_solver_realisation(), and exagrype.api.CCZ4SolverBase.CCZ4SolverBase.ncp_adds_advection().

| exahype2.api.Solver.Solver.numerical_scheme | ( | self, | |
| "Solver.NumericalScheme" | value ) |
Definition at line 664 of file Solver.py.
References exagrype.api.FOSOSolver.FOSOSolver._numerical_scheme, exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling.CCZ4WithScalarField_InnerCoupling._numerical_scheme, and _numerical_scheme.
| List[PDETerm] exahype2.api.Solver.Solver.pde_terms | ( | self | ) |
All PDE terms (flux, eigenvalues, ...) registered with this solver, in registration order.
A given name can appear at most twice - once stateless, once not,
Definition at line 886 of file Solver.py.
References _pde_terms.
| "Solver.Plotter" exahype2.api.Solver.Solver.plotter | ( | self | ) |
Shorthand for solvers with at most one plotter.
Reading it yields the solver's only plotter, or None if it has none. Assigning a plotter replaces all plotters of the solver by this one, assigning None removes all plotters. Use add_plotter() to give a solver more than one plotter.
Definition at line 726 of file Solver.py.
References _plotters.
| exahype2.api.Solver.Solver.plotter | ( | self, | |
| "Solver.Plotter" | value ) |
Definition at line 744 of file Solver.py.
References _plotters, and add_plotter().

| List["Solver.Plotter"] exahype2.api.Solver.Solver.plotters | ( | self | ) |
| exahype2.api.Solver.Solver.remove_pde_term | ( | self, | |
| str | name, | ||
| bool | stateless = False ) |
Remove a previously registered PDE term by name and statelessness.
Definition at line 939 of file Solver.py.
References _pde_terms.
| bool exahype2.api.Solver.Solver.requires_user_class | ( | self | ) |
True iff at least one PDE term has no implementation.
Only then does the user have to provide one, i.e. only then is a <SolverName> class derived from Abstract<SolverName> generated and added to the Makefile (
Definition at line 897 of file Solver.py.
Referenced by get_name_of_solver_class().

| exahype2.api.Solver.Solver.set_solver_constants | ( | self, | |
| str | datastring ) |
Definition at line 848 of file Solver.py.
References _solver_constants.
| str exahype2.api.Solver.Solver.signature_of | ( | self, | |
| PDETerm | term ) |
| int exahype2.api.Solver.Solver.unknowns | ( | self | ) |
| str exahype2.api.Solver.Solver.user_solver_includes | ( | self | ) |
Add further includes to this property, if your solver requires some additional routines from other header files.
Definition at line 818 of file Solver.py.
References _user_solver_includes.
Referenced by solvers.fv.FV.FV._init_dictionary_with_default_parameters(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._init_dictionary_with_default_parameters(), solvers.fv.EnclaveTasking.EnclaveTasking.add_implementation_files_to_project(), and solvers.rkdg.SeparateSweepsWithEnclaveTasking.SeparateSweepsWithEnclaveTasking.add_implementation_files_to_project().

| List[str] exahype2.api.Solver.Solver.variable_names_per_entry | ( | self | ) |
One name per entry of Q, i.e.
for the unknowns, or the empty list if the unknowns carry no names. A variable with multiplicity one keeps its name, whereas a variable v with multiplicity k yields the names v[0], ..., v[k-1], i.e. the entries Q[Variables.v+0], ..., Q[Variables.v+k-1]. Plotters use these names to label the entries in their output. The names of the auxiliary variables are available from the sets.
Definition at line 857 of file Solver.py.
References _unknowns, and _variable_positions.
|
protected |
Definition at line 567 of file Solver.py.
Referenced by _add_checkpoint_meta_data_to_solver(), and add_abstract_solver_attribute().
|
protected |
Definition at line 568 of file Solver.py.
Referenced by _add_checkpoint_meta_data_to_solver(), _add_wants_to_plot_to_solver(), and add_abstract_solver_method().
|
protected |
All sets of auxiliary variables in the order they have been attached.
Attach a set of auxiliary variables to the solver.
Total number of entries of all sets of auxiliary variables.
Any number of sets can be attached. They have to be attached before the code is generated. Each set is held by its own cell data object. The first solver which a set is attached to owns it and initialises it. Further solvers can attach the same set object and thereby share the data. exahype2.api.AuxiliaryVariables explains the impact on the C++ signatures.
| auxiliary | exahype2.api.AuxiliaryVariables |
Definition at line 556 of file Solver.py.
Referenced by __str__(), solvers.aderdg.ADERDG.ADERDG.__str__(), solvers.fv.FV.FV.__str__(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.__str__(), solvers.aderdg.ADERDG.ADERDG._init_dictionary_with_default_parameters(), solvers.fv.FV.FV._init_dictionary_with_default_parameters(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._init_dictionary_with_default_parameters(), add_auxiliary_variables(), auxiliary_variable_offset(), auxiliary_variables(), solvers.aderdg.ADERDG.ADERDG.auxiliary_variables(), solvers.fv.FV.FV.auxiliary_variables(), solvers.fv.FV.FV.auxiliary_variables(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.auxiliary_variables(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.auxiliary_variables(), and number_of_auxiliary_variables().
|
protected |
Create solver.
Turn this solver specification into a task graph and create the required C++ kernels/stubs.
name: str A unique name for the solver. This one is used for all generated classes. The generated C++ object instance also incorporates this name.
unknowns: int or dict Number of unknowns per mesh entry (Finite Volume voxel, DG degree of freedom, ...). Can be specified either as a plain int, or as a dict mapping variable name onto multiplicity (e.g. {"rho": 1, "j": 3} for a scalar density plus a 3d momentum). If dicts are used, the generated Abstract<SolverName> class hosts a nested struct Variables with one constant per name, so user code can write Q[Variables.j+1] instead of having to remember the offset into the unknowns array by hand.
Quantities which are space-dependent yet do not change over time are not unknowns. Attach them to the solver as auxiliary variables via add_auxiliary_variables().
The unknowns cannot be changed after construction: the numerical scheme sizes its data structures from them as soon as it is assigned to the solver.
peano_project: peano4.api.Project The Peano 4 project that exahype2_project.generate_Peano4_project() is currently assembling. It is a local variable there, not an attribute - merely passed through here, so this solver can add its own artefacts to it.
setup_simulation, time_step, plot, mesh_adaptation: peano4.api.taskgraph.Graph The task graphs of the four algorithmic phases of the surrounding exahype2_project. They are owned by exahype2_project.generate_Peano4_project() and merely passed through here, so this solver can add its own tasks into them.
| add_global_tasks | bool Passed on to the numerical scheme, |
Definition at line 548 of file Solver.py.
Referenced by api.Tree.Tree.__str__(), __str__(), solvers.aderdg.ADERDG.ADERDG.__str__(), solvers.api.Solver.Solver.__str__(), solvers.elliptic.AMRMarker.AMRMarker.__str__(), solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.__str__(), solvers.fv.FV.FV.__str__(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.__str__(), solvers.fv.EnclaveTasking.EnclaveTasking._enclave_task_name(), solvers.aderdg.ADERDG.ADERDG._generate_kernels(), solvers.aderdg.ADERDG.ADERDG._init_dictionary_with_default_parameters(), solvers.fv.FV.FV._init_dictionary_with_default_parameters(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._init_dictionary_with_default_parameters(), solvers.aderdg.ADERDG.ADERDG._interpolate_face_data_default_guard(), solvers.aderdg.SingleSweep.SingleSweep._interpolate_face_data_default_guard(), solvers.aderdg.ADERDG.ADERDG._load_cell_data_default_guard(), solvers.fv.FV.FV._load_cell_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._load_cell_data_default_guard(), solvers.aderdg.ADERDG.ADERDG._load_face_data_default_guard(), solvers.fv.FV.FV._load_face_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._load_face_data_default_guard(), solvers.aderdg.ADERDG.ADERDG._provide_cell_data_to_compute_kernels_default_guard(), solvers.fv.FV.FV._provide_cell_data_to_compute_kernels_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._provide_cell_data_to_compute_kernels_default_guard(), solvers.aderdg.ADERDG.ADERDG._provide_face_data_to_compute_kernels_default_guard(), solvers.fv.FV.FV._provide_face_data_to_compute_kernels_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._provide_face_data_to_compute_kernels_default_guard(), solvers.aderdg.SingleSweep.SingleSweep._restrict_face_data_default_guard(), solvers.aderdg.ADERDG.ADERDG._store_boundary_data_default_guard(), solvers.aderdg.ADERDG.ADERDG._store_cell_data_default_guard(), solvers.fv.FV.FV._store_cell_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._store_cell_data_default_guard(), solvers.aderdg.ADERDG.ADERDG._store_face_data_default_guard(), solvers.fv.FV.FV._store_face_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._store_face_data_default_guard(), _unknown_identifier(), solvers.aderdg.ADERDG.ADERDG._unknown_identifier(), solvers.elliptic.AMRMarker.AMRMarker._unknown_identifier(), solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells._unknown_identifier(), solvers.fv.FV.FV._unknown_identifier(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._unknown_identifier(), solvers.fv.FV.FV.add_actions_to_checkpoint_solution(), solvers.fv.EnclaveTasking.EnclaveTasking.add_actions_to_create_grid(), solvers.fv.EnclaveTasking.EnclaveTasking.add_actions_to_init_grid(), solvers.aderdg.ADERDG.ADERDG.add_actions_to_plot_solution(), solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.add_actions_to_plot_solution(), solvers.fv.FV.FV.add_actions_to_plot_solution(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.add_actions_to_plot_solution(), solvers.fv.EnclaveTasking.EnclaveTasking.add_entries_to_text_replacement_dictionary(), solvers.rkdg.SeparateSweepsWithEnclaveTasking.SeparateSweepsWithEnclaveTasking.add_entries_to_text_replacement_dictionary(), api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.add_implementation_files_to_project(), api.solvers.DiscontinuousGalerkinDiscretisation.DiscontinuousGalerkinDiscretisation.add_implementation_files_to_project(), solvers.aderdg.ADERDG.ADERDG.add_implementation_files_to_project(), solvers.api.CollocatedDLinearDiscretisationWithPointJacobi.CollocatedDLinearDiscretisationWithPointJacobi.add_implementation_files_to_project(), solvers.api.CollocatedMG.CollocatedMG.add_implementation_files_to_project(), solvers.api.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.add_implementation_files_to_project(), solvers.elliptic.AMRMarker.AMRMarker.add_to_Peano4_datamodel(), solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.add_to_Peano4_datamodel(), api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.add_to_plot(), solvers.aderdg.SingleSweep.SingleSweep.create_action_sets(), solvers.fv.rusanov.LocalTimeStepWithEnclaveTasking.LocalTimeStepWithEnclaveTasking.create_action_sets(), solvers.fv.rusanov.SubcyclingAdaptiveTimeStepWithEnclaveTasking.SubcyclingAdaptiveTimeStepWithEnclaveTasking.create_action_sets(), solvers.fv.rusanov.SubcyclingFixedTimeStep.SubcyclingFixedTimeStep.create_action_sets(), solvers.fv.rusanov.SubcyclingFixedTimeStepWithEnclaveTasking.SubcyclingFixedTimeStepWithEnclaveTasking.create_action_sets(), solvers.rkdg.SeparateSweeps.SeparateSweeps.create_action_sets(), solvers.fv.SingleSweep.SingleSweep.create_data_structures(), get_name_of_global_instance(), solvers.aderdg.ADERDG.ADERDG.get_name_of_global_instance(), solvers.elliptic.AMRMarker.AMRMarker.get_name_of_global_instance(), solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.get_name_of_global_instance(), solvers.fv.FV.FV.get_name_of_global_instance(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.get_name_of_global_instance(), get_name_of_solver_class(), api.solvers.Solver.Solver.name(), name(), solvers.api.Solver.Solver.name(), solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.name(), solvers.fv.FV.FV.name(), api.solvers.Solver.Solver.typename(), and solvers.api.Solver.Solver.typename().
|
protected |
Definition at line 584 of file Solver.py.
Referenced by numerical_scheme(), and numerical_scheme().
|
protected |
Definition at line 561 of file Solver.py.
Referenced by add_pde_term(), get_pde_term(), pde_terms(), and remove_pde_term().
|
protected |
Turn this solver specification into a task graph and create the required C++ kernels/stubs.
Shorthand for solvers with at most one plotter.
All plotters of the solver, in the order they have been added.
peano_project: peano4.api.Project The Peano 4 project that exahype2_project.generate_Peano4_project() is currently assembling. It is a local variable there, not an attribute - merely passed through here, so this solver can add its own artefacts to it.
setup_simulation, time_step, plot, mesh_adaptation: peano4.api.taskgraph.Graph The task graphs of the four algorithmic phases of the surrounding exahype2_project. They are owned by exahype2_project.generate_Peano4_project() and merely passed through here, so this solver can add its own tasks into them.
| add_global_tasks | bool Passed on to the numerical scheme, |
Reading it yields the solver's only plotter, or None if it has none. Assigning a plotter replaces all plotters of the solver by this one, assigning None removes all plotters. Use add_plotter() to give a solver more than one plotter.
Definition at line 596 of file Solver.py.
Referenced by _add_checkpoint_meta_data_to_solver(), _add_wants_to_plot_to_solver(), add_plotter(), plotter(), plotter(), and plotters().
|
protected |
Definition at line 559 of file Solver.py.
Referenced by solvers.aderdg.ADERDG.ADERDG._init_dictionary_with_default_parameters(), solvers.fv.FV.FV._init_dictionary_with_default_parameters(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._init_dictionary_with_default_parameters(), add_solver_constants(), solvers.aderdg.ADERDG.ADERDG.add_solver_constants(), solvers.fv.FV.FV.add_solver_constants(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.add_solver_constants(), set_solver_constants(), solvers.aderdg.ADERDG.ADERDG.set_solver_constants(), solvers.fv.FV.FV.set_solver_constants(), and solvers.rkdg.RungeKuttaDG.RungeKuttaDG.set_solver_constants().
|
protected |
Definition at line 553 of file Solver.py.
Referenced by __str__(), solvers.aderdg.ADERDG.ADERDG.__str__(), solvers.fv.FV.FV.__str__(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.__str__(), solvers.aderdg.ADERDG.ADERDG._init_dictionary_with_default_parameters(), solvers.fv.FV.FV._init_dictionary_with_default_parameters(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG._init_dictionary_with_default_parameters(), api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.add_to_plot(), tarch.plotter.api.output.Visualiser.PatchFileData.apply_renderer_to_data(), auxiliary_variable_offset(), tarch.plotter.api.output.Visualiser.PatchFileData.copy_data_from_parser_object(), api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation.number_of_matrix_entries_per_vertex(), unknowns(), solvers.aderdg.ADERDG.ADERDG.unknowns(), solvers.fv.FV.FV.unknowns(), solvers.fv.FV.FV.unknowns(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.unknowns(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.unknowns(), and variable_names_per_entry().
|
protected |
Definition at line 558 of file Solver.py.
Referenced by add_user_solver_includes(), solvers.fv.FV.FV.add_user_solver_includes(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG.add_user_solver_includes(), user_solver_includes(), solvers.fv.FV.FV.user_solver_includes(), and solvers.rkdg.RungeKuttaDG.RungeKuttaDG.user_solver_includes().
|
protected |
Translate a plain int or a name-to-multiplicity dict into a total variable count, and - for the dict case - add each name's position within Q to _variable_positions.
Called once for unknowns (offset 0) so the names end up in one name/offset table.
Definition at line 551 of file Solver.py.
Referenced by _register_variables(), and variable_names_per_entry().
| exahype2.api.Solver.Solver.grid_construction = None |
Definition at line 591 of file Solver.py.
Referenced by plot_celldepth_benchmarks.BenchmarkData._read_logfile().
| tuple exahype2.api.Solver.Solver.grid_selector |
Definition at line 608 of file Solver.py.
Referenced by exagrype.api.CCZ4SolverBase.CCZ4SolverBase._insert_constraint_enforcement().
|
static |
Tag of all tasks which write an intermediate solution.
Runge-Kutta schemes add this tag to each task which writes the input of a further Runge-Kutta stage, and exahype2.api.Solver.Solver.SolutionUpdateTaskTag to the task which writes the new solution after the last stage. Postprocessing which has to act on each stage, such as the enforcement of constraints, hence searches for both tags. The contract of SolutionUpdateTaskTag applies.
| tuple exahype2.api.Solver.Solver.mesh_adaptation = None |
Turn this solver specification into a task graph and create the required C++ kernels/stubs.
peano_project: peano4.api.Project The Peano 4 project that exahype2_project.generate_Peano4_project() is currently assembling. It is a local variable there, not an attribute - merely passed through here, so this solver can add its own artefacts to it.
setup_simulation, time_step, plot, mesh_adaptation: peano4.api.taskgraph.Graph The task graphs of the four algorithmic phases of the surrounding exahype2_project. They are owned by exahype2_project.generate_Peano4_project() and merely passed through here, so this solver can add its own tasks into them.
| add_global_tasks | bool Passed on to the numerical scheme, |
| exahype2.api.Solver.Solver.pde_terms |
True iff at least one PDE term has no implementation.
Only then does the user have to provide one, i.e. only then is a <SolverName> class derived from Abstract<SolverName> generated and added to the Makefile (
Definition at line 907 of file Solver.py.
Referenced by exagrype.api.CCZ4SolverBase.CCZ4SolverBase._register_non_conservative_product().
|
static |
Tag of all tasks which write a new solution.
Tags are plain strings (peano4.api.taskgraph.Task.Task). Every numerical scheme adds this tag to each task of its time stepping task graph which writes a new solution:
Code which wants to postprocess the solution, typically a subclass of a numerical scheme which extends the scheme's construct_output(), searches for the tag via peano4.api.taskgraph.Graph.find_tasks() and inserts its own tasks after the tagged ones via peano4.api.taskgraph.Graph.insert_after(). The tag is a contract between the numerical schemes and any such code: A scheme has to tag all of its solution writers, and it must not read the outcome of a writer within the writer's own task, i.e. it has to project the solution onto the faces or compute eigenvalues from it in a subsequent task. The tag does not say which data or cells a task writes. Code which inserts tasks has to know the scheme it works with (page_exahype2_solver_manipulate_solver_steps).
| exahype2.api.Solver.Solver.solver_generator = SolverToCPPFiles(self) |