Peano
Loading...
Searching...
No Matches
exagrype.api.FOSOSolver.FOSOSolver Class Reference

CCZ4 in the first-/second-order reconstructed formulation as a coupled pair. More...

Public Member Functions

 __init__ (self, str name, Dict[str, Union[int, float]] parameters=None, exahype2.api.InitPointWisely initial_condition=None, str reconstruction_name=None)
str name (self)
 solvers (self)
 The solvers in the order of their realisation: CCZ4 first, as the reconstruction needs its data.
exahype2.api.Solver.NumericalScheme numerical_scheme (self)
 The scheme of ccz4.
 numerical_scheme (self, exahype2.api.Solver.NumericalScheme value)
 generate_solver_realisation (self, exahype2_project, peano_project, setup_simulation, time_step, plot, mesh_adaptation)
 Realise both solvers, couple their time stepping graphs, and add the outcome to the project's graphs.

Data Fields

 ccz4 = FOSOCCZ4Solver(name, parameters, initial_condition)
 reconstruction
 name
 solvers

Protected Member Functions

 _couple (self, exahype2_project, peano_project, time_step)
 Let each stage of the CCZ4 solver use the freshly reconstructed derivatives.

Protected Attributes

str _name = name
 _numerical_scheme = None

Detailed Description

CCZ4 in the first-/second-order reconstructed formulation as a coupled pair.

The object hosts two solvers, which take turns in the time stepping task graph (First-order second-order CCZ4, Coupling different solvers):

  • ccz4 (exagrype.api.FOSOCCZ4Solver) evolves the 25 primary unknowns of CCZ4. It holds the 33 derivatives as auxiliary variables. It is the the one which owns the global tasks: Both solvers are realised as intermediate steps, and after concatenation and coupling, the host wraps the whole graph into the load balancing and dynamic mesh refinement tasks through the scheme of ccz4 (wrap_task_graph_in_load_balancing_and_amr_tasks()).
  • reconstruction (exagrype.api.FOSOReconstructionSolver) evolves the derivatives, i.e. it recomputes them from the primary unknowns in front of each Runge-Kutta stage of ccz4.

The host holds the numerical scheme: Build it for ccz4 and assign it to the host. The reconstruction solver receives a scheme that forwards to it. Configure ccz4 otherwise as any other solver (grid construction, plotter, constraint enforcement, ...), and then add the host to the project with exahype2.api.Project.add_solver(). The reconstruction needs no configuration: it takes patch size and halo from the scheme.

solver.numerical_scheme = exahype2.api.rkfd4.CentralDifferencesWithRungeKutta(solver.ccz4, patch_size, rk_order=4, ...)
...
project.add_solver(solver)
CCZ4 in the first-/second-order reconstructed formulation as a coupled pair.
Definition FOSOSolver.py:66
Fourth-order central Finite Differences with explicit Runge-Kutta time stepping, realised over a bloc...

Task graph

Both solvers build a task graph of their own, and report it: the scheme of the host builds the graph of ccz4, and asks the reconstruction solver for its graph once per stage (exagrype.api.FOSOReconstructionSolver.create_task_graph()). The reconstruction solver's graph is a chain per stage (see exagrype.api.FOSOReconstructionSolver), and the chains of different stages are not connected. The host concatenates the graphs and wires them (_couple()): The first tasks of each stage's chain take over the dependencies of the CCZ4 solver's reconstruction of this stage, and the latter depends on the last task of the chain. The host reports the outcome.

Definition at line 66 of file FOSOSolver.py.

Constructor & Destructor Documentation

◆ __init__()

exagrype.api.FOSOSolver.FOSOSolver.__init__ ( self,
str name,
Dict[str, Union[int, float]] parameters = None,
exahype2.api.InitPointWisely initial_condition = None,
str reconstruction_name = None )
Parameters
namestr Name of the CCZ4 solver,
See also
exahype2.api.Solver.
Parameters
parametersDict[str, Union[int, float]] CCZ4 parameters,
See also
exagrype.api.FOSOCCZ4Solver.
Parameters
initial_conditionexahype2.api.InitPointWisely Initial condition,
See also
exagrype.api.FOSOCCZ4Solver.
Parameters
reconstruction_namestr Name of the reconstruction solver. Defaults to name plus "Reconstruction".

Definition at line 113 of file FOSOSolver.py.

Member Function Documentation

◆ _couple()

exagrype.api.FOSOSolver.FOSOSolver._couple ( self,
exahype2_project,
peano_project,
time_step )
protected

Let each stage of the CCZ4 solver use the freshly reconstructed derivatives.

In each stage, the CCZ4 solver interpolates the unknowns and the derivatives onto the hanging faces, reconstructs their halos, and evaluates the right-hand side. The reconstruction solver recomputes the derivatives from the unknowns in between, i.e.

  • the first reconstruction tasks of the stage wait for whatever the CCZ4 solver's interpolation of the derivatives waits for,
  • the interpolation of the primary variables also waits for the CCZ4 solver's interpolation of the unknowns, as both write the same faces, and
  • the CCZ4 solver's interpolation of the derivatives and its reconstruction of the unknowns wait for the last reconstruction task.

The chain is hence a block within the stage: The maximum concurrency of the merged graph does not exceed the one of the two graphs.

Parameters
exahype2_projectexahype2.api.Project The project that hosts the pair (unused).
peano_projectpeano4.api.Project The Peano project that the exahype2 project assembles (unused).
time_steppeano4.api.taskgraph.Graph The concatenated time stepping graphs of both solvers. It receives the dependencies.

Definition at line 223 of file FOSOSolver.py.

References reconstruction.

◆ generate_solver_realisation()

