Peano
Loading...
Searching...
No Matches
exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement Class Reference

Evaluate the point-wise refinement criterion and collect the outcome as refine and erase requests. More...

Inheritance diagram for exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement:
Collaboration diagram for exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement:

Public Member Functions

 __init__ (self, solver, int patch_size, str guard, float min_volume_size=None, float max_volume_size=None, int event_lifetime=2, bool hand_events_to_peano=False, bool veto_erase=False)
 
str get_volume_evaluation (self)
 C++ Jinja2 template evaluating the criterion within one volume.
 
 get_body_of_operation (self, operation_name)
 Return actual C++ code snippets to be inserted into C++ code.
 
 get_guard_of_operation (self, operation_name)
 Return the guard of an operation.
 
 get_body_of_unprepareTraversal (self)
 Commit the new events once per rank and mesh sweep, after all trees have merged their local events into the service.
 
 get_body_of_createGridControlEventsForNextTraversal (self)
 Return the grid control events that this action set wants to trigger.
 
 get_attributes (self)
 Return attributes as copied and pasted into the generated class.
 
 get_action_set_name (self)
 Return unique action set name.
 
 user_should_modify_template (self)
 Is the user allowed to modify the output.
 
 get_includes (self)
 Return include statements that you need.
 
- Public Member Functions inherited from peano4.api.solversteps.ActionSet.ActionSet
 get_constructor_body (self)
 Define a tailored constructor body.
 
 get_static_initialisations (self, full_qualified_classname)
 
 get_destructor_body (self)
 
 get_implementation_of_createGridControlEventsForNextTraversal (self)
 Return the C++ implementation of createGridControlEventsForNextTraversal()
 
 get_body_of_prepareTraversal (self)
 
 get_implementation_of_prepareTraversal (self)
 Return the C++ implementation of prepareTraversal()
 
 get_implementation_of_unprepareTraversal (self)
 Return the C++ implementation of unprepareTraversal()
 
 get_implementation_of_operation (self, operation_name)
 Return the C++ implementation of an operation.
 
bool may_run_in_background_task (self)
 May a task graph compiler move touchCellFirstTime() into a task.
 

Data Fields

 patch_size
 
 guard
 
 event_lifetime
 
 min_volume_size
 
 max_volume_size
 
 hand_events_to_peano
 
 veto_erase
 
- Data Fields inherited from peano4.api.solversteps.ActionSet.ActionSet
 descend_invocation_order
 
 parallel
 

Static Public Attributes

str TemplateEvaluateVolume
 Per-volume evaluation of the point-wise criterion.
 
str TemplateEvaluateCriterion
 
- Static Public Attributes inherited from peano4.api.solversteps.ActionSet.ActionSet
int descend_invocation_order = 0
 
bool parallel = False
 
str OPERATION_BEGIN_TRAVERSAL = "beginTraversal"
 
str OPERATION_END_TRAVERSAL = "endTraversal"
 
str OPERATION_CREATE_PERSISTENT_VERTEX = "createPersistentVertex"
 
str OPERATION_DESTROY_PERSISTENT_VERTEX = "destroyPersistentVertex"
 
str OPERATION_CREATE_HANGING_VERTEX = "createHangingVertex"
 
str OPERATION_DESTROY_HANGING_VERTEX = "destroyHangingVertex"
 
str OPERATION_CREATE_PERSISTENT_FACE = "createPersistentFace"
 
str OPERATION_DESTROY_PERSISTENT_FACE = "destroyPersistentFace"
 
str OPERATION_CREATE_HANGING_FACE = "createHangingFace"
 
str OPERATION_DESTROY_HANGING_FACE = "destroyHangingFace"
 
str OPERATION_CREATE_CELL = "createCell"
 
str OPERATION_DESTROY_CELL = "destroyCell"
 
str OPERATION_TOUCH_VERTEX_FIRST_TIME = "touchVertexFirstTime"
 
str OPERATION_TOUCH_VERTEX_LAST_TIME = "touchVertexLastTime"
 
str OPERATION_TOUCH_FACE_FIRST_TIME = "touchFaceFirstTime"
 
str OPERATION_TOUCH_FACE_LAST_TIME = "touchFaceLastTime"
 
str OPERATION_TOUCH_CELL_FIRST_TIME = "touchCellFirstTime"
 
str OPERATION_TOUCH_CELL_LAST_TIME = "touchCellLastTime"
 

Protected Attributes

 _solver
 

Detailed Description

Evaluate the point-wise refinement criterion and collect the outcome as refine and erase requests.

The numerical schemes add this action set to the very last task of their time step if the solver has an exahype2.api.RefineErasePointwisely PDE term (exahype2.api.blockstructured.create_dynamic_mesh_refinement_action_set.create_dynamic_mesh_refinement_action_set()). The action set loops over all volumes of each patch and invokes the term per volume centre. It initialises the term's output with Keep. From the outcomes of all the volumes, it derives one command for the whole cell:

  • If any volume says Refine, the cell asks for a refinement.
  • If all volumes say Erase, the cell asks to be erased, i.e. coarsened.
  • Otherwise, the cell is kept and does not issue any command.

The action set bounds the mesh size. Refine commands are dropped for cells whose volumes are already smaller than min_volume_size. Erase commands are dropped if the volumes of the coarsened cell would not be smaller than max_volume_size. If a bound is None, the mesh size is not constrained. As the action set drops these commands, it does not issue requests which the mesh cannot realise anyway, and the mesh adaptation phase is only triggered if the mesh actually can change. The numerical schemes take the two bounds as constructor arguments and pass them through.

Peano erases the children of a cell only if they all ask for it. Erase commands therefore carry the cell's position within its parent, and the refinement service keeps them only if all 3^d children of a parent have asked to be erased within the same mesh sweep (exahype2::RefinementControlService::keepOnlyCompleteSiblingEraseEvents()). Incomplete sets of erase requests are dropped right away, so they never trigger the mesh adaptation phase.

The action set collects the commands of one tree within a local exahype2::RefinementControl, merges it into the rank's exahype2::RefinementControlService at the end of the traversal, and commits the new events once per rank in unprepareTraversal(). By default, it does not hand any event over to Peano, i.e. the time step itself never changes the mesh. The mesh adaptation phase consumes the requests (exahype2::isMeshAdaptationRequired()). The setup's mesh adaptation (exahype2.api.fv.SetupSimulationWithUserCodedRefinementCriterion) instead lets the action set hand the events over to Peano right away (hand_events_to_peano). It also vetoes all erase commands (veto_erase): The setup has no restriction which would hand the patches of erased cells over to their parent, i.e. a parent would end up with an uninitialised patch. The mesh adaptation phase of the time stepping always restricts (toolbox.blockstructured.api.InterpolateAndRestrictCells).

Subclasses which evaluate a different adaptivity criterion only replace the per-volume evaluation (exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.get_volume_evaluation()), e.g. exahype2.api.blockstructured.DynamicMeshRefinementWithGradients.

The action set works for all block-structured schemes which hold their unknowns as patch_size^d volumes (or grid cells) per mesh cell, i.e. for exahype2.api.fv and exahype2.api.rkfd4.

Definition at line 8 of file DynamicMeshRefinement.py.

Constructor & Destructor Documentation

◆ __init__()

exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.__init__ (   self,
  solver,
int  patch_size,
str  guard,
float   min_volume_size = None,
float   max_volume_size = None,
int   event_lifetime = 2,
bool   hand_events_to_peano = False,
bool   veto_erase = False 
)
Parameters
solverexahype2.api.Solver The solver whose criterion is evaluated.
patch_sizeint Number of volumes per axis within one patch.
guardstr C++ boolean expression, evaluated per cell, guarding whether the criterion is evaluated for that cell.
min_volume_sizefloat A cell asks for a refinement only if its volumes are at least of this size. None does not bound the refinement.
max_volume_sizefloat A cell asks to be erased only if the volumes of the coarser cell are strictly smaller than this size. None does not bound the coarsening.
event_lifetimeint Number of mesh sweeps a refinement or erase event remains alive within the refinement service (exahype2::RefinementControl::addCommand()).
hand_events_to_peanobool Hand the refinement service's committed events over to Peano, so Peano realises them in the subsequent mesh sweeps. The time step leaves this off, the setup's mesh adaptation switches it on.
veto_erasebool Drop all erase commands, i.e. only ever refine. The time step leaves this off, the setup's mesh adaptation switches it on.

Reimplemented from peano4.api.solversteps.ActionSet.ActionSet.

Definition at line 68 of file DynamicMeshRefinement.py.

References exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.__init__().

Referenced by exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.__init__().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ get_action_set_name()

exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.get_action_set_name (   self)

Return unique action set name.

Returns a description (word) for the mapping which is also used as class name for the generated type. As a consequence, the result should be one word (if possible) and uppercase. Also, every subclass should overwrite this routine.

The generator will take the result and construct eventually classes similar to MyStep2Dummy.h and MyStep2Dummy.cpp or similar for the example below, where we return Dummy.

Reimplemented from peano4.api.solversteps.ActionSet.ActionSet.

Reimplemented in exahype2.api.blockstructured.DynamicMeshRefinementWithGradients.DynamicMeshRefinementWithGradients.

Definition at line 226 of file DynamicMeshRefinement.py.

◆ get_attributes()

exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.get_attributes (   self)

Return attributes as copied and pasted into the generated class.

Please note that action sets are not persistent, i.e. there is one object creation per grid sweep per tree.

Reimplemented from peano4.api.solversteps.ActionSet.ActionSet.

Definition at line 221 of file DynamicMeshRefinement.py.

◆ get_body_of_createGridControlEventsForNextTraversal()

exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.get_body_of_createGridControlEventsForNextTraversal (   self)

◆ get_body_of_operation()

exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.get_body_of_operation (   self,
  operation_name 
)

Return actual C++ code snippets to be inserted into C++ code.

See class' string constants starting with OPERATION_ for possible values of operation_name. The snippet is executed if and only if the guard returned by get_guard_of_operation() holds, i.e. the body should not evaluate the guard itself. See the section "Guard and body" in the class documentation.

Reimplemented from peano4.api.solversteps.ActionSet.ActionSet.

Definition at line 169 of file DynamicMeshRefinement.py.

References solvers.aderdg.actionsets.AbstractADERDGActionSet.AbstractADERDGActionSet._solver, solvers.fv.actionsets.AbstractFVActionSet.AbstractFVActionSet._solver, solvers.fv.EnclaveTasking.UpdateCell._solver, solvers.fv.SingleSweep.UpdateCell._solver, solvers.limiting.actionsets.AbstractLimiterActionSet.AbstractLimiterActionSet._solver, solvers.rkdg.actionsets.AbstractRungeKuttaDGActionSet.AbstractRungeKuttaDGActionSet._solver, 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.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler._solver, exahype2.api.fv.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid._solver, exahype2.api.fv.SetupSimulationWithUserCodedRefinementCriterion.SetupSimulationWithUserCodedRefinementCriterion._solver, exahype2.api.fv.WriteCheckpoint.WriteCheckpoint._solver, exahype2.api.rkfd4.actionsets.AbstractRKFD4ActionSet.AbstractRKFD4ActionSet._solver, exahype2.api.rkfd4.actionsets.ApplyDirichletBoundaryConditions.ApplyDirichletBoundaryConditions._solver, exahype2.api.rkfd4.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._solver, exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta._solver, exahype2.api.rkfd4.PlotAsVTKFile.PlotAsVTKFile._solver, exahype2.api.rkfd4.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid._solver, exahype2.api.rkfd4.WriteCheckpoint.WriteCheckpoint._solver, exahype2.api.Solver.Solver.SolverGenerator._solver, exahype2.api.Solver.Solver.NumericalScheme._solver, exahype2.api.Solver.Solver.GridConstruction._solver, exahype2.api.Solver.Solver.Plotter._solver, exahype2.api.Solver.Solver.MeshAdaptation._solver, 20_additional-solver-steps.RusanovWithDensityFloor._solver, 20_additional-solver-steps.RungeKuttaWithDensityFloor._solver, solvers.fv.actionsets.AdaptivityCriterion.AdaptivityCriterion.event_lifetime(), solvers.rkdg.actionsets.AdaptivityCriterion.AdaptivityCriterion.event_lifetime(), solvers.fv.actionsets.AdaptivityCriterion.AdaptivityCriterion.event_lifetime(), solvers.rkdg.actionsets.AdaptivityCriterion.AdaptivityCriterion.event_lifetime(), exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.event_lifetime, exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.get_volume_evaluation(), exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.max_volume_size, exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEuler.max_volume_size, exahype2.api.fv.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler.max_volume_size, exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta.max_volume_size, exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.min_volume_size, exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEuler.min_volume_size, exahype2.api.fv.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler.min_volume_size, exahype2.api.fv.SetupSimulationWithUserCodedRefinementCriterion.SetupSimulationWithUserCodedRefinementCriterion.min_volume_size, exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta.min_volume_size, DiffuseInterface< Shortcuts, basisSize >.patch_size, solvers.fv.FV.FV.patch_size(), solvers.fv.FV.FV.patch_size(), exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.patch_size, exahype2.api.fv.actionsets.ComputeGlobalCFLCondition.ComputeGlobalCFLCondition.patch_size, exahype2.api.fv.actionsets.InsertPatchInterior.InsertPatchInterior.patch_size, exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEuler.patch_size, exahype2.api.fv.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler.patch_size, exahype2.api.rkfd4.actionsets.ComputeTimeStepSize.ComputeTimeStepSize.patch_size, exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta.patch_size, exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.TemplateEvaluateCriterion, and exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.veto_erase.

Referenced by peano4.api.solversteps.ActionSet.ActionSet.get_implementation_of_operation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_body_of_unprepareTraversal()

exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.get_body_of_unprepareTraversal (   self)

Commit the new events once per rank and mesh sweep, after all trees have merged their local events into the service.

Reimplemented from peano4.api.solversteps.ActionSet.ActionSet.

Definition at line 207 of file DynamicMeshRefinement.py.

Referenced by peano4.api.solversteps.ActionSet.ActionSet.get_implementation_of_unprepareTraversal().

Here is the caller graph for this function:

◆ get_guard_of_operation()

exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.get_guard_of_operation (   self,
  operation_name 
)

Return the guard of an operation.

The guard is a C++ boolean expression. The body of the operation (see get_body_of_operation()) is executed if and only if the guard holds. The guard can use the same arguments as the body, i.e. the marker and the fine and coarse grid data. By default, the guard is true, i.e. the body is always executed.

See class' string constants starting with OPERATION_ for possible values of operation_name.

Reimplemented from peano4.api.solversteps.ActionSet.ActionSet.

Definition at line 202 of file DynamicMeshRefinement.py.

References solvers.fv.actionsets.AdaptivityCriterion.AdaptivityCriterion.guard, solvers.fv.actionsets.HandleBoundary.HandleBoundary.guard, solvers.fv.actionsets.InitialCondition.InitialCondition.guard, solvers.fv.actionsets.PostprocessSolution.EmptyPostprocessSolution.guard, solvers.fv.actionsets.PostprocessSolution.VolumeWisePostprocessSolution.guard, solvers.fv.actionsets.PreprocessSolution.EmptyPreprocessSolution.guard, solvers.fv.actionsets.PreprocessSolution.VolumeWisePreprocessSolution.guard, solvers.fv.EnclaveTasking.MergeEnclaveTaskOutcome.guard, solvers.limiting.actionsets.SaveNewCellData.SaveNewCellData.guard, solvers.limiting.actionsets.SpreadLimiterStatus.SpreadLimiterStatus.guard, solvers.limiting.actionsets.VerifyTroubledness.VerifyTroubledness.guard, solvers.rkdg.actionsets.AdaptivityCriterion.AdaptivityCriterion.guard, solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.guard, solvers.rkdg.actionsets.InitialCondition.InitialCondition.guard, solvers.rkdg.actionsets.PostprocessSolution.EmptyPostprocessSolution.guard, solvers.rkdg.actionsets.PostprocessSolution.DoFWisePostprocessSolution.guard, solvers.rkdg.actionsets.PostprocessSolution.CellWisePostprocessSolution.guard, solvers.rkdg.actionsets.PreprocessSolution.EmptyPreprocessSolution.guard, solvers.rkdg.actionsets.PreprocessSolution.DoFWisePreprocessSolution.guard, solvers.rkdg.actionsets.PreprocessSolution.CellWisePreprocessSolution.guard, exagrype.api.actionsets.AddKreissOligerDissipation.AddKreissOligerDissipation.guard, exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.guard, exahype2.api.fv.actionsets.ApplyDirichletBoundaryConditions.ApplyDirichletBoundaryConditions.guard, exahype2.api.fv.actionsets.ComputeGlobalCFLCondition.ComputeGlobalCFLCondition.guard, exahype2.api.fv.actionsets.DiscardPatchInterior.DiscardPatchInterior.guard, exahype2.api.fv.actionsets.InitialCondition.InitialCondition.guard, exahype2.api.fv.actionsets.InsertPatchInterior.InsertPatchInterior.guard, exahype2.api.fv.actionsets.ReadjustTimeStepSizeForOptimisticGlobalTimestepping.ReadjustTimeStepSizeForOptimisticGlobalTimestepping.guard, exahype2.api.fv.actionsets.SpawnTaskToUpdateCellInterior.SpawnTaskToUpdateCellInterior.guard, exahype2.api.fv.actionsets.UpdateCell.UpdateCell.guard, exahype2.api.fv.actionsets.UpdateCellInterior.UpdateCellInterior.guard, exahype2.api.fv.actionsets.UpdateCellShell.UpdateCellShell.guard, exahype2.api.rkfd4.actionsets.AddLopsidedAdvection.AddLopsidedAdvection.guard, exahype2.api.rkfd4.actionsets.ApplyDirichletBoundaryConditions.ApplyDirichletBoundaryConditions.guard, exahype2.api.rkfd4.actionsets.ComputeLinearCombination.ComputeLinearCombination.guard, exahype2.api.rkfd4.actionsets.ComputeMaxEigenvalue.ComputeMaxEigenvalue.guard, exahype2.api.rkfd4.actionsets.ComputeTimeStepSize.ComputeTimeStepSize.guard, exahype2.api.rkfd4.actionsets.EvaluateRightHandSide.EvaluateRightHandSide.guard, exahype2.api.rkfd4.actionsets.InitialCondition.InitialCondition.guard, peano4.api.actionsets.ConstructRegularGrid.ConstructRegularGrid.guard, api.ApplyPointWiselyToPatch.ApplyPointWiselyToPatch.guard(), api.InterpolateHangingFaces.InterpolateHangingFaces.guard, api.ProjectPatchOntoFaces.ProjectPatchOntoFaces.guard(), api.ApplyPointWiselyToPatch.ApplyPointWiselyToPatch.guard(), api.ProjectPatchOntoFaces.ProjectPatchOntoFaces.guard(), api.ProjectPatchWithHaloOntoFaces.ProjectPatchWithHaloOntoFaces.guard, api.ReconstructPatchWithHalo.ReconstructPatchWithHalo.guard, and api.RestrictHangingFaces.RestrictHangingFaces.guard.

Referenced by peano4.api.solversteps.ActionSet.ActionSet.get_implementation_of_operation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_includes()

exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.get_includes (   self)

Return include statements that you need.

All of these includes will eventually end up in the header of the generated C++ code.

Reimplemented from peano4.api.solversteps.ActionSet.ActionSet.

Definition at line 232 of file DynamicMeshRefinement.py.

References solvers.aderdg.actionsets.AbstractADERDGActionSet.AbstractADERDGActionSet._solver, solvers.fv.actionsets.AbstractFVActionSet.AbstractFVActionSet._solver, solvers.fv.EnclaveTasking.UpdateCell._solver, solvers.fv.SingleSweep.UpdateCell._solver, solvers.limiting.actionsets.AbstractLimiterActionSet.AbstractLimiterActionSet._solver, solvers.rkdg.actionsets.AbstractRungeKuttaDGActionSet.AbstractRungeKuttaDGActionSet._solver, 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.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler._solver, exahype2.api.fv.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid._solver, exahype2.api.fv.SetupSimulationWithUserCodedRefinementCriterion.SetupSimulationWithUserCodedRefinementCriterion._solver, exahype2.api.fv.WriteCheckpoint.WriteCheckpoint._solver, exahype2.api.rkfd4.actionsets.AbstractRKFD4ActionSet.AbstractRKFD4ActionSet._solver, exahype2.api.rkfd4.actionsets.ApplyDirichletBoundaryConditions.ApplyDirichletBoundaryConditions._solver, exahype2.api.rkfd4.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._solver, exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta._solver, exahype2.api.rkfd4.PlotAsVTKFile.PlotAsVTKFile._solver, exahype2.api.rkfd4.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid._solver, exahype2.api.rkfd4.WriteCheckpoint.WriteCheckpoint._solver, exahype2.api.Solver.Solver.SolverGenerator._solver, exahype2.api.Solver.Solver.NumericalScheme._solver, exahype2.api.Solver.Solver.GridConstruction._solver, exahype2.api.Solver.Solver.Plotter._solver, exahype2.api.Solver.Solver.MeshAdaptation._solver, 20_additional-solver-steps.RusanovWithDensityFloor._solver, and 20_additional-solver-steps.RungeKuttaWithDensityFloor._solver.

◆ get_volume_evaluation()

str exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.get_volume_evaluation (   self)

C++ Jinja2 template evaluating the criterion within one volume.

The template runs within a loop over the volumes of the patch, i.e. it has access to the volume's index volume. It has to update the two flags anyVolumeWantsToRefine and allVolumesWantToErase.

Definition at line 138 of file DynamicMeshRefinement.py.

References exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.TemplateEvaluateVolume, and exahype2.api.blockstructured.DynamicMeshRefinementWithGradients.DynamicMeshRefinementWithGradients.TemplateEvaluateVolume.

Referenced by exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.get_body_of_operation().

Here is the caller graph for this function:

◆ user_should_modify_template()

exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.user_should_modify_template (   self)

Is the user allowed to modify the output.

Return whether you expect the user to modify the generated code. If this is the case, then the API places the generated output in the directory actions. Otherwise, it goes into the observer directory and will be overwritten in each and every Python run.

Reimplemented from peano4.api.solversteps.ActionSet.ActionSet.

Definition at line 229 of file DynamicMeshRefinement.py.

Field Documentation

◆ _solver

exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement._solver
protected

Definition at line 115 of file DynamicMeshRefinement.py.

Referenced by exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEuler.__add_data_to_repository(), exahype2.api.fv.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler.__add_data_to_repository(), exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta.__add_data_to_repository(), exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta.__construct_kernel_call(), exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEuler.__construct_kernel_call(), exahype2.api.fv.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler.__construct_kernel_call(), 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.RusanovWithExplicitEuler.RusanovWithExplicitEuler.__create_time_step_functions(), exahype2.api.fv.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler.__create_time_step_functions(), solvers.fv.EnclaveTasking.UpdateCell._add_action_set_entries_to_dictionary(), solvers.fv.SingleSweep.UpdateCell._add_action_set_entries_to_dictionary(), exahype2.api.fv.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._add_further_adaptation_action_sets(), exahype2.api.rkfd4.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._add_further_adaptation_action_sets(), exahype2.api.fv.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._add_projection_action_sets(), exahype2.api.rkfd4.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._add_projection_action_sets(), exahype2.api.Solver.Solver.Plotter._add_time_interval_bookkeeping_to_solver(), exahype2.api.fv.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid._construct_task_graph(), exahype2.api.fv.SetupSimulationWithUserCodedRefinementCriterion.SetupSimulationWithUserCodedRefinementCriterion._create_adapt_mesh_task(), exahype2.api.fv.PlotAsVTKFile.PlotAsVTKFile._create_description(), exahype2.api.rkfd4.PlotAsVTKFile.PlotAsVTKFile._create_description(), exahype2.api.fv.PlotAsVTKFile.PlotAsVTKFile._create_guard(), exahype2.api.rkfd4.PlotAsVTKFile.PlotAsVTKFile._create_guard(), exahype2.api.fv.PlotAsVTKFile.PlotAsVTKFile._create_selected_entries(), exahype2.api.rkfd4.PlotAsVTKFile.PlotAsVTKFile._create_selected_entries(), exahype2.api.fv.PlotAsVTKFile.PlotAsVTKFile._log_plot_graph(), exahype2.api.rkfd4.PlotAsVTKFile.PlotAsVTKFile._log_plot_graph(), exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta._patches(), exahype2.api.fv.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid._report_task_graph(), exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta._right_hand_side_action_sets(), exahype2.api.SolverToCPPFiles.SolverToCPPFiles._variables_declaration(), exahype2.api.SolverToCPPFiles.SolverToCPPFiles.construct_output(), exahype2.api.blockstructured.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad.construct_output(), exahype2.api.rkfd4.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid.construct_output(), manipulate-solver-steps-illustrations.RusanovWithPostprocessing.construct_output(), exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEuler.construct_output(), exahype2.api.fv.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler.construct_output(), exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta.construct_output(), exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta.create_default_mesh_adaptation(), exahype2.api.Solver.Solver.Plotter.create_finish_call(), exahype2.api.Solver.Solver.Plotter.create_is_active_predicate(), exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEuler.create_restriction_of_hanging_faces(), exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta.create_restriction_of_hanging_faces(), solvers.rkdg.actionsets.AdaptivityCriterion.AdaptivityCriterion.event_lifetime(), solvers.aderdg.actionsets.AdaptivityCriterion.AdaptivityCriterion.get_body_of_operation(), solvers.aderdg.actionsets.Correction.Correction.get_body_of_operation(), solvers.aderdg.actionsets.DynamicAMR.DynamicAMR.get_body_of_operation(), solvers.aderdg.actionsets.HandleBoundary.HandleBoundary.get_body_of_operation(), solvers.aderdg.actionsets.InitialCondition.InitialCondition.get_body_of_operation(), solvers.aderdg.actionsets.PostprocessSolution.EmptyPostprocessSolution.get_body_of_operation(), solvers.aderdg.actionsets.PostprocessSolution.DoFWisePostprocessSolution.get_body_of_operation(), solvers.aderdg.actionsets.PostprocessSolution.CellWisePostprocessSolution.get_body_of_operation(), solvers.aderdg.actionsets.Prediction.Prediction.get_body_of_operation(), solvers.fv.actionsets.AdaptivityCriterion.AdaptivityCriterion.get_body_of_operation(), solvers.fv.actionsets.InitialCondition.InitialCondition.get_body_of_operation(), solvers.fv.actionsets.PostprocessSolution.VolumeWisePostprocessSolution.get_body_of_operation(), solvers.fv.actionsets.PreprocessSolution.VolumeWisePreprocessSolution.get_body_of_operation(), solvers.fv.actionsets.RollOverUpdatedFace.RollOverUpdatedFace.get_body_of_operation(), solvers.fv.EnclaveTasking.MergeEnclaveTaskOutcome.get_body_of_operation(), solvers.limiting.actionsets.CopyAndConvertPatch.CopyAndConvertPatch.get_body_of_operation(), solvers.limiting.actionsets.SaveNewCellData.SaveNewCellData.get_body_of_operation(), solvers.limiting.actionsets.SpreadLimiterStatus.SpreadLimiterStatus.get_body_of_operation(), solvers.limiting.actionsets.VerifyTroubledness.VerifyTroubledness.get_body_of_operation(), solvers.rkdg.actionsets.AdaptivityCriterion.AdaptivityCriterion.get_body_of_operation(), solvers.rkdg.actionsets.AddVolumeAndFaceSolution.AddVolumeAndFaceSolution.get_body_of_operation(), solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.get_body_of_operation(), solvers.rkdg.actionsets.DynamicAMR.DynamicAMR.get_body_of_operation(), solvers.rkdg.actionsets.HandleBoundary.HandleBoundary.get_body_of_operation(), solvers.rkdg.actionsets.InitialCondition.InitialCondition.get_body_of_operation(), solvers.rkdg.actionsets.LinearCombinationOfEstimates.LinearCombinationOfEstimates.get_body_of_operation(), solvers.rkdg.actionsets.PostprocessSolution.DoFWisePostprocessSolution.get_body_of_operation(), solvers.rkdg.actionsets.PostprocessSolution.CellWisePostprocessSolution.get_body_of_operation(), solvers.rkdg.actionsets.PreprocessSolution.DoFWisePreprocessSolution.get_body_of_operation(), solvers.rkdg.actionsets.PreprocessSolution.CellWisePreprocessSolution.get_body_of_operation(), solvers.rkdg.actionsets.ProjectLinearCombinationOfEstimatesOntoFaces.ProjectLinearCombinationOfEstimatesOntoFaces.get_body_of_operation(), solvers.rkdg.actionsets.SolveRiemannProblem.SolveRiemannProblem.get_body_of_operation(), solvers.rkdg.actionsets.SolveVolumeIntegral.SolveVolumeIntegral.get_body_of_operation(), solvers.rkdg.SeparateSweepsWithEnclaveTasking.MergeEnclaveTaskOutcome.get_body_of_operation(), exagrype.api.actionsets.AddKreissOligerDissipation.AddKreissOligerDissipation.get_body_of_operation(), exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.get_body_of_operation(), exahype2.api.blockstructured.LoadCheckpoint._LoadPatchesFromCheckpoint.get_body_of_operation(), exahype2.api.fv.actionsets.InitialCondition.InitialCondition.get_body_of_operation(), exahype2.api.fv.actionsets.InsertPatchInterior.InsertPatchInterior.get_body_of_operation(), exahype2.api.rkfd4.actionsets.AddLopsidedAdvection.AddLopsidedAdvection.get_body_of_operation(), exahype2.api.rkfd4.actionsets.ComputeLinearCombination.ComputeLinearCombination.get_body_of_operation(), exahype2.api.rkfd4.actionsets.ComputeMaxEigenvalue.ComputeMaxEigenvalue.get_body_of_operation(), exahype2.api.rkfd4.actionsets.EvaluateRightHandSide.EvaluateRightHandSide.get_body_of_operation(), exahype2.api.rkfd4.actionsets.InitialCondition.InitialCondition.get_body_of_operation(), solvers.fv.actionsets.InitialCondition.InitialCondition.get_body_of_prepareTraversal(), exahype2.api.rkfd4.actionsets.ComputeTimeStepSize.ComputeTimeStepSize.get_body_of_unprepareTraversal(), solvers.aderdg.actionsets.AbstractADERDGActionSet.AbstractADERDGActionSet.get_includes(), solvers.aderdg.actionsets.Correction.Correction.get_includes(), solvers.aderdg.actionsets.DynamicAMR.DynamicAMR.get_includes(), solvers.aderdg.actionsets.HandleBoundary.HandleBoundary.get_includes(), solvers.aderdg.actionsets.InitialCondition.InitialCondition.get_includes(), solvers.aderdg.actionsets.PostprocessSolution.EmptyPostprocessSolution.get_includes(), solvers.aderdg.actionsets.PostprocessSolution.DoFWisePostprocessSolution.get_includes(), solvers.aderdg.actionsets.Prediction.Prediction.get_includes(), solvers.fv.actionsets.AbstractFVActionSet.AbstractFVActionSet.get_includes(), solvers.fv.actionsets.InitialCondition.InitialCondition.get_includes(), solvers.fv.EnclaveTasking.UpdateCell.get_includes(), solvers.fv.SingleSweep.UpdateCell.get_includes(), solvers.limiting.actionsets.AbstractLimiterActionSet.AbstractLimiterActionSet.get_includes(), solvers.limiting.actionsets.CopyAndConvertPatch.CopyAndConvertPatch.get_includes(), solvers.limiting.actionsets.SaveNewCellData.SaveNewCellData.get_includes(), solvers.limiting.actionsets.VerifyTroubledness.VerifyTroubledness.get_includes(), solvers.rkdg.actionsets.AbstractRungeKuttaDGActionSet.AbstractRungeKuttaDGActionSet.get_includes(), solvers.rkdg.actionsets.SolveVolumeIntegral.SolveVolumeIntegral.get_includes(), exahype2.api.blockstructured.ConsumeRefinementRequests.ConsumeRefinementRequests.get_includes(), exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.get_includes(), exahype2.api.fv.actionsets.AbstractFVActionSet.AbstractFVActionSet.get_includes(), exahype2.api.fv.actionsets.ApplyDirichletBoundaryConditions.ApplyDirichletBoundaryConditions.get_includes(), exahype2.api.rkfd4.actionsets.AbstractRKFD4ActionSet.AbstractRKFD4ActionSet.get_includes(), exahype2.api.rkfd4.actionsets.ApplyDirichletBoundaryConditions.ApplyDirichletBoundaryConditions.get_includes(), solvers.rkdg.actionsets.AddVolumeAndFaceSolution.AddVolumeAndFaceSolution.guards(), solvers.rkdg.actionsets.DynamicAMR.DynamicAMR.guards(), solvers.rkdg.actionsets.HandleBoundary.HandleBoundary.guards(), solvers.rkdg.actionsets.LinearCombinationOfEstimates.LinearCombinationOfEstimates.guards(), solvers.rkdg.actionsets.ProjectLinearCombinationOfEstimatesOntoFaces.ProjectLinearCombinationOfEstimatesOntoFaces.guards(), solvers.rkdg.actionsets.SolveRiemannProblem.SolveRiemannProblem.guards(), solvers.rkdg.actionsets.SolveVolumeIntegral.SolveVolumeIntegral.guards(), exahype2.api.blockstructured.LoadCheckpoint.LoadCheckpoint.index_file_name(), exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEuler.kernel_function_name(), exahype2.api.fv.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler.kernel_function_name(), exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta.max_eigenvalue_kernel_name(), exahype2.api.fv.PlotAsVTKFile.PlotAsVTKFile.output_file_prefix(), exahype2.api.fv.WriteCheckpoint.WriteCheckpoint.output_file_prefix(), exahype2.api.rkfd4.PlotAsVTKFile.PlotAsVTKFile.output_file_prefix(), exahype2.api.rkfd4.WriteCheckpoint.WriteCheckpoint.output_file_prefix(), and exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta.right_hand_side_kernel_name().

◆ event_lifetime

exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.event_lifetime

◆ guard

exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.guard

Definition at line 117 of file DynamicMeshRefinement.py.

Referenced by api.ReconstructPatchWithHalo.ReconstructPatchWithHalo._add_action_set_entries_to_dictionary(), solvers.aderdg.actionsets.Correction.Correction.get_body_of_operation(), solvers.aderdg.actionsets.Prediction.Prediction.get_body_of_operation(), solvers.fv.actionsets.AdaptivityCriterion.AdaptivityCriterion.get_body_of_operation(), solvers.fv.actionsets.InitialCondition.InitialCondition.get_body_of_operation(), solvers.fv.actionsets.PostprocessSolution.VolumeWisePostprocessSolution.get_body_of_operation(), solvers.fv.actionsets.PreprocessSolution.VolumeWisePreprocessSolution.get_body_of_operation(), solvers.fv.EnclaveTasking.MergeEnclaveTaskOutcome.get_body_of_operation(), solvers.limiting.actionsets.SaveNewCellData.SaveNewCellData.get_body_of_operation(), solvers.limiting.actionsets.SpreadLimiterStatus.SpreadLimiterStatus.get_body_of_operation(), solvers.limiting.actionsets.VerifyTroubledness.VerifyTroubledness.get_body_of_operation(), solvers.rkdg.actionsets.AdaptivityCriterion.AdaptivityCriterion.get_body_of_operation(), solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.get_body_of_operation(), solvers.rkdg.actionsets.InitialCondition.InitialCondition.get_body_of_operation(), solvers.rkdg.actionsets.PostprocessSolution.DoFWisePostprocessSolution.get_body_of_operation(), solvers.rkdg.actionsets.PostprocessSolution.CellWisePostprocessSolution.get_body_of_operation(), solvers.rkdg.actionsets.PreprocessSolution.DoFWisePreprocessSolution.get_body_of_operation(), solvers.rkdg.actionsets.PreprocessSolution.CellWisePreprocessSolution.get_body_of_operation(), solvers.fv.actionsets.InitialCondition.InitialCondition.get_body_of_prepareTraversal(), exagrype.api.actionsets.AddKreissOligerDissipation.AddKreissOligerDissipation.get_guard_of_operation(), exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.get_guard_of_operation(), exahype2.api.fv.actionsets.ApplyDirichletBoundaryConditions.ApplyDirichletBoundaryConditions.get_guard_of_operation(), exahype2.api.fv.actionsets.ComputeGlobalCFLCondition.ComputeGlobalCFLCondition.get_guard_of_operation(), exahype2.api.fv.actionsets.DiscardPatchInterior.DiscardPatchInterior.get_guard_of_operation(), exahype2.api.fv.actionsets.InitialCondition.InitialCondition.get_guard_of_operation(), exahype2.api.fv.actionsets.InitialiseNewCells.InitialiseNewCells.get_guard_of_operation(), exahype2.api.fv.actionsets.InsertPatchInterior.InsertPatchInterior.get_guard_of_operation(), exahype2.api.fv.actionsets.ReadjustTimeStepSizeForOptimisticGlobalTimestepping.ReadjustTimeStepSizeForOptimisticGlobalTimestepping.get_guard_of_operation(), exahype2.api.fv.actionsets.SpawnTaskToUpdateCellInterior.SpawnTaskToUpdateCellInterior.get_guard_of_operation(), exahype2.api.fv.actionsets.UpdateCell.UpdateCell.get_guard_of_operation(), exahype2.api.fv.actionsets.UpdateCellInterior.UpdateCellInterior.get_guard_of_operation(), exahype2.api.fv.actionsets.UpdateCellShell.UpdateCellShell.get_guard_of_operation(), exahype2.api.rkfd4.actionsets.AddLopsidedAdvection.AddLopsidedAdvection.get_guard_of_operation(), exahype2.api.rkfd4.actionsets.ApplyDirichletBoundaryConditions.ApplyDirichletBoundaryConditions.get_guard_of_operation(), exahype2.api.rkfd4.actionsets.ComputeLinearCombination.ComputeLinearCombination.get_guard_of_operation(), exahype2.api.rkfd4.actionsets.ComputeMaxEigenvalue.ComputeMaxEigenvalue.get_guard_of_operation(), exahype2.api.rkfd4.actionsets.ComputeTimeStepSize.ComputeTimeStepSize.get_guard_of_operation(), exahype2.api.rkfd4.actionsets.EvaluateRightHandSide.EvaluateRightHandSide.get_guard_of_operation(), exahype2.api.rkfd4.actionsets.InitialCondition.InitialCondition.get_guard_of_operation(), api.InterpolateHangingFaces.InterpolateHangingFaces.get_guard_of_operation(), api.ProjectPatchWithHaloOntoFaces.ProjectPatchWithHaloOntoFaces.get_guard_of_operation(), api.ReconstructPatchWithHalo.ReconstructPatchWithHalo.get_guard_of_operation(), and api.RestrictHangingFaces.RestrictHangingFaces.get_guard_of_operation().

◆ hand_events_to_peano

exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.hand_events_to_peano

◆ max_volume_size

◆ min_volume_size

◆ patch_size

◆ TemplateEvaluateCriterion

str exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.TemplateEvaluateCriterion
static
Initial value:
= """
logTraceIn( "touchCellFirstTime(...)---DynamicMeshRefinement" );
bool anyVolumeWantsToRefine = false;
bool allVolumesWantToErase = true;
dfor( volume, {{NUMBER_OF_VOLUMES_PER_AXIS}} ) {
{{EVALUATE_VOLUME}}
}
if ( anyVolumeWantsToRefine {{REFINE_BOUND}}) {
_localRefinementControl.addCommand( marker.x(), marker.h(), ::exahype2::RefinementCommand::Refine, {{EVENT_LIFETIME}} );
}
{%- if not VETO_ERASE %}
else if ( not anyVolumeWantsToRefine and allVolumesWantToErase {{ERASE_BOUND}}) {
_localRefinementControl.addCommand( marker.x(), marker.h(), ::exahype2::RefinementCommand::Erase, {{EVENT_LIFETIME}}, marker.getRelativePositionWithinFatherCell() );
}
{%- endif %}
logTraceOut( "touchCellFirstTime(...)---DynamicMeshRefinement" );
"""

Definition at line 150 of file DynamicMeshRefinement.py.

Referenced by exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.get_body_of_operation().

◆ TemplateEvaluateVolume

str exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.TemplateEvaluateVolume
static
Initial value:
= """
const int index = peano4::utils::dLinearised(volume,{{NUMBER_OF_VOLUMES_PER_AXIS}}) * ({{NUMBER_OF_UNKNOWNS}} + {{NUMBER_OF_AUXILIARY_VARIABLES}});
::exahype2::RefinementCommand command = ::exahype2::RefinementCommand::Keep;
repositories::{{SOLVER_INSTANCE}}.refineErasePointwisely(
fineGridCell{{UNKNOWN_IDENTIFIER}}.value + index,
::exahype2::fv::getVolumeCentre( marker.x(), marker.h(), {{NUMBER_OF_VOLUMES_PER_AXIS}}, volume),
repositories::{{SOLVER_INSTANCE}}.getMinTimeStamp(),
&command
);
anyVolumeWantsToRefine = anyVolumeWantsToRefine or command == ::exahype2::RefinementCommand::Refine;
allVolumesWantToErase = allVolumesWantToErase and command == ::exahype2::RefinementCommand::Erase;
"""

Per-volume evaluation of the point-wise criterion.

Definition at line 125 of file DynamicMeshRefinement.py.

Referenced by exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.get_volume_evaluation().

◆ veto_erase

exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.veto_erase

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