|
Peano
|
Reconstructs the first derivatives which exagrype.api.FOSOCCZ4Solver needs. More...


Data Structures | |
| class | NoGridConstruction |
| The reconstruction solver builds no mesh. More... | |
Public Member Functions | |
| __init__ (self, str name, "FOSOCCZ4Solver" ccz4) | |
| str | task_graph_title_suffix (self) |
| partner_task_names (self, int stage) | |
| Names of the tasks of the CCZ4 solver which the reconstruction of a stage interacts with. | |
| create_task_graph (self, exahype2_project, peano_project, int stage, int number_of_stages) | |
| Create the chain of reconstruction tasks of one stage. | |
| 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. | |
| Public Member Functions inherited from exahype2.api.Solver.Solver | |
| __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. | |
| 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 | |
| ccz4 = ccz4 | |
| Data Fields inherited from exahype2.api.Solver.Solver | |
| 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. | |
Protected Member Functions | |
| _forward_time_stamps_and_time_step_sizes (self) | |
| The solver does not time step. | |
| _layout (self) | |
| Validate the scheme of the CCZ4 solver and return how to reconstruct. | |
| Protected Member Functions inherited from exahype2.api.Solver.Solver | |
| 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 | |
| tuple | _scratch_halos = None |
| Protected Attributes inherited from exahype2.api.Solver.Solver | |
| 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. | |
Additional Inherited Members | |
| Static Public Attributes inherited from exahype2.api.Solver.Solver | |
| 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. | |
Reconstructs the first derivatives which exagrype.api.FOSOCCZ4Solver needs.
The solver is the second partner in the ping-pong of the first-/second-order reconstructed CCZ4 formulation (First-order second-order CCZ4). Where the CCZ4 solver sees 25 unknowns and 33 auxiliary variables (the derivatives), the reconstruction solver sees the same 58 entries the other way round: its 33 unknowns are the derivatives, and its 25 auxiliary variables are the unknowns of the CCZ4 solver. Nothing is copied: the derivatives are the very patch that the CCZ4 solver holds as auxiliary variables "Derivatives", and the reconstruction reads the CCZ4 solver's patch.
It is a real exahype2.api.Solver (it has a solver class and a global instance in the solver repository), yet it is much simpler than a normal solver:
Users do not create the solver themselves: exagrype.api.FOSOSolver creates it and realises it right after the CCZ4 solver. The solver has no numerical scheme of its own: the scheme of the host builds the CCZ4 solver's graph and asks this solver for its graph per stage (create_task_graph()). The reconstruction has to be realised after the CCZ4 solver, as it uses its data.
For each stage of the Runge-Kutta scheme of the CCZ4 solver (once for FV), the solver creates a chain of tasks in a task graph of its own:
The graph has no dependencies between stages. The host concatenates the graph with the one of the CCZ4 solver (exagrype.api.FOSOSolver._couple()): The first tasks of a stage wait for what the CCZ4 solver's interpolation of the derivatives in this stage waited for, and the interpolation of the primary variables additionally waits for the CCZ4 solver's interpolation of the unknowns (both write the same faces). The chain is a block between the CCZ4 solver's interpolation of the unknowns and the rest of the stage: The CCZ4 solver's interpolation of the derivatives (and thus the reconstruction of their halos) and its reconstruction of the unknowns wait for the last task. In terms of Coupling different solvers, this is a multiplicative coupling, with the coupling repeated per stage.
Definition at line 14 of file FOSOReconstructionSolver.py.
| exagrype.api.FOSOReconstructionSolver.FOSOReconstructionSolver.__init__ | ( | self, | |
| str | name, | ||
| "FOSOCCZ4Solver" | ccz4 ) |
| name | str Name of the solver, |
| ccz4 | exagrype.api.FOSOCCZ4Solver The CCZ4 solver whose derivatives this solver reconstructs. |
Definition at line 109 of file FOSOReconstructionSolver.py.
|
protected |
The solver does not time step.
It therefore hands out what the CCZ4 solver hands out. Otherwise, the global minimum and maximum which the solver repository evaluates over all solvers would be spoilt.
Definition at line 136 of file FOSOReconstructionSolver.py.
References exahype2.api.Solver.Solver.add_abstract_solver_method().

|
protected |
Validate the scheme of the CCZ4 solver and return how to reconstruct.
Definition at line 160 of file FOSOReconstructionSolver.py.
Referenced by create_task_graph(), and partner_task_names().