exagrype.api.FOSOSolver.FOSOSolver.generate_solver_realisation ( self,
exahype2_project,
peano_project,
setup_simulation,
time_step,
plot,
mesh_adaptation )

Realise both solvers, couple their time stepping graphs, and add the outcome to the project's graphs.

The arguments are those of exahype2.api.Solver.generate_solver_realisation(). Both solvers are realised without global tasks. The load balancing and the dynamic mesh refinement wrap the coupled time step graph afterwards, through the scheme of CCZ4.

Definition at line 170 of file FOSOSolver.py.

◆ name()

◆ numerical_scheme() [1/2]

exahype2.api.Solver.NumericalScheme exagrype.api.FOSOSolver.FOSOSolver.numerical_scheme ( self)

The scheme of ccz4.

Assigning it hands a forwarding scheme to the reconstruction solver

Definition at line 158 of file FOSOSolver.py.

References _numerical_scheme.

Referenced by exagrype.api.CCZ4SolverBase.CCZ4SolverBase.generate_solver_realisation(), and exagrype.api.CCZ4SolverBase.CCZ4SolverBase.ncp_adds_advection().

Here is the caller graph for this function:

◆ numerical_scheme() [2/2]

◆ solvers()

exagrype.api.FOSOSolver.FOSOSolver.solvers ( self)

Field Documentation

◆ _name

str exagrype.api.FOSOSolver.FOSOSolver._name = name
protected

Definition at line 145 of file FOSOSolver.py.

Referenced by api.Tree.Tree.__str__(), exahype2.api.Solver.Solver.__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(), exahype2.api.Solver.Solver._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(), exahype2.api.AuxiliaryVariables.AuxiliaryVariables.argument_name(), 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(), exahype2.api.AuxiliaryVariables.AuxiliaryVariables.delta_argument_name(), exahype2.api.Solver.Solver.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(), exahype2.api.Solver.Solver.get_name_of_solver_class(), api.solvers.Solver.Solver.name(), name(), exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling.CCZ4WithScalarField_InnerCoupling.name(), exagrype.api.scalarfield.CCZ4WithScalarField_OuterMultiplicativeCoupling.CCZ4WithScalarField_OuterMultiplicativeCoupling.name(), exahype2.api.AuxiliaryVariables.AuxiliaryVariables.name(), exahype2.api.Solver.Solver.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

◆ ccz4

◆ name

exagrype.api.FOSOSolver.FOSOSolver.name

Definition at line 188 of file FOSOSolver.py.

Referenced by solvers.aderdg.kernels.Gemms.Gemms.__init__(), solvers.aderdg.kernels.Gemms.Gemms.__repr__(), test_derive_load_store_compute_flag._FakeSubmodel.__repr__(), test_propagate_use_statements._FakeSubmodel.__repr__(), exaparty.api.particle.ExplicitEulerFixedSearchRadius.ExplicitEulerFixedSearchRadius.__setup_algorithm_steps(), exaparty.api.particle.AlgorithmStep.AlgorithmStep.__str__(), exahype2.api.Solver.Solver.Plotter._add_time_interval_bookkeeping_to_solver(), exaparty.api.particle.Particle.Particle._dependency_checks_modify_steps(), exagrype.api.CCZ4SolverBase.CCZ4SolverBase._insert_constraint_enforcement(), exaparty.api.particle.LeapfrogFixedSearchRadius.LeapfrogFixedSearchRadius._setup_algorithm_steps_dict(), exagrype.api.CCZ4SolverBase.CCZ4SolverBase._tasks_of_this_solver(), peano4.api.datamodel.DoF.DoF.additional_load_and_store_arguments_for_other_dof(), exaparty.api.particle.ExplicitEulerDynamicSearchRadius.ExplicitEulerDynamicSearchRadius.algorithm_steps(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle.algorithm_steps(), exaparty.api.particle.tests.DisappearingParticleTest.DisappearingParticleTest.algorithm_steps(), exaparty.api.particle.tests.testLeapfrogFixedTimeStepSize.testLeapfrogFixedTimeStepSize.algorithm_steps(), exahype2.api.dslhype2.Expressions.Variable.convert_indices_to_integers(), exahype2.api.dslhype2.Expressions.Variable.convert_integers_to_indices(), exahype2.api.Solver.Solver.Plotter.create_finish_call(), exahype2.api.Solver.Solver.Plotter.create_is_active_predicate(), exagrype.api.FOSOReconstructionSolver.FOSOReconstructionSolver.create_task_graph(), peano4.api.solversteps.UserActionSet.UserActionSet.get_action_set_name(), peano4.api.taskgraph.compiler.fuse-steps-illustrations._IllustrationActionSet.get_action_set_name(), test_fuse_steps._FakeActionSet.get_action_set_name(), peano4.api.datamodel.DoF.DoF.get_full_qualified_type(), peano4.api.datamodel.DoF.DoF.get_logical_type_name(), exahype2.api.dslhype2.Expressions.Variable.get_name(), peano4.api.solversteps.Step.Step.get_observer_class_name(), dastgen2.attributes.Enumeration.Enumeration.get_to_string(), exahype2.api.dslhype2.Expressions.Variable.get_type(), exahype2.api.dslhype2.Expressions.Variable.get_value(), and exaparty.api.particle.Particle.Particle.readme_descriptor().

◆ reconstruction

exagrype.api.FOSOSolver.FOSOSolver.reconstruction
Initial value:
= FOSOReconstructionSolver(
reconstruction_name
if reconstruction_name is not None
else name + "Reconstruction",
self.ccz4,
)

Definition at line 138 of file FOSOSolver.py.

Referenced by _couple(), numerical_scheme(), and solvers().

◆ solvers

exagrype.api.FOSOSolver.FOSOSolver.solvers

Definition at line 194 of file FOSOSolver.py.


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