Peano
Loading...
Searching...
No Matches
exahype2.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination Class Reference

Action set determining the final solution using a linear combination of previous Runge-Kutta guesses. More...

Inheritance diagram for exahype2.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination:
Collaboration diagram for exahype2.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination:

Public Member Functions

 __init__ (self, solver, guard, FaceProjections face_projections)
 guard_project: String (C++ code) Predicate which controls if the solution is actually projected
 
 get_body_of_operation (self, operation_name)
 Return actual C++ code snippets to be inserted into C++ code.
 
 get_action_set_name (self)
 You should replicate this function in each subclass, so you get meaningful action set names (otherwise, it will be AbstractFVActionSet0,1,2,...).
 
 get_includes (self)
 Return include statements that you need.
 
- Public Member Functions inherited from exahype2.solvers.rkdg.actionsets.AbstractRungeKuttaDGActionSet.AbstractRungeKuttaDGActionSet
 user_should_modify_template (self)
 Is the user allowed to modify the output.
 
- Public Member Functions inherited from peano4.solversteps.ActionSet.ActionSet
 get_constructor_body (self)
 Define a tailored constructor body.
 
 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)
 
 get_attributes (self)
 Return attributes as copied and pasted into the generated class.
 

Data Fields

 guard
 
- Data Fields inherited from peano4.solversteps.ActionSet.ActionSet
 descend_invocation_order
 
 parallel
 

Static Public Attributes

str TemplateProject
 
str TemplateUpdateFace
 
- 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 Attributes

 _butcher_tableau
 
 _face_projections
 
- Protected Attributes inherited from exahype2.solvers.rkdg.actionsets.AbstractRungeKuttaDGActionSet.AbstractRungeKuttaDGActionSet
 _solver
 

Detailed Description

Action set determining the final solution using a linear combination of previous Runge-Kutta guesses.

We solve the ODE

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

where we have multiple guesses for F according to the Butcher tableau. The final solution can be written down as linear combination over these guesses:

\( Q^{new} = Q^{old} + a_1 \cdot dt \cdot F_1(Q) + a_2 \cdot dt \cdot F_2(Q) + \dots \)

We observe the following simple facts:

  • The data in fineGridCell{{UNKNOWN_IDENTIFIER}}.value holds \( Q^{old} \)
  • The data in fineGridCell{{UNKNOWN_IDENTIFIER}}.value shall hold \( Q^{new} \) eventually. We thus can simply add the scaled estimated to it.
  • The estimates do not alter the auxiliary variables.
  • We can thus just keep the previous auxiliary variables implicitly.

Face projections

As I discuss in detail in solvers.rkdg.RungeKuttaDG.create_data_structures(), the field _estimate_projection usually holds the projection of a DG estimate, but not the real solution. At some points, I however need the real solution after a time step. Local time stepping for example depends upon it. So the final combination projects the solution again onto the faces.

In return, we could skip the projection within the first Runge-Kutta step where we effectively take the data and write it to the faces once again. But this is too much of an optimisation, I just retrigger the projection there agin.

Definition at line 16 of file ComputeFinalLinearCombination.py.

Constructor & Destructor Documentation

◆ __init__()

exahype2.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.__init__ ( self,
solver,
guard,
FaceProjections face_projections )

guard_project: String (C++ code) Predicate which controls if the solution is actually projected

guard_safe_old_time_step: String (C++ code) Predicate which controls if the projection should be copied into the old solution and the time step should also be moved over

Reimplemented from exahype2.solvers.rkdg.actionsets.AbstractRungeKuttaDGActionSet.AbstractRungeKuttaDGActionSet.

Definition at line 166 of file ComputeFinalLinearCombination.py.

References exahype2.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.__init__().

Referenced by exahype2.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.__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.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.get_action_set_name ( self)

You should replicate this function in each subclass, so you get meaningful action set names (otherwise, it will be AbstractFVActionSet0,1,2,...).

Reimplemented from exahype2.solvers.rkdg.actionsets.AbstractRungeKuttaDGActionSet.AbstractRungeKuttaDGActionSet.

Definition at line 207 of file ComputeFinalLinearCombination.py.

◆ get_body_of_operation()

exahype2.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.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.

Reimplemented from peano4.solversteps.ActionSet.ActionSet.

Definition at line 183 of file ComputeFinalLinearCombination.py.

