Peano
Loading...
Searching...
No Matches
exahype2.solvers.fv.EnclaveTasking.UpdateCell Class Reference

Update cell in primary sweep. More...

Inheritance diagram for exahype2.solvers.fv.EnclaveTasking.UpdateCell:
Collaboration diagram for exahype2.solvers.fv.EnclaveTasking.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.
 
 get_action_set_name (self)
 Return unique action set name.
 
- Public Member Functions inherited from peano4.toolbox.blockstructured.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor
 get_constructor_body (self)
 Define a tailored constructor body.
 
 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)
 

Data Fields

 functor_implementation
 
- 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 Public Attributes

 TemplateUpdateCell
 
- 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)
 First ask the solver to add its symbols, and then re-construct the functor which should not contain any symbols after that anymore.
 

Protected Attributes

 _Template_TouchCellFirstTime_Preamble
 
 _solver
 

Additional Inherited Members

- 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 cell in primary sweep.

This action set is used in the primary sweeps only. In the secondary sweep, its counterpart, the action set MergeEnclaveTaskOutcome, is active and works in all data computed by tasks which have been spawned here.

We extend the superclass ReconstructPatchAndApplyFunctor and hence have access to the reconstructed data including a halo layer of one. Furthermore, the superclass provides us with a guard which we should use, as this guard ensures that we reconstruct the patch plus halo if and only if certain conditions are met. By default, we compute only on unrefined octants.

Our condition whether to spawn a task or to compute the new time step data immediately depends on peano4::datamanagement::CellMarker::willBeSkeletonCell(). If this predicate holds, we compute stuff straightaway. Otherwise, we span a new enclave task. While this check does the job in almost all cases, there are special situations where you might want to label more cells as skeleton cells.

Modify templates

You can alter the template. Typical codes augment _Template_TouchCellFirstTime_Preamble for example. However, there are two things to consider:

  • _Template_TouchCellFirstTime_Preamble is a member of the class and initialised in the constructor.
  • The constructor is used to create an object in the create_action_sets() of the using class.

If you want to alter the preamble, you thus should specialise create_action_sets() and invoke the supertype's create_action_sets(). After that, alter self._action_set_update_cell._Template_TouchCellFirstTime_Preamble. We recommend to add an entry and not to replace the preamble, as the preamble already consists meaningful code.

Definition at line 21 of file EnclaveTasking.py.

Constructor & Destructor Documentation

◆ __init__()

exahype2.solvers.fv.EnclaveTasking.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 132 of file EnclaveTasking.py.

Member Function Documentation

◆ _add_action_set_entries_to_dictionary()

exahype2.solvers.fv.EnclaveTasking.UpdateCell._add_action_set_entries_to_dictionary ( self,
d )
protected

◆ get_action_set_name()

exahype2.solvers.fv.EnclaveTasking.UpdateCell.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.toolbox.blockstructured.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor.

Definition at line 196 of file EnclaveTasking.py.

◆ get_includes()

Field Documentation

◆ _solver

exahype2.solvers.fv.EnclaveTasking.UpdateCell._solver
protected

Definition at line 178 of file EnclaveTasking.py.

Referenced by 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.fv.EnclaveTasking.UpdateCell._Template_TouchCellFirstTime_Preamble
protected

◆ functor_implementation

exahype2.solvers.fv.EnclaveTasking.UpdateCell.functor_implementation

◆ TemplateUpdateCell

exahype2.solvers.fv.EnclaveTasking.UpdateCell.TemplateUpdateCell
static
Initial value:
= jinja2.Template(
)

Definition at line 60 of file EnclaveTasking.py.


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