| str exagrype.api.FOSOReconstructionSolver.FOSOReconstructionSolver.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 from exahype2.api.Solver.Solver.
Definition at line 462 of file FOSOReconstructionSolver.py.
| exagrype.api.FOSOReconstructionSolver.FOSOReconstructionSolver.create_task_graph | ( | self, | |
| exahype2_project, | |||
| peano_project, | |||
| int | stage, | ||
| int | number_of_stages ) |
Create the chain of reconstruction tasks of one stage.
The CCZ4 solver has to be realised before, as the routine needs its data. The graph holds one chain of tasks, without any dependency on the CCZ4 solver's tasks. Its sources are the two interpolation tasks, its only sink the roll over. The host (exagrype.api.FOSOSolver) wires the chain into the stage of the CCZ4 solver.
| exahype2_project | exahype2.api.Project The project that hosts the solvers (unused). |
| peano_project | peano4.api.Project The Peano project that the exahype2 project assembles. |
| stage | int Stage of the Runge-Kutta scheme of the CCZ4 solver, 0 for Finite Volumes. |
| number_of_stages | int Number of stages (unused). |
Definition at line 235 of file FOSOReconstructionSolver.py.
References _layout(), _scratch_halos, exagrype.api.euler.CCZ4WithEuler_OuterAdditiveCoupling.CCZ4WithEuler_OuterAdditiveCoupling.ccz4, exagrype.api.euler.CCZ4WithEuler_OuterMultiplicativeCoupling.CCZ4WithEuler_OuterMultiplicativeCoupling.ccz4, ccz4, convert::data::Variable.name, dastgen2.attributes.Attribute.Attribute.name(), dastgen2.DataModel.DataModel.name(), exagrype.api.euler.CCZ4WithEuler_OuterAdditiveCoupling.CCZ4WithEuler_OuterAdditiveCoupling.name, exagrype.api.euler.CCZ4WithEuler_OuterAdditiveCoupling.CCZ4WithEuler_OuterAdditiveCoupling.name(), exagrype.api.euler.CCZ4WithEuler_OuterMultiplicativeCoupling.CCZ4WithEuler_OuterMultiplicativeCoupling.name, exagrype.api.euler.CCZ4WithEuler_OuterMultiplicativeCoupling.CCZ4WithEuler_OuterMultiplicativeCoupling.name(), exagrype.api.FOSOSolver.FOSOSolver.name, exagrype.api.FOSOSolver.FOSOSolver.name(), exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling.CCZ4WithScalarField_InnerCoupling.name, exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling.CCZ4WithScalarField_InnerCoupling.name(), exagrype.api.scalarfield.CCZ4WithScalarField_OuterMultiplicativeCoupling.CCZ4WithScalarField_OuterMultiplicativeCoupling.name, exagrype.api.scalarfield.CCZ4WithScalarField_OuterMultiplicativeCoupling.CCZ4WithScalarField_OuterMultiplicativeCoupling.name(), exahype2.api.AuxiliaryVariables.AuxiliaryVariables.name(), exahype2.api.dslhype2.AbstractSyntaxTree.Argument.name, exahype2.api.dslhype2.AbstractSyntaxTree.Function.name, exahype2.api.dslhype2.AbstractSyntaxTree.FunctionCall.name, exahype2.api.dslhype2.Expressions.Variable.name, exahype2.api.dslhype2.Types.TFunction.name, exahype2.api.dslhype2.Types.TStruct.name, exahype2.api.PDETerm.PDETerm.name, exahype2.api.Solver.Solver.name(), exahype2.api.Solver.Solver.Plotter.name, exaparty.api.particle.AlgorithmStep.AlgorithmStep.name, peano4.api.datamodel.DoF.DoF.name, peano4.api.solversteps.Step.Step.name, peano4.api.solversteps.UserActionSet.UserActionSet.name, peano4.api.taskgraph.compiler.fuse-steps-illustrations._IllustrationActionSet.name, peano4.api.taskgraph.compiler.fuse-steps-illustrations._IllustrationSubmodel.name, peano4.api.taskgraph.Task.Task.name, peano4.api.toolbox.particles.Particle.Particle.name, solvers.aderdg.kernels.Gemms.Gemms.name, test_derive_load_store_compute_flag._FakeSubmodel.name, test_fuse_steps._FakeActionSet.name, test_fuse_steps._FakeSubmodel.name, test_propagate_use_statements._FakeSubmodel.name, and test_task_groups._FakeActionSet.name.

| exagrype.api.FOSOReconstructionSolver.FOSOReconstructionSolver.partner_task_names | ( | self, | |
| int | stage ) |
Names of the tasks of the CCZ4 solver which the reconstruction of a stage interacts with.
| stage | int Stage of the Runge-Kutta scheme, 0 for Finite Volumes. |
Definition at line 211 of file FOSOReconstructionSolver.py.
References _layout(), exagrype.api.euler.CCZ4WithEuler_OuterAdditiveCoupling.CCZ4WithEuler_OuterAdditiveCoupling.ccz4, exagrype.api.euler.CCZ4WithEuler_OuterMultiplicativeCoupling.CCZ4WithEuler_OuterMultiplicativeCoupling.ccz4, and ccz4.

| str exagrype.api.FOSOReconstructionSolver.FOSOReconstructionSolver.task_graph_title_suffix | ( | self | ) |
Definition at line 133 of file FOSOReconstructionSolver.py.
|
protected |
Definition at line 127 of file FOSOReconstructionSolver.py.
Referenced by create_task_graph().
| exagrype.api.FOSOReconstructionSolver.FOSOReconstructionSolver.ccz4 = ccz4 |
Definition at line 124 of file FOSOReconstructionSolver.py.
Referenced by create_task_graph(), exagrype.api.FOSOSolver.FOSOSolver.numerical_scheme(), partner_task_names(), exagrype.api.FOSOSolver.FOSOSolver.solvers(), exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling.CCZ4WithScalarField_InnerCoupling.solvers(), and exagrype.api.scalarfield.CCZ4WithScalarField_OuterMultiplicativeCoupling.CCZ4WithScalarField_OuterMultiplicativeCoupling.solvers().