|
Peano
|
Numerical scheme of the coupled solver exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling. More...


Public Member Functions | |
| __init__ (self, int patch_size) | |
| attach_to (self, host) | |
| Install the numerical schemes of the building blocks on the solvers of the host. | |
| construct_output (self, exahype2_project, peano_project, setup_simulation, time_step, plot, mesh_adaptation) | |
| Build the task graph of the coupled system, and add it to time_step. | |
Data Fields | |
| patch_size = patch_size | |
Static Public Attributes | |
| bool | MULTIPLICATIVE = False |
| str | COPY_TASK_NAME = "Copy CCZ4 fields into {} stage {}" |
| str | SYNCHRONISE_TASK_NAME = "Synchronise time step sizes" |
Protected Member Functions | |
| _create_scheme (self, solver) | |
| The numerical scheme of one of the solvers, i.e. | |
| int | _number_of_stages (self) |
| Number of stages of the time integrator. | |
| _stage_input (self, solver, stage) | |
| The patch which a solver's stage reads as input (it holds the solver's unknowns of the stage's time level). | |
| _end_of_stage (self, solver, graph, stage) | |
| The tasks of a solver's graph that end a stage. | |
Static Protected Member Functions | |
| _first_tasks (graph, previous_end) | |
| The tasks of a solver's graph that start a stage. | |
Protected Attributes | |
| _host = None | |
| Install the numerical schemes of the building blocks on the solvers of the host. | |
| dict | _schemes = {} |
| Install the numerical schemes of the building blocks on the solvers of the host. | |
Numerical scheme of the coupled solver exagrype.api.scalarfield.CCZ4WithScalarField_InnerCoupling.
The generator builds the task graph of the whole combination of CCZ4 and the scalar field. The scheme-specific parts are the numerical schemes of the two solvers (_create_scheme()) and what a stage of the time integrator is (_number_of_stages(), _stage_input(), _end_of_stage()). The four concrete generators only provide these. Whether the coupling is multiplicative or additive is the class attribute MULTIPLICATIVE.
attach_to() installs a numerical scheme on each solver. The schemes are building blocks: they create the data and the kernels of their solver, and the tasks of its stages. The generator's construct_output() then
The scalar field sees the CCZ4 data of the very time level of its own stage in both flavours. This is what keeps the order of the time integrator: if the scalar field saw the outcome of CCZ4's stage, its Runge-Kutta scheme would see the spacetime at the wrong time level. Hence, the data of the two flavours are the same for a one-directional coupling, and they differ in the schedule only.
Definition at line 14 of file InnerCouplingGenerator.py.
| exagrype.api.scalarfield.InnerCouplingGenerator.InnerCouplingGenerator.__init__ | ( | self, | |
| int | patch_size ) |
| patch_size | int Number of grid cells (volumes) per patch and axis. The same for both solvers. |
Definition at line 59 of file InnerCouplingGenerator.py.
|
protected |
The numerical scheme of one of the solvers, i.e.
a building block of the whole scheme
Reimplemented in exagrype.api.scalarfield.FiniteVolumesInnerCoupling._FiniteVolumes, and exagrype.api.scalarfield.RungeKuttaFD4InnerCoupling._RungeKuttaFD4.
Definition at line 199 of file InnerCouplingGenerator.py.
Referenced by attach_to().

|
protected |
The tasks of a solver's graph that end a stage.
Global tasks do not count.
Reimplemented in exagrype.api.scalarfield.FiniteVolumesInnerCoupling._FiniteVolumes, and exagrype.api.scalarfield.RungeKuttaFD4InnerCoupling._RungeKuttaFD4.
Definition at line 211 of file InnerCouplingGenerator.py.
Referenced by construct_output().

|
staticprotected |
The tasks of a solver's graph that start a stage.
| graph | peano4.api.taskgraph.Graph The graph of one solver. |
| previous_end | List[peano4.api.taskgraph.Task] The tasks that end the previous stage, empty for the first stage. The first tasks are the sources of the graph in that case, and otherwise all tasks that wait for one of previous_end. |
Definition at line 176 of file InnerCouplingGenerator.py.
Referenced by construct_output().

|
protected |
Number of stages of the time integrator.
Reimplemented in exagrype.api.scalarfield.FiniteVolumesInnerCoupling._FiniteVolumes, and exagrype.api.scalarfield.RungeKuttaFD4InnerCoupling._RungeKuttaFD4.
Definition at line 203 of file InnerCouplingGenerator.py.
Referenced by construct_output().

