|
Peano
|
Setup phase counterpart to RusanovWithExplicitEuler: sets the initial condition for a Finite Volume scheme with a Rusanov Riemann solver, realised over a block-structured mesh, and prepares the data required for the first time step. More...


Public Member Functions | |
| __init__ (self, Solver solver, float volume_size) | |
| construct_output (self, exahype2_project, peano_project, setup_simulation) | |
| Create the actual sequence of tasks following the description from Adding a numerical scheme, as grid construction, numerical scheme, but also plotting all follow the same pattern of tasks and dependencies. | |
| Public Member Functions inherited from exahype2.api.Solver.Solver.GridConstruction | |
| __init__ (self, "Solver" solver) | |
Data Fields | |
| volume_size = volume_size | |
Static Public Attributes | |
| str | FinishedInitialRegularMeshSetup = "exahype2.api.fv.SetupSimulationOverRegularGrid.FinishedInitialRegularMeshSetup" |
| Tag of the task which completes the setup over the initial regular mesh. | |
Protected Member Functions | |
| _construct_task_graph (self, exahype2_project, peano_project, setup_simulation) | |
| Add the tasks of the setup over a regular mesh to setup_simulation. | |
| _report_task_graph (self, setup_simulation) | |
| Visualise or log the setup task graph, depending on the logger's verbosity. | |
Additional Inherited Members | |
| Protected Attributes inherited from exahype2.api.Solver.Solver.GridConstruction | |
| _solver = solver | |
Setup phase counterpart to RusanovWithExplicitEuler: sets the initial condition for a Finite Volume scheme with a Rusanov Riemann solver, realised over a block-structured mesh, and prepares the data required for the first time step.
Unlike SetupSimulationWithUserCodedRefinementCriterion, this variant does not refine the mesh at all: it assumes the mesh is already the regular grid it is going to stay, so setup only has to fill in the initial condition and project it onto the faces.
The solver this is attached to has to have an exahype2.api.InitPointWisely PDE term registered (via solver.add_pde_term(...)), as that is what fills in the initial condition this class' setup task graph relies on; construct_output() asserts this before it builds anything.
Definition at line 16 of file SetupSimulationOverRegularGrid.py.
| exahype2.api.fv.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid.__init__ | ( | self, | |
| Solver | solver, | ||
| float | volume_size ) |
| volume_size | float Maximum edge length of one Finite Volume. Every mesh cell hosts one patch of patch_size volumes per axis. The setup refines every cell whose edge length is greater than or equal to volume_size times the patch size (peano4.api.actionsets.ConstructRegularGrid), i.e. the resulting volumes are strictly smaller than volume_size. If you want volumes of exactly 1/27 with patches of size 9, pass in a value slightly bigger than 1/27: 1/27 itself yields cells of size 1/9 and hence volumes of size 1/81. |
Definition at line 50 of file SetupSimulationOverRegularGrid.py.
References __init__().
Referenced by __init__().


|
protected |
Add the tasks of the setup over a regular mesh to setup_simulation.
The initial condition task carries the tag FinishedInitialRegularMeshSetup.
Definition at line 88 of file SetupSimulationOverRegularGrid.py.
References exagrype.api.FD4WithKODissipation.FD4WithKODissipation._solver, exahype2.api.blockstructured.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._solver, exahype2.api.blockstructured.ConsumeRefinementRequests.ConsumeRefinementRequests._solver, exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement._solver, exahype2.api.blockstructured.LoadCheckpoint._LoadPatchesFromCheckpoint._solver, exahype2.api.blockstructured.LoadCheckpoint.LoadCheckpoint._solver, exahype2.api.fv.actionsets.AbstractFVActionSet.AbstractFVActionSet._solver, exahype2.api.fv.actionsets.ApplyDirichletBoundaryConditions.ApplyDirichletBoundaryConditions._solver, exahype2.api.fv.actionsets.DiscardPatchInterior.DiscardPatchInterior._solver, exahype2.api.fv.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._solver, exahype2.api.fv.PlotAsVTKFile.PlotAsVTKFile._solver, exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEuler._solver, exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEulerGenerator._solver, exahype2.api.fv.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler._solver, _solver, FinishedInitialRegularMeshSetup, and volume_size.
Referenced by construct_output(), and exahype2.api.fv.SetupSimulationWithUserCodedRefinementCriterion.SetupSimulationWithUserCodedRefinementCriterion.construct_output().

|
protected |
Visualise or log the setup task graph, depending on the logger's verbosity.
Definition at line 218 of file SetupSimulationOverRegularGrid.py.
References exagrype.api.FD4WithKODissipation.FD4WithKODissipation._solver, exahype2.api.blockstructured.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._solver, exahype2.api.blockstructured.ConsumeRefinementRequests.ConsumeRefinementRequests._solver, exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement._solver, exahype2.api.blockstructured.LoadCheckpoint._LoadPatchesFromCheckpoint._solver, exahype2.api.blockstructured.LoadCheckpoint.LoadCheckpoint._solver, exahype2.api.fv.actionsets.AbstractFVActionSet.AbstractFVActionSet._solver, exahype2.api.fv.actionsets.ApplyDirichletBoundaryConditions.ApplyDirichletBoundaryConditions._solver, exahype2.api.fv.actionsets.DiscardPatchInterior.DiscardPatchInterior._solver, exahype2.api.fv.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._solver, exahype2.api.fv.PlotAsVTKFile.PlotAsVTKFile._solver, exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEuler._solver, exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEulerGenerator._solver, exahype2.api.fv.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler._solver, and _solver.
Referenced by construct_output().

| exahype2.api.fv.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid.construct_output | ( | self, | |
| exahype2_project, | |||
| peano_project, | |||
| setup_simulation ) |
Create the actual sequence of tasks following the description from Adding a numerical scheme, as grid construction, numerical scheme, but also plotting all follow the same pattern of tasks and dependencies.
The routine first builds the task graph through _construct_task_graph() and then reports it through _report_task_graph().
Reimplemented from exahype2.api.Solver.Solver.GridConstruction.
Reimplemented in exahype2.api.fv.SetupSimulationWithUserCodedRefinementCriterion.SetupSimulationWithUserCodedRefinementCriterion.
Definition at line 69 of file SetupSimulationOverRegularGrid.py.
References _construct_task_graph(), and _report_task_graph().

|
static |
Tag of the task which completes the setup over the initial regular mesh.
The setup constructs the regular mesh and then sets the initial condition. The initial condition task carries this tag. After it, the mesh and the solution are complete, but the solution has not yet been projected onto the faces, as the projection is the very last task of the setup. Subclasses which want to modify the mesh or the solution before the time stepping starts search for the tag via peano4.api.taskgraph.Graph.find_tasks() and insert their tasks after the tagged one via peano4.api.taskgraph.Graph.insert_after(). The tasks which have followed the tagged task so far, i.e. the projection, then follow the inserted tasks (exahype2.api.fv.SetupSimulationWithUserCodedRefinementCriterion).
Definition at line 48 of file SetupSimulationOverRegularGrid.py.
Referenced by _construct_task_graph().
| exahype2.api.fv.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid.volume_size = volume_size |
Definition at line 65 of file SetupSimulationOverRegularGrid.py.
Referenced by _construct_task_graph(), exahype2.api.fv.SetupSimulationWithUserCodedRefinementCriterion.SetupSimulationWithUserCodedRefinementCriterion._create_adapt_mesh_task(), and exahype2.api.rkfd4.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid.construct_output().