Peano
Loading...
Searching...
No Matches
exahype2.api.Solver.Solver Class Reference

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

Inheritance diagram for exahype2.api.Solver.Solver:
Collaboration diagram for exahype2.api.Solver.Solver:

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.

Detailed Description

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.

See also
exahype2.api.Project

Definition at line 17 of file Solver.py.

Constructor & Destructor Documentation

◆ __init__()

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.

Definition at line 515 of file Solver.py.

Member Function Documentation

◆ __str__()

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__().

Here is the caller graph for this function:

◆ _add_checkpoint_meta_data_to_solver()

exahype2.api.Solver.Solver._add_checkpoint_meta_data_to_solver ( self)
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().

Here is the call graph for this function:

◆ _add_wants_to_plot_to_solver()

exahype2.api.Solver.Solver._add_wants_to_plot_to_solver ( self)
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().

Here is the call graph for this function:

◆ _get_default_includes()

str exahype2.api.Solver.Solver._get_default_includes ( self)
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 -

See also
exahype2.api.fv.actionsets.AbstractFVActionSet.get_includes().

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().

Here is the caller graph for this function:

◆ _register_variables()

int exahype2.api.Solver.Solver._register_variables ( self,
VariableSpecification variables,
int offset )
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.

◆ _unknown_identifier()

str exahype2.api.Solver.Solver._unknown_identifier ( self)
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().

Here is the caller graph for this function:

◆ add_abstract_solver_attribute()

exahype2.api.Solver.Solver.add_abstract_solver_attribute ( self,
str declaration )

Add a raw C++ member attribute declaration to the generated Abstract<SolverName> class (.

See also
exahype2.api.SolverToCPPFiles), e.g. "double _timeStamp = 0.0;" - use an in-class initialiser if the attribute needs one, since there is no hook into the generated constructor for this.

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 -

See also
exahype2.api.fv.actionsets. ComputeGlobalCFLCondition, which drives that lifecycle instead of introducing parallel state via this method.

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().

Here is the caller graph for this function:

◆ add_abstract_solver_method()

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 (

See also
exahype2.api.SolverToCPPFiles, exactly the way PDETerm.Generator.generate_out_of_class_definitions() already is) and has to return the out-of-class definition - a plain string with a "{qualified_class_name}" placeholder is deliberately not supported here, since a C++ method body is full of literal braces of its own; build the string with concatenation instead, e.g.:
solver.add_abstract_solver_method(
"void increaseTimestamp(double dt);",
lambda qualified_class_name:
"void " + qualified_class_name + "::increaseTimestamp(double dt) {\\n"
" _timeStamp += dt;\\n"
"}\\n"
)
See also
add_abstract_solver_attribute() for the attribute counterpart, and exahype2.api.PDETerm.Generator for the more structured alternative this deliberately is not (that one is for PDE terms a user implements; this one is for solver-level bookkeeping a NumericalScheme/etc. needs that has no equivalent on exahype2.Solver already -
add_abstract_solver_attribute()'s own note on why RusanovWithExplicitEuler does not actually use either method for time stamp/time step size bookkeeping).

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().

Here is the caller graph for this function:

◆ add_auxiliary_variables()

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.

Parameters
auxiliaryexahype2.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__().

Here is the caller graph for this function:

◆ add_pde_term()

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 (

See also
PDETerm.Generator.generate_declaration()), never both. To get both variants of the same conceptual operation (e.g. a stateless flux for GPU kernels and a stateful one for everything else), add the term twice - once with stateless=True, once without - which is why terms are keyed by (name, stateless) rather than by name alone.

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().

Here is the caller graph for this function:

◆ add_plotter()

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.

Parameters
plotterexahype2.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().

Here is the caller graph for this function:

◆ add_solver_constants()

exahype2.api.Solver.Solver.add_solver_constants ( self,
str datastring )

Definition at line 851 of file Solver.py.

References _solver_constants.

◆ add_user_solver_includes()

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().

Here is the caller graph for this function:

◆ auxiliary_variable_offset()

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.

◆ auxiliary_variables()

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().

Here is the caller graph for this function:

◆ create_readme_descriptor()

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.

Definition at line 1123 of file Solver.py.

◆ generate_solver_realisation()

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.

Parameters
add_global_tasksbool Passed on to the numerical scheme,
See also
Solver.NumericalScheme.construct_output(). A host that realises several solvers into graphs of their own and concatenates them (Coupling different solvers) passes False, i.e. the solver is realised as an intermediate step. The host then wraps the concatenated graph. Without the global tasks, the solver does not contribute to the mesh adaptation phase either: The host constructs it.
Returns
peano4.api.taskgraph.Graph

Reimplemented in exagrype.api.CCZ4SolverBase.CCZ4SolverBase, and exagrype.api.euler.Euler.Euler.

Definition at line 1130 of file Solver.py.

◆ get_name_of_global_instance()

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().

Here is the caller graph for this function:

◆ get_name_of_solver_class()

str exahype2.api.Solver.Solver.get_name_of_solver_class ( self)

◆ get_pde_term()

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.

◆ name()

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().

Here is the caller graph for this function:

◆ number_of_auxiliary_variables()

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.

◆ numerical_scheme() [1/2]

◆ numerical_scheme() [2/2]

exahype2.api.Solver.Solver.numerical_scheme ( self,
"Solver.NumericalScheme" value )

◆ pde_terms()

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,

See also
add_pde_term() - since each generates a different C++ method. Read-only - use add_pde_term() to add one and remove_pde_term() to take one away again.

Definition at line 886 of file Solver.py.

References _pde_terms.

◆ plotter() [1/2]

"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.

◆ plotter() [2/2]

exahype2.api.Solver.Solver.plotter ( self,
"Solver.Plotter" value )

Definition at line 744 of file Solver.py.

References _plotters, and add_plotter().

Here is the call graph for this function:

◆ plotters()

List["Solver.Plotter"] exahype2.api.Solver.Solver.plotters ( self)

All plotters of the solver, in the order they have been added.

Definition at line 673 of file Solver.py.

References _plotters.

◆ remove_pde_term()

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.

◆ requires_user_class()

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 (

See also
exahype2.api.SolverToCPPFiles). Otherwise, Abstract<SolverName> is complete and the solver repository instantiates it directly. Stateless terms always carry an implementation (
PDETerm), so they never require one.

Definition at line 897 of file Solver.py.

Referenced by get_name_of_solver_class().

Here is the caller graph for this function:

◆ set_solver_constants()

exahype2.api.Solver.Solver.set_solver_constants ( self,
str datastring )

Definition at line 848 of file Solver.py.

References _solver_constants.

◆ signature_of()

str exahype2.api.Solver.Solver.signature_of ( self,
PDETerm term )

The signature of a PDE term including the pointers to the auxiliary variables.

Definition at line 811 of file Solver.py.

◆ unknowns()

int exahype2.api.Solver.Solver.unknowns ( self)

Definition at line 750 of file Solver.py.

References _unknowns.

◆ user_solver_includes()

str exahype2.api.Solver.Solver.user_solver_includes ( self)

◆ variable_names_per_entry()

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.

Field Documentation

◆ _abstract_solver_attributes

list exahype2.api.Solver.Solver._abstract_solver_attributes = []
protected

◆ _abstract_solver_methods

list exahype2.api.Solver.Solver._abstract_solver_methods = []
protected

◆ _auxiliary_variables

exahype2.api.Solver.Solver._auxiliary_variables = []
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.

Parameters
auxiliaryexahype2.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().

◆ _name

exahype2.api.Solver.Solver._name = name
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.

Parameters
add_global_tasksbool Passed on to the numerical scheme,
See also
Solver.NumericalScheme.construct_output(). A host that realises several solvers into graphs of their own and concatenates them (Coupling different solvers) passes False, i.e. the solver is realised as an intermediate step. The host then wraps the concatenated graph. Without the global tasks, the solver does not contribute to the mesh adaptation phase either: The host constructs it.
Returns
peano4.api.taskgraph.Graph

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().

◆ _numerical_scheme

exahype2.api.Solver.Solver._numerical_scheme = None
protected

Definition at line 584 of file Solver.py.

Referenced by numerical_scheme(), and numerical_scheme().

◆ _pde_terms

dict exahype2.api.Solver.Solver._pde_terms = {}
protected

Definition at line 561 of file Solver.py.

Referenced by add_pde_term(), get_pde_term(), pde_terms(), and remove_pde_term().

◆ _plotters

exahype2.api.Solver.Solver._plotters = []
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.

Parameters
add_global_tasksbool Passed on to the numerical scheme,
See also
Solver.NumericalScheme.construct_output(). A host that realises several solvers into graphs of their own and concatenates them (Coupling different solvers) passes False, i.e. the solver is realised as an intermediate step. The host then wraps the concatenated graph. Without the global tasks, the solver does not contribute to the mesh adaptation phase either: The host constructs it.
Returns
peano4.api.taskgraph.Graph

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().

◆ _solver_constants

◆ _unknowns

◆ _user_solver_includes

◆ _variable_positions

dict exahype2.api.Solver.Solver._variable_positions = {}
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().

◆ compute_kernel_call

str exahype2.api.Solver.Solver.compute_kernel_call = None

Definition at line 615 of file Solver.py.

◆ grid_construction

exahype2.api.Solver.Solver.grid_construction = None

Definition at line 591 of file Solver.py.

Referenced by plot_celldepth_benchmarks.BenchmarkData._read_logfile().

◆ grid_selector

tuple exahype2.api.Solver.Solver.grid_selector

◆ IntermediateSolutionUpdateTag

str exahype2.api.Solver.Solver.IntermediateSolutionUpdateTag = "exahype2.api.Solver.IntermediateSolutionUpdateTag"
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.

Definition at line 513 of file Solver.py.

◆ mesh_adaptation

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.

Parameters
add_global_tasksbool Passed on to the numerical scheme,
See also
Solver.NumericalScheme.construct_output(). A host that realises several solvers into graphs of their own and concatenates them (Coupling different solvers) passes False, i.e. the solver is realised as an intermediate step. The host then wraps the concatenated graph. Without the global tasks, the solver does not contribute to the mesh adaptation phase either: The host constructs it.
Returns
peano4.api.taskgraph.Graph

Definition at line 602 of file Solver.py.

◆ pde_terms

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 (

See also
exahype2.api.SolverToCPPFiles). Otherwise, Abstract<SolverName> is complete and the solver repository instantiates it directly. Stateless terms always carry an implementation (
PDETerm), so they never require one.

Definition at line 907 of file Solver.py.

Referenced by exagrype.api.CCZ4SolverBase.CCZ4SolverBase._register_non_conservative_product().

◆ SolutionUpdateTaskTag

str exahype2.api.Solver.Solver.SolutionUpdateTaskTag = "exahype2.api.Solver.SolutionUpdateTaskTag"
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:

task.tags.add(Solver.SolutionUpdateTaskTag)

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).

Definition at line 504 of file Solver.py.

◆ solver_generator

exahype2.api.Solver.Solver.solver_generator = SolverToCPPFiles(self)

Definition at line 579 of file Solver.py.


The documentation for this class was generated from the following file: