![]() |
Peano
|
Project patch data onto faces, so the faces hold valid data which can feed into the subsequent Runge-Kutta step. More...
Public Member Functions | |
__init__ (self, solver) | |
solver: ADERDG Reference to creating class | |
guards (self) | |
guards (self, new_guards) | |
get_action_set_name (self) | |
You should replicate this function in each subclass, so you get meaningful action set names (otherwise, it will be AbstractRKFDActionSet0,1,2,...). | |
get_body_of_operation (self, operation_name) | |
Return actual C++ code snippets to be inserted into C++ code. | |
get_includes (self) | |
Return include statements that you need. | |
![]() | |
user_should_modify_template (self) | |
Is the user allowed to modify the output. | |
![]() | |
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. | |
Protected Attributes | |
_guards | |
_butcher_tableau | |
![]() | |
_solver | |
Static Private Attributes | |
str | __Template_TouchCellLastTime |
Project patch data onto faces, so the faces hold valid data which can feed into the subsequent Runge-Kutta step.
This class is based upon peano4.toolbox.blockstructured.ProjectPatchOntoFaces. Yet, it differs fundamentally in the way the inner-most loop is realised: The standard projection from the toolbox takes a solution from a patch and copies parts of this solution onto the faces. This is not what we want to have here: we have the solution plus a number of estimates, and we want to write exactly the type of Runge-Kutta linear combination onto the face that we need to set the proper halo data on the adjacent cells in the next grid sweep. Therefore, this class expects the Butcher tableau and first computes the Runge-Kutta linear combination. The outcome of this is then projected onto the faces.
The routine is always called as one of the last things, i.e. we have a valid estimate in. To some degree, we anticipate what will happening next in the Runge-Kutta scheme.
Once more: Each cell hosts the p predictions created by Runge-Kutta of the pth order. These are stored in the field rhs estimates. The projection combines these predictions using the Butcher tableau and projects the linear combination onto the face. The action set never ever uses what's stored in the value array. It always computes this linear combination.
Auxiliary parameters are not subject to the PDE in ExaHyPE's jargon. They typically carry material parameters or similar. We project them onto the faces, but here we don't do linear combinations due to the Butcher tableau, as the rhs estimates do not hold any auxiliary parameters at all.
The last Runge-Kutta step is slightly different. After the last Runge-Kutta estimate, the solver combines all the estimates into a new solution. Consult the action set ComputeFinalLinearCombination for details. After this has happened, we could take the plain solution stored within the cell and write this guy onto the faces.
Instead, we ignore the face that the action set ComputeFinalLinearCombination would do all of this. Instead, we compute the final linear combination from the rhs guesses (redundantly) and project the outcome onto the faces.
To be able to recompute the linear combination of rhs guesses from the Runge-Kutta scheme, this projection has to be invoked before we determine the final linear combination per cell and overwrite the solution in the patch. This means its descend_invocation_order has to be higher than the one from the linear combination computation, as touchCellLastTime() inverts this order.
The data is written onto the faces' QUpdate data field. Faces in the Runge-Kutta scheme hold three different Q representations:
It is the your job to ensure that the updated solution is later on copied over into the new solution, so it is taken into account by the halo/patch reconstruction.
I did not find a convenient, simple way how to tweak the projection from the toolbox according to this scheme. So I ended up with copying the whole thing over and change the critical things myself.
Another difference compared to the toolbox projection is that the projection also sets the isUpdated() flag and the UpdatedTimeStamp(). As the projection writes to these two updated records, it is important that you roll it over afterwards. This is done via the mapping RollOverUpdatedFace.
It is important to study this action set in combination with DynamicAMR. In the documentation of the latter I explain why we need the guard
if we want to support dynamic coarsening.
The action set expects users to specify one predicate per Runge-Kutta step. This means there is one if that checks which Runge-Kutta step is active. This one is typically combined with two other checks: Is the solver currently handling an unrefined cell (we only solve on the finest level) and are we in the right phase of an enclave solve. The latter is relevant if and only if we work with enclave tasking.
If the action set is used by an additional grid sweep outside of the actual time stepping, the checks become simpler:
Here, we basically say "for each unrefined cell always for each Runge-Kutta step as well as for the final linear combination". The latter one is reflected by the +1.
Besides this, you also have to roll over the data:
All solvers at the moment send out their face data in the suspended mode, so you should be fine here.
Definition at line 13 of file ProjectPatchOntoFaces.py.
exahype2.solvers.rkfd.actionsets.ProjectPatchOntoFaces.ProjectPatchOntoFaces.__init__ | ( | self, | |
solver ) |
solver: ADERDG Reference to creating class
Reimplemented from exahype2.solvers.rkfd.actionsets.AbstractRKFDActionSet.AbstractRKFDActionSet.
Definition at line 393 of file ProjectPatchOntoFaces.py.
exahype2.solvers.rkfd.actionsets.ProjectPatchOntoFaces.ProjectPatchOntoFaces.get_action_set_name | ( | self | ) |
You should replicate this function in each subclass, so you get meaningful action set names (otherwise, it will be AbstractRKFDActionSet0,1,2,...).
Reimplemented from exahype2.solvers.rkfd.actionsets.AbstractRKFDActionSet.AbstractRKFDActionSet.
Definition at line 417 of file ProjectPatchOntoFaces.py.
exahype2.solvers.rkfd.actionsets.ProjectPatchOntoFaces.ProjectPatchOntoFaces.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 420 of file ProjectPatchOntoFaces.py.
References exahype2.solvers.rkfd.actionsets.ProjectPatchOntoFaces.ProjectPatchOntoFaces.__Template_TouchCellLastTime, exahype2.tracer.DumpTracerIntoDatabase.DumpTracerIntoDatabase.__Template_TouchCellLastTime, peano4.toolbox.particles.ParticleAMR.ParticleAMR.__Template_TouchCellLastTime, peano4.toolbox.particles.ParticleTreeAnalysis.ParticleTreeAnalysis.__Template_TouchCellLastTime, peano4.toolbox.particles.UpdateParticle_MultiLevelInteraction_Sets.UpdateParticle_MultiLevelInteraction_Sets.__Template_TouchCellLastTime, peano4.toolbox.particles.UpdateParticle_MultiLevelInteraction_StackOfLists.UpdateParticle_MultiLevelInteraction_StackOfLists.__Template_TouchCellLastTime, peano4.toolbox.particles.UpdateParticle_MultiLevelInteraction_StackOfLists_ContiguousParticles.UpdateParticle_MultiLevelInteraction_StackOfLists_ContiguousParticles.__Template_TouchCellLastTime, swift2.actionsets.DynamicMeshRefinementAnalysis.DynamicMeshRefinementAnalysis.__Template_TouchCellLastTime, swift2.actionsets.UpdateParticleMarker.UpdateParticleMarker.__Template_TouchCellLastTime, 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.rkdg.actionsets.AddVolumeAndFaceSolution.AddVolumeAndFaceSolution.guards, exahype2.solvers.rkdg.actionsets.AddVolumeAndFaceSolution.AddVolumeAndFaceSolution.guards(), exahype2.solvers.rkdg.actionsets.DynamicAMR.DynamicAMR.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.AddVolumeAndFaceSolution.AddVolumeAndFaceSolution.guards(), exahype2.solvers.rkdg.actionsets.DynamicAMR.DynamicAMR.guards(), exahype2.solvers.rkdg.actionsets.HandleBoundary.HandleBoundary.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.ProjectLinearCombinationOfEstimatesOntoFaces.ProjectLinearCombinationOfEstimatesOntoFaces.guards(), exahype2.solvers.rkdg.actionsets.SolveRiemannProblem.SolveRiemannProblem.guards, exahype2.solvers.rkdg.actionsets.SolveRiemannProblem.SolveRiemannProblem.guards(), exahype2.solvers.rkdg.actionsets.SolveVolumeIntegral.SolveVolumeIntegral.guards(), exahype2.solvers.rkfd.actionsets.LinearCombinationOfEstimates.LinearCombinationOfEstimates.guards(), exahype2.solvers.rkfd.actionsets.ProjectPatchOntoFaces.ProjectPatchOntoFaces.guards(), exahype2.solvers.rkdg.actionsets.SolveRiemannProblem.SolveRiemannProblem.guards(), exahype2.solvers.rkdg.actionsets.SolveVolumeIntegral.SolveVolumeIntegral.guards, exahype2.solvers.rkdg.actionsets.SolveVolumeIntegral.SolveVolumeIntegral.guards(), exahype2.solvers.rkfd.actionsets.LinearCombinationOfEstimates.LinearCombinationOfEstimates.guards(), and exahype2.solvers.rkfd.actionsets.ProjectPatchOntoFaces.ProjectPatchOntoFaces.guards().
exahype2.solvers.rkfd.actionsets.ProjectPatchOntoFaces.ProjectPatchOntoFaces.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.rkfd.actionsets.AbstractRKFDActionSet.AbstractRKFDActionSet.
Definition at line 462 of file ProjectPatchOntoFaces.py.
exahype2.solvers.rkfd.actionsets.ProjectPatchOntoFaces.ProjectPatchOntoFaces.guards | ( | self | ) |
Definition at line 399 of file ProjectPatchOntoFaces.py.
References 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.
Referenced by exahype2.solvers.rkdg.actionsets.DynamicAMR.DynamicAMR.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.LinearCombinationOfEstimates.LinearCombinationOfEstimates.get_body_of_operation(), and exahype2.solvers.rkfd.actionsets.ProjectPatchOntoFaces.ProjectPatchOntoFaces.get_body_of_operation().
exahype2.solvers.rkfd.actionsets.ProjectPatchOntoFaces.ProjectPatchOntoFaces.guards | ( | self, | |
new_guards ) |
Definition at line 405 of file ProjectPatchOntoFaces.py.
References 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, exahype2.solvers.rkfd.actionsets.ProjectPatchOntoFaces.ProjectPatchOntoFaces._guards, 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, and exahype2.solvers.rkfd.SeparateSweepsWithEnclaveTasking.UpdateCell._solver.
Referenced by exahype2.solvers.rkdg.actionsets.DynamicAMR.DynamicAMR.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.LinearCombinationOfEstimates.LinearCombinationOfEstimates.get_body_of_operation(), and exahype2.solvers.rkfd.actionsets.ProjectPatchOntoFaces.ProjectPatchOntoFaces.get_body_of_operation().
|
staticprivate |
Definition at line 140 of file ProjectPatchOntoFaces.py.
Referenced by exahype2.solvers.rkfd.actionsets.ProjectPatchOntoFaces.ProjectPatchOntoFaces.get_body_of_operation(), exahype2.tracer.DumpTracerIntoDatabase.DumpTracerIntoDatabase.get_body_of_operation(), peano4.toolbox.particles.ParticleAMR.ParticleAMR.get_body_of_operation(), peano4.toolbox.particles.ParticleTreeAnalysis.ParticleTreeAnalysis.get_body_of_operation(), peano4.toolbox.particles.UpdateParticle_MultiLevelInteraction_Sets.UpdateParticle_MultiLevelInteraction_Sets.get_body_of_operation(), peano4.toolbox.particles.UpdateParticle_MultiLevelInteraction_StackOfLists.UpdateParticle_MultiLevelInteraction_StackOfLists.get_body_of_operation(), peano4.toolbox.particles.UpdateParticle_MultiLevelInteraction_StackOfLists_ContiguousParticles.UpdateParticle_MultiLevelInteraction_StackOfLists_ContiguousParticles.get_body_of_operation(), swift2.actionsets.DynamicMeshRefinementAnalysis.DynamicMeshRefinementAnalysis.get_body_of_operation(), and swift2.actionsets.UpdateParticleMarker.UpdateParticleMarker.get_body_of_operation().
|
protected |
Definition at line 396 of file ProjectPatchOntoFaces.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().
|
protected |
Definition at line 395 of file ProjectPatchOntoFaces.py.
Referenced by exahype2.solvers.rkdg.actionsets.AddVolumeAndFaceSolution.AddVolumeAndFaceSolution.get_body_of_operation(), exahype2.solvers.rkdg.actionsets.LinearCombinationOfEstimates.LinearCombinationOfEstimates.guards(), exahype2.solvers.rkfd.actionsets.LinearCombinationOfEstimates.LinearCombinationOfEstimates.guards(), exahype2.solvers.rkfd.actionsets.ProjectPatchOntoFaces.ProjectPatchOntoFaces.guards(), 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().