Peano
Loading...
Searching...
No Matches
exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.UpdateCell Class Reference

Update one cell, i.e. More...

Inheritance diagram for exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.UpdateCell:
Collaboration diagram for exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.UpdateCell:

Public Member Functions

 __init__ (self, solver)
 patch: peano4.datamodel.Patch Patch which is to be used
 
 get_includes (self)
 Return include statements that you need.
 
- Public Member Functions inherited from peano4.toolbox.blockstructured.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor
 get_constructor_body (self)
 Define a tailored constructor body.
 
 get_action_set_name (self)
 Return unique action set name.
 
 user_should_modify_template (self)
 Is the user allowed to modify the output.
 
 get_body_of_operation (self, operation_name)
 Return actual C++ code snippets to be inserted into C++ code.
 
 get_attributes (self)
 Return attributes as copied and pasted into the generated class.
 
- Public Member Functions inherited from peano4.solversteps.ActionSet.ActionSet
 get_static_initialisations (self, full_qualified_classname)
 
 get_destructor_body (self)
 
 get_body_of_getGridControlEvents (self)
 
 get_body_of_prepareTraversal (self)
 
 get_body_of_unprepareTraversal (self)
 

Static Public Attributes

 SolveRiemannProblemsOverPatch = jinja2.Template( ReconstructLinearCombination + )
 
- Static Public Attributes inherited from peano4.solversteps.ActionSet.ActionSet
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 Member Functions

 _add_action_set_entries_to_dictionary (self, d)
 This is our plug-in point to alter the underlying dictionary.
 

Protected Attributes

 _solver
 
 _Template_TouchCellFirstTime_Preamble
 
 _butcher_tableau
 

Additional Inherited Members

- Data Fields inherited from peano4.toolbox.blockstructured.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor
 guard
 
 no_of_unknowns
 
 dofs_per_axis
 
 total_overlap
 
 overlap_name
 
 patch_name
 
 functor_implementation
 
 add_assertions_to_halo_exchange
 
 reconstructed_array_memory_location
 
- Data Fields inherited from peano4.solversteps.ActionSet.ActionSet
 descend_invocation_order
 
 parallel
 
- Static Protected Attributes inherited from peano4.toolbox.blockstructured.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor
str _Template_TouchCellFirstTime_Preamble
 
str _Template_TouchCellFirstTime_Fill_Patch
 
str _Template_TouchCellFirstTime_Fill_Halos
 
str _Template_TouchCellFirstTime_Core
 
str _Template_TouchCellFirstTime_Epilogue
 

Detailed Description

Update one cell, i.e.

compute Runge-Kutta step on it

This routine is very similar to the Finite Volume step. The big difference in the context of Runge-Kutta is that we always have to construct a linear combination of the input data and then write the new estimate for the right-hand side into the large estimate field.

So we operate in two steps: First, we let the default block-structured code reconstruct the old time step data. After that, we add the rhs estimates onto this reconstructed data. The latter can be read as a correction step to the reconstructed values. It is correct if and only if the haloes are properly initialised with a corrected value, as we cannot correct the halo data at this point.

Correction terms with Runge-Kutta trials

We current the values with a linear combination of all of the estimates according to the Butcher Tableau.

The linear combination is a volumetric representation which includes both the degrees of freedom and the auxiliary variables. However, the auxiliary variables are not developing over time. In Runge-Kutta, I have estimates for the right-hand side, i.e. for the derivatives

\( \partial _t Q = F(Q) \)

This is the stuff stored in RhsEstimates. It does not comprise any auxiliary variables. So I have to copy the auxiliary variables from the last valid time step every time I reconstruct a new guess.

Definition at line 72 of file OneSweepPerRungeKuttaStep.py.

Constructor & Destructor Documentation

◆ __init__()

exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.UpdateCell.__init__ ( self,
patch )

patch: peano4.datamodel.Patch Patch which is to be used

patch_overlap: peano4.datamodel.Patch Consult remark above about how the dimensions of this overlap patch have to match

Functor_implementation

The functor implementation is a plain C/C++

  • If you want to use brackets in your implementation, please use double brackets {{ }} as the template system otherwise gets confused.
  • The following C++ variables are defined:

oldQWithHalo newQ

Both are plain double pointers.

Data validation

I use quite a lot of validitiy checks for the copied data via comparison to its self. This way, I can at least spot nans. I use the dictionary entries ASSERTION_WITH_X_ARGUMENTS to realise this, and they are, by default, set to Peano's assertion macros. You can redefine them.

Reimplemented from peano4.toolbox.blockstructured.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor.

Definition at line 133 of file OneSweepPerRungeKuttaStep.py.

Member Function Documentation

◆ _add_action_set_entries_to_dictionary()

exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.UpdateCell._add_action_set_entries_to_dictionary ( self,
d )
protected

This is our plug-in point to alter the underlying dictionary.

Reimplemented from peano4.toolbox.blockstructured.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor.

Definition at line 157 of file OneSweepPerRungeKuttaStep.py.

References exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.UpdateCell._add_action_set_entries_to_dictionary(), ComputeFirstDerivatives.ComputeFirstDerivativesFD4RK._butcher_tableau, exahype2.solvers.rkdg.actionsets.AddVolumeAndFaceSolution.AddVolumeAndFaceSolution._butcher_tableau, exahype2.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination._butcher_tableau, exahype2.solvers.rkdg.actionsets.HandleBoundary.HandleBoundary._butcher_tableau, exahype2.solvers.rkdg.actionsets.LinearCombinationOfEstimates.LinearCombinationOfEstimates._butcher_tableau, exahype2.solvers.rkdg.actionsets.ProjectLinearCombinationOfEstimatesOntoFaces.ProjectLinearCombinationOfEstimatesOntoFaces._butcher_tableau, exahype2.solvers.rkdg.actionsets.SolveRiemannProblem.SolveRiemannProblem._butcher_tableau, exahype2.solvers.rkdg.actionsets.SolveVolumeIntegral.SolveVolumeIntegral._butcher_tableau, exahype2.solvers.rkfd.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination._butcher_tableau, exahype2.solvers.rkfd.actionsets.LinearCombinationOfEstimates.LinearCombinationOfEstimates._butcher_tableau, exahype2.solvers.rkfd.actionsets.ProjectPatchOntoFaces.ProjectPatchOntoFaces._butcher_tableau, exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.UpdateCell._butcher_tableau, exahype2.solvers.rkfd.SeparateSweeps.UpdateCell._butcher_tableau, exahype2.solvers.rkfd.SeparateSweepsWithEnclaveTasking.UpdateCell._butcher_tableau, ComputeFirstDerivatives.ComputeFirstDerivativesFD4RK._solver, exahype2.solvers.aderdg.actionsets.AbstractADERDGActionSet.AbstractADERDGActionSet._solver, exahype2.solvers.fv.actionsets.AbstractFVActionSet.AbstractFVActionSet._solver, exahype2.solvers.fv.EnclaveTasking.UpdateCell._solver, exahype2.solvers.fv.SingleSweep.UpdateCell._solver, exahype2.solvers.limiting.actionsets.AbstractLimiterActionSet.AbstractLimiterActionSet._solver, exahype2.solvers.rkdg.actionsets.AbstractRungeKuttaDGActionSet.AbstractRungeKuttaDGActionSet._solver, exahype2.solvers.rkfd.actionsets.AbstractRKFDActionSet.AbstractRKFDActionSet._solver, exahype2.solvers.rkfd.actionsets.PreprocessSolution.PreprocessReconstructedSolutionWithHalo._solver, exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.UpdateCell._solver, exahype2.solvers.rkfd.SeparateSweeps.UpdateCell._solver, exahype2.solvers.rkfd.SeparateSweepsWithEnclaveTasking.UpdateCell._solver, exahype2.solvers.fv.SingleSweep.UpdateCell.SolveRiemannProblemsOverPatch, exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.UpdateCell.SolveRiemannProblemsOverPatch, exahype2.solvers.rkfd.SeparateSweeps.UpdateCell.SolveRiemannProblemsOverPatch, and exahype2.solvers.rkfd.SeparateSweepsWithEnclaveTasking.UpdateCell.SolveRiemannProblemsOverPatch.

Referenced by exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.UpdateCell._add_action_set_entries_to_dictionary(), and peano4.toolbox.blockstructured.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor.get_body_of_operation().

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

◆ get_includes()

Field Documentation

◆ _butcher_tableau

exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.UpdateCell._butcher_tableau
protected

Definition at line 154 of file OneSweepPerRungeKuttaStep.py.

Referenced by ComputeFirstDerivatives.ComputeFirstDerivativesFD4RK._add_action_set_entries_to_dictionary(), exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.UpdateCell._add_action_set_entries_to_dictionary(), exahype2.solvers.rkfd.SeparateSweeps.UpdateCell._add_action_set_entries_to_dictionary(), exahype2.solvers.rkfd.SeparateSweepsWithEnclaveTasking.UpdateCell._add_action_set_entries_to_dictionary(), exahype2.solvers.rkdg.actionsets.AddVolumeAndFaceSolution.AddVolumeAndFaceSolution.get_body_of_operation(), exahype2.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.get_body_of_operation(), exahype2.solvers.rkdg.actionsets.HandleBoundary.HandleBoundary.get_body_of_operation(), exahype2.solvers.rkdg.actionsets.LinearCombinationOfEstimates.LinearCombinationOfEstimates.get_body_of_operation(), exahype2.solvers.rkdg.actionsets.ProjectLinearCombinationOfEstimatesOntoFaces.ProjectLinearCombinationOfEstimatesOntoFaces.get_body_of_operation(), exahype2.solvers.rkdg.actionsets.SolveRiemannProblem.SolveRiemannProblem.get_body_of_operation(), exahype2.solvers.rkdg.actionsets.SolveVolumeIntegral.SolveVolumeIntegral.get_body_of_operation(), exahype2.solvers.rkfd.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.get_body_of_operation(), exahype2.solvers.rkfd.actionsets.LinearCombinationOfEstimates.LinearCombinationOfEstimates.get_body_of_operation(), and exahype2.solvers.rkfd.actionsets.ProjectPatchOntoFaces.ProjectPatchOntoFaces.get_body_of_operation().

◆ _solver

exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.UpdateCell._solver
protected

Definition at line 148 of file OneSweepPerRungeKuttaStep.py.