References 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, exahype2.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination._face_projections, exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG._face_projections, 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.actionsets.AdaptivityCriterion.AdaptivityCriterion.guard, exahype2.solvers.fv.actionsets.HandleBoundary.HandleBoundary.guard, exahype2.solvers.fv.actionsets.InitialCondition.InitialCondition.guard, exahype2.solvers.fv.actionsets.PostprocessSolution.EmptyPostprocessSolution.guard, exahype2.solvers.fv.actionsets.PostprocessSolution.VolumeWisePostprocessSolution.guard, exahype2.solvers.fv.actionsets.PreprocessSolution.EmptyPreprocessSolution.guard, exahype2.solvers.fv.actionsets.PreprocessSolution.VolumeWisePreprocessSolution.guard, exahype2.solvers.fv.EnclaveTasking.MergeEnclaveTaskOutcome.guard, exahype2.solvers.limiting.actionsets.SaveNewCellData.SaveNewCellData.guard, exahype2.solvers.limiting.actionsets.SpreadLimiterStatus.SpreadLimiterStatus.guard, exahype2.solvers.limiting.actionsets.VerifyTroubledness.VerifyTroubledness.guard, exahype2.solvers.rkdg.actionsets.AdaptivityCriterion.AdaptivityCriterion.guard, exahype2.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.guard, exahype2.solvers.rkdg.actionsets.InitialCondition.InitialCondition.guard, exahype2.solvers.rkdg.actionsets.PostprocessSolution.EmptyPostprocessSolution.guard, exahype2.solvers.rkdg.actionsets.PostprocessSolution.DoFWisePostprocessSolution.guard, exahype2.solvers.rkdg.actionsets.PostprocessSolution.CellWisePostprocessSolution.guard, exahype2.solvers.rkdg.actionsets.PreprocessSolution.EmptyPreprocessSolution.guard, exahype2.solvers.rkdg.actionsets.PreprocessSolution.DoFWisePreprocessSolution.guard, exahype2.solvers.rkdg.actionsets.PreprocessSolution.CellWisePreprocessSolution.guard, exahype2.solvers.rkfd.actionsets.AdaptivityCriterion.AdaptivityCriterion.guard, exahype2.solvers.rkfd.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.guard, exahype2.solvers.rkfd.actionsets.HandleBoundary.HandleBoundary.guard, exahype2.solvers.rkfd.actionsets.InitialCondition.InitialCondition.guard, exahype2.solvers.rkfd.actionsets.PostprocessSolution.EmptyPostprocessSolution.guard, exahype2.solvers.rkfd.actionsets.PostprocessSolution.CellWisePostprocessSolution.guard, exahype2.solvers.rkfd.actionsets.PreprocessSolution.EmptyPreprocessSolution.guard, exahype2.solvers.rkfd.actionsets.PreprocessSolution.CellWisePreprocessSolution.guard, exahype2.solvers.rkfd.actionsets.RollOverUpdatedFace.RollOverUpdatedFace.guard, peano4.toolbox.blockstructured.ProjectPatchOntoFaces.ProjectPatchOntoFaces.guard(), peano4.toolbox.blockstructured.ProjectPatchOntoFaces.ProjectPatchOntoFaces.guard(), peano4.toolbox.blockstructured.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor.guard, exahype2.solvers.rkdg.actionsets.AddVolumeAndFaceSolution.AddVolumeAndFaceSolution.TemplateProject, exahype2.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.TemplateProject, exahype2.solvers.rkdg.actionsets.SolveRiemannProblem.SolveRiemannProblem.TemplateProject, exahype2.solvers.rkfd.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.TemplateProject, and exahype2.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.TemplateUpdateFace.

Here is the call graph for this function:

◆ get_includes()

exahype2.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.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 exahype2.solvers.rkdg.actionsets.AbstractRungeKuttaDGActionSet.AbstractRungeKuttaDGActionSet.

Definition at line 210 of file ComputeFinalLinearCombination.py.

References exahype2.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.get_includes().

Referenced by exahype2.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.get_includes().

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

Field Documentation

◆ _butcher_tableau

exahype2.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination._butcher_tableau
protected

◆ _face_projections

exahype2.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination._face_projections
protected

◆ guard

exahype2.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.guard

Definition at line 178 of file ComputeFinalLinearCombination.py.

Referenced by peano4.toolbox.blockstructured.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor._add_action_set_entries_to_dictionary(), exahype2.solvers.aderdg.actionsets.Correction.Correction.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.EnclaveTasking.MergeEnclaveTaskOutcome.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.ComputeFinalLinearCombination.ComputeFinalLinearCombination.get_body_of_operation(), exahype2.solvers.rkdg.actionsets.InitialCondition.InitialCondition.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.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.PostprocessSolution.CellWisePostprocessSolution.get_body_of_operation(), exahype2.solvers.rkfd.actionsets.PreprocessSolution.CellWisePreprocessSolution.get_body_of_operation(), exahype2.solvers.fv.actionsets.InitialCondition.InitialCondition.get_body_of_prepareTraversal(), and exahype2.solvers.rkfd.actionsets.InitialCondition.InitialCondition.get_body_of_prepareTraversal().

◆ TemplateProject

◆ TemplateUpdateFace

str exahype2.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.TemplateUpdateFace
static
Initial value:
= """
if ( repositories::{{SOLVER_INSTANCE}}.isLastGridSweepOfTimeStep() ) {
for (int leftRight=0; leftRight<2; leftRight++) {
if ( fineGridFace{{SOLVER_NAME}}FaceLabel.getUpdated(leftRight) ) {
fineGridFace{{SOLVER_NAME}}FaceLabel.setOldTimeStamp( leftRight, fineGridFace{{SOLVER_NAME}}FaceLabel.getNewTimeStamp(leftRight) );
fineGridFace{{SOLVER_NAME}}FaceLabel.setNewTimeStamp( leftRight, fineGridFace{{SOLVER_NAME}}FaceLabel.getUpdatedTimeStamp(leftRight) );
::exahype2::dg::copyOneSideOfFaceProjection(
{{NUMBER_OF_UNKNOWNS}} + {{NUMBER_OF_AUXILIARY_VARIABLES}},
{{ORDER}},
{{NUMBER_OF_FACE_PROJECTIONS}},
marker.getSelectedFaceNumber() % Dimensions,
leftRight==1,
fineGridFace{{UNKNOWN_IDENTIFIER}}EstimateProjection.value,
fineGridFace{{UNKNOWN_IDENTIFIER}}OldSolutionProjection.value
);
}
}
}
"""

Definition at line 145 of file ComputeFinalLinearCombination.py.

Referenced by exahype2.solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.get_body_of_operation().


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