|
protected |
The patch which a solver's stage reads as input (it holds the solver's unknowns of the stage's time level).
Reimplemented in exagrype.api.scalarfield.FiniteVolumesInnerCoupling._FiniteVolumes, and exagrype.api.scalarfield.RungeKuttaFD4InnerCoupling._RungeKuttaFD4.
Definition at line 207 of file InnerCouplingGenerator.py.
Referenced by construct_output(), and exagrype.api.CCZ4SolverBase.CCZ4SolverBase.generate_solver_realisation().

| exagrype.api.scalarfield.InnerCouplingGenerator.InnerCouplingGenerator.attach_to | ( | self, | |
| host ) |
Install the numerical schemes of the building blocks on the solvers of the host.
The host calls it when the user assigns the generator to its numerical_scheme.
Definition at line 70 of file InnerCouplingGenerator.py.
References exagrype.api.scalarfield.FiniteVolumesInnerCoupling._FiniteVolumes._create_scheme(), _create_scheme(), _host, and _schemes.

| exagrype.api.scalarfield.InnerCouplingGenerator.InnerCouplingGenerator.construct_output | ( | self, | |
| exahype2_project, | |||
| peano_project, | |||
| setup_simulation, | |||
| time_step, | |||
| plot, | |||
| mesh_adaptation ) |
Build the task graph of the coupled system, and add it to time_step.
The arguments are those of exahype2.api.Solver.generate_solver_realisation().
Definition at line 83 of file InnerCouplingGenerator.py.
References exagrype.api.scalarfield.FiniteVolumesInnerCoupling._FiniteVolumes._end_of_stage(), _end_of_stage(), _first_tasks(), _host, exagrype.api.scalarfield.FiniteVolumesInnerCoupling._FiniteVolumes._number_of_stages(), _number_of_stages(), _schemes, exagrype.api.scalarfield.FiniteVolumesInnerCoupling._FiniteVolumes._stage_input(), _stage_input(), exagrype.api.scalarfield.CCZ4WithScalarField_OuterMultiplicativeCoupling.CCZ4WithScalarField_OuterMultiplicativeCoupling.COPY_TASK_NAME, COPY_TASK_NAME, exagrype.api.scalarfield.FiniteVolumesInnerCoupling.FiniteVolumesInnerAdditive.MULTIPLICATIVE, exagrype.api.scalarfield.FiniteVolumesInnerCoupling.FiniteVolumesInnerMultiplicative.MULTIPLICATIVE, MULTIPLICATIVE, exagrype.api.euler.CCZ4WithEuler_OuterAdditiveCoupling.CCZ4WithEuler_OuterAdditiveCoupling.SYNCHRONISE_TASK_NAME, exagrype.api.euler.CCZ4WithEuler_OuterMultiplicativeCoupling.CCZ4WithEuler_OuterMultiplicativeCoupling.SYNCHRONISE_TASK_NAME, exagrype.api.scalarfield.CCZ4WithScalarField_OuterMultiplicativeCoupling.CCZ4WithScalarField_OuterMultiplicativeCoupling.SYNCHRONISE_TASK_NAME, and SYNCHRONISE_TASK_NAME.

|
protected |
Install the numerical schemes of the building blocks on the solvers of the host.
The host calls it when the user assigns the generator to its numerical_scheme.
Definition at line 67 of file InnerCouplingGenerator.py.
Referenced by exagrype.api.scalarfield.RungeKuttaFD4InnerCoupling._RungeKuttaFD4._create_scheme(), attach_to(), and construct_output().
|
protected |
Install the numerical schemes of the building blocks on the solvers of the host.
The host calls it when the user assigns the generator to its numerical_scheme.
Definition at line 68 of file InnerCouplingGenerator.py.
Referenced by attach_to(), and construct_output().
|
static |
Definition at line 54 of file InnerCouplingGenerator.py.
Referenced by construct_output().
|
static |
Definition at line 52 of file InnerCouplingGenerator.py.
Referenced by construct_output().
| exagrype.api.scalarfield.InnerCouplingGenerator.InnerCouplingGenerator.patch_size = patch_size |
| patch_size | int Number of grid cells (volumes) per patch and axis. The same for both solvers. |
Definition at line 66 of file InnerCouplingGenerator.py.
Referenced by exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEuler.__add_data_to_repository(), exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta.__add_data_to_repository(), exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEuler.__create_data_structures(), exahype2.api.fv.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler.__create_data_structures(), exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta.__create_data_structures(), exahype2.api.fv.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler.construct_output(), exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.get_body_of_operation(), and exahype2.api.fv.actionsets.InsertPatchInterior.InsertPatchInterior.get_body_of_operation().
|
static |
Definition at line 56 of file InnerCouplingGenerator.py.
Referenced by construct_output().