Referenced by ComputeFirstDerivatives.ComputeFirstDerivativesFD4RK._add_action_set_entries_to_dictionary(), exahype2.solvers.fv.EnclaveTasking.UpdateCell._add_action_set_entries_to_dictionary(), exahype2.solvers.fv.SingleSweep.UpdateCell._add_action_set_entries_to_dictionary(), exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.UpdateCell._add_action_set_entries_to_dictionary(), exahype2.solvers.rkfd.SeparateSweeps.UpdateCell._add_action_set_entries_to_dictionary(), exahype2.solvers.rkfd.SeparateSweepsWithEnclaveTasking.UpdateCell._add_action_set_entries_to_dictionary(), exahype2.solvers.rkdg.actionsets.AdaptivityCriterion.AdaptivityCriterion.event_lifetime(), exahype2.solvers.aderdg.actionsets.AdaptivityCriterion.AdaptivityCriterion.get_body_of_operation(), exahype2.solvers.aderdg.actionsets.Correction.Correction.get_body_of_operation(), exahype2.solvers.aderdg.actionsets.DynamicAMR.DynamicAMR.get_body_of_operation(), exahype2.solvers.aderdg.actionsets.HandleBoundary.HandleBoundary.get_body_of_operation(), exahype2.solvers.aderdg.actionsets.InitialCondition.InitialCondition.get_body_of_operation(), exahype2.solvers.aderdg.actionsets.PostprocessSolution.EmptyPostprocessSolution.get_body_of_operation(), exahype2.solvers.aderdg.actionsets.PostprocessSolution.DoFWisePostprocessSolution.get_body_of_operation(), exahype2.solvers.aderdg.actionsets.PostprocessSolution.CellWisePostprocessSolution.get_body_of_operation(), exahype2.solvers.aderdg.actionsets.Prediction.Prediction.get_body_of_operation(), exahype2.solvers.fv.actionsets.AdaptivityCriterion.AdaptivityCriterion.get_body_of_operation(), exahype2.solvers.fv.actionsets.InitialCondition.InitialCondition.get_body_of_operation(), exahype2.solvers.fv.actionsets.PostprocessSolution.VolumeWisePostprocessSolution.get_body_of_operation(), exahype2.solvers.fv.actionsets.PreprocessSolution.VolumeWisePreprocessSolution.get_body_of_operation(), exahype2.solvers.fv.actionsets.RollOverUpdatedFace.RollOverUpdatedFace.get_body_of_operation(), exahype2.solvers.fv.EnclaveTasking.MergeEnclaveTaskOutcome.get_body_of_operation(), exahype2.solvers.limiting.actionsets.CopyAndConvertPatch.CopyAndConvertPatch.get_body_of_operation(), exahype2.solvers.limiting.actionsets.SaveNewCellData.SaveNewCellData.get_body_of_operation(), exahype2.solvers.limiting.actionsets.SpreadLimiterStatus.SpreadLimiterStatus.get_body_of_operation(), exahype2.solvers.limiting.actionsets.VerifyTroubledness.VerifyTroubledness.get_body_of_operation(), exahype2.solvers.rkdg.actionsets.AdaptivityCriterion.AdaptivityCriterion.get_body_of_operation(), exahype2.solvers.rkdg.actionsets.AddVolumeAndFaceSolution.AddVolumeAndFaceSolution.get_body_of_operation(), exahype2.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.get_body_of_operation(), exahype2.solvers.rkdg.actionsets.DynamicAMR.DynamicAMR.get_body_of_operation(), exahype2.solvers.rkdg.actionsets.HandleBoundary.HandleBoundary.get_body_of_operation(), exahype2.solvers.rkdg.actionsets.InitialCondition.InitialCondition.get_body_of_operation(), exahype2.solvers.rkdg.actionsets.LinearCombinationOfEstimates.LinearCombinationOfEstimates.get_body_of_operation(), exahype2.solvers.rkdg.actionsets.PostprocessSolution.DoFWisePostprocessSolution.get_body_of_operation(), exahype2.solvers.rkdg.actionsets.PostprocessSolution.CellWisePostprocessSolution.get_body_of_operation(), exahype2.solvers.rkdg.actionsets.PreprocessSolution.DoFWisePreprocessSolution.get_body_of_operation(), exahype2.solvers.rkdg.actionsets.PreprocessSolution.CellWisePreprocessSolution.get_body_of_operation(), exahype2.solvers.rkdg.actionsets.ProjectLinearCombinationOfEstimatesOntoFaces.ProjectLinearCombinationOfEstimatesOntoFaces.get_body_of_operation(), exahype2.solvers.rkdg.actionsets.SolveRiemannProblem.SolveRiemannProblem.get_body_of_operation(), exahype2.solvers.rkdg.actionsets.SolveVolumeIntegral.SolveVolumeIntegral.get_body_of_operation(), exahype2.solvers.rkdg.SeparateSweepsWithEnclaveTasking.MergeEnclaveTaskOutcome.get_body_of_operation(), exahype2.solvers.rkfd.actionsets.AdaptivityCriterion.AdaptivityCriterion.get_body_of_operation(), exahype2.solvers.rkfd.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.get_body_of_operation(), exahype2.solvers.rkfd.actionsets.InitialCondition.InitialCondition.get_body_of_operation(), exahype2.solvers.rkfd.actionsets.LinearCombinationOfEstimates.LinearCombinationOfEstimates.get_body_of_operation(), exahype2.solvers.rkfd.actionsets.PostprocessSolution.PatchWisePostprocessSolution.get_body_of_operation(), exahype2.solvers.rkfd.actionsets.PostprocessSolution.CellWisePostprocessSolution.get_body_of_operation(), exahype2.solvers.rkfd.actionsets.PreprocessSolution.CellWisePreprocessSolution.get_body_of_operation(), exahype2.solvers.rkfd.actionsets.ProjectPatchOntoFaces.ProjectPatchOntoFaces.get_body_of_operation(), exahype2.solvers.rkfd.SeparateSweepsWithEnclaveTasking.MergeEnclaveTaskOutcome.get_body_of_operation(), exahype2.solvers.fv.actionsets.InitialCondition.InitialCondition.get_body_of_prepareTraversal(), exahype2.solvers.rkfd.actionsets.InitialCondition.InitialCondition.get_body_of_prepareTraversal(), exahype2.solvers.aderdg.actionsets.AbstractADERDGActionSet.AbstractADERDGActionSet.get_includes(), exahype2.solvers.aderdg.actionsets.Correction.Correction.get_includes(), exahype2.solvers.aderdg.actionsets.DynamicAMR.DynamicAMR.get_includes(), exahype2.solvers.aderdg.actionsets.HandleBoundary.HandleBoundary.get_includes(), exahype2.solvers.aderdg.actionsets.InitialCondition.InitialCondition.get_includes(), exahype2.solvers.aderdg.actionsets.PostprocessSolution.EmptyPostprocessSolution.get_includes(), exahype2.solvers.aderdg.actionsets.PostprocessSolution.DoFWisePostprocessSolution.get_includes(), exahype2.solvers.aderdg.actionsets.Prediction.Prediction.get_includes(), exahype2.solvers.fv.actionsets.AbstractFVActionSet.AbstractFVActionSet.get_includes(), exahype2.solvers.fv.actionsets.InitialCondition.InitialCondition.get_includes(), exahype2.solvers.fv.EnclaveTasking.UpdateCell.get_includes(), exahype2.solvers.fv.SingleSweep.UpdateCell.get_includes(), exahype2.solvers.limiting.actionsets.AbstractLimiterActionSet.AbstractLimiterActionSet.get_includes(), exahype2.solvers.limiting.actionsets.CopyAndConvertPatch.CopyAndConvertPatch.get_includes(), exahype2.solvers.limiting.actionsets.SaveNewCellData.SaveNewCellData.get_includes(), exahype2.solvers.limiting.actionsets.VerifyTroubledness.VerifyTroubledness.get_includes(), exahype2.solvers.rkdg.actionsets.AbstractRungeKuttaDGActionSet.AbstractRungeKuttaDGActionSet.get_includes(), exahype2.solvers.rkdg.actionsets.SolveVolumeIntegral.SolveVolumeIntegral.get_includes(), exahype2.solvers.rkfd.actionsets.AbstractRKFDActionSet.AbstractRKFDActionSet.get_includes(), exahype2.solvers.rkfd.actionsets.InitialCondition.InitialCondition.get_includes(), exahype2.solvers.rkfd.actionsets.PreprocessSolution.PreprocessReconstructedSolutionWithHalo.get_includes(), exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.UpdateCell.get_includes(), exahype2.solvers.rkfd.SeparateSweeps.UpdateCell.get_includes(), exahype2.solvers.rkfd.SeparateSweepsWithEnclaveTasking.UpdateCell.get_includes(), exahype2.solvers.rkdg.actionsets.AddVolumeAndFaceSolution.AddVolumeAndFaceSolution.guards(), exahype2.solvers.rkdg.actionsets.DynamicAMR.DynamicAMR.guards(), exahype2.solvers.rkdg.actionsets.HandleBoundary.HandleBoundary.guards(), exahype2.solvers.rkdg.actionsets.LinearCombinationOfEstimates.LinearCombinationOfEstimates.guards(), exahype2.solvers.rkdg.actionsets.ProjectLinearCombinationOfEstimatesOntoFaces.ProjectLinearCombinationOfEstimatesOntoFaces.guards(), exahype2.solvers.rkdg.actionsets.SolveRiemannProblem.SolveRiemannProblem.guards(), exahype2.solvers.rkdg.actionsets.SolveVolumeIntegral.SolveVolumeIntegral.guards(), exahype2.solvers.rkfd.actionsets.LinearCombinationOfEstimates.LinearCombinationOfEstimates.guards(), and exahype2.solvers.rkfd.actionsets.ProjectPatchOntoFaces.ProjectPatchOntoFaces.guards().

◆ _Template_TouchCellFirstTime_Preamble

exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.UpdateCell._Template_TouchCellFirstTime_Preamble
protected

◆ SolveRiemannProblemsOverPatch


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