Peano
Loading...
Searching...
No Matches
api.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor Class Reference

ReconstructPatchWithHalo plus a functor invoked once the reconstruction (into reconstructed_patch) is done -. More...

Inheritance diagram for api.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor:
Collaboration diagram for api.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor:

Public Member Functions

 __init__ (self, patch, patch_overlap, reconstructed_patch, functor_implementation, guard="true", add_assertions_to_halo_exchange=True, additional_includes="")
 patch, patch_overlap, reconstructed_patch, guard, add_assertions_to_halo_exchange, additional_includes:
 
 get_action_set_name (self)
 Return unique action set name.
 
 get_body_of_operation (self, operation_name)
 Return actual C++ code snippets to be inserted into C++ code.
 
- Public Member Functions inherited from api.ReconstructPatchWithHalo.ReconstructPatchWithHalo
 get_constructor_body (self)
 Define a tailored constructor body.
 
 user_should_modify_template (self)
 Is the user allowed to modify the output.
 
 get_guard_of_operation (self, operation_name)
 Return the guard of an operation.
 
 get_attributes (self)
 Return attributes as copied and pasted into the generated class.
 
 get_includes (self)
 Return include statements that you need.
 
- Public Member Functions inherited from peano4.api.solversteps.ActionSet.ActionSet
 get_static_initialisations (self, full_qualified_classname)
 
 get_destructor_body (self)
 
 get_body_of_createGridControlEventsForNextTraversal (self)
 Return the grid control events that this action set wants to trigger.
 
 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_body_of_unprepareTraversal (self)
 
 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

 functor_implementation
 
- Data Fields inherited from api.ReconstructPatchWithHalo.ReconstructPatchWithHalo
 guard
 
 no_of_unknowns
 
 dofs_per_axis
 
 total_overlap
 
 overlap_name
 
 patch_name
 
 reconstructed_patch_name
 
 add_assertions_to_halo_exchange
 
 additional_includes
 
- Data Fields inherited from peano4.api.solversteps.ActionSet.ActionSet
 descend_invocation_order
 
 parallel
 

Protected Member Functions

 _add_action_set_entries_to_dictionary (self, d)
 Befill dictionary -.
 

Static Protected Attributes

str _Template_TouchCellFirstTime_Core
 
- Static Protected Attributes inherited from api.ReconstructPatchWithHalo.ReconstructPatchWithHalo
str _Template_TouchCellFirstTime_Preamble
 
str _Template_TouchCellFirstTime_Fill_Patch
 
str _Template_TouchCellFirstTime_Fill_Halos
 
str _Template_TouchCellFirstTime_Epilogue
 

Additional Inherited Members

- 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"
 

Detailed Description

ReconstructPatchWithHalo plus a functor invoked once the reconstruction (into reconstructed_patch) is done -.

See also
ReconstructPatchWithHalo for the reconstruction itself, which this class does not repeat. The functor gets access to the reconstructed data (oldQWithHalo, aliasing reconstructed_patch's own accessor - no separate scratch array is allocated) and writes its result into patch's own accessor (newQ).

If you want to swap the functor, please replace self.functor_implementation, and ensure that all external references (text replacements) are already resolved. Consult _add_action_set_entries_to_dictionary() for details.

Definition at line 8 of file ReconstructPatchAndApplyFunctor.py.

Constructor & Destructor Documentation

◆ __init__()

api.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor.__init__ (   self,
  patch,
  patch_overlap,
  reconstructed_patch,
  functor_implementation,
  guard = "true",
  add_assertions_to_halo_exchange = True,
  additional_includes = "" 
)

patch, patch_overlap, reconstructed_patch, guard, add_assertions_to_halo_exchange, additional_includes:

See also
ReconstructPatchWithHalo.

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.

Reimplemented from api.ReconstructPatchWithHalo.ReconstructPatchWithHalo.

Definition at line 24 of file ReconstructPatchAndApplyFunctor.py.

References api.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor.__init__().

Referenced by api.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor.__init__().

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

Member Function Documentation

◆ _add_action_set_entries_to_dictionary()

api.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor._add_action_set_entries_to_dictionary (   self,
  d 
)
protected

Befill dictionary -.

See also
ReconstructPatchWithHalo._add_action_set_entries_to_dictionary(), which this calls first. On top of that, this one also resolves the functor implementation (CELL_FUNCTOR_IMPLEMENTATION).

Please note that we do not replace entries in the functor implementation: The overall code created by this action set consists of different parts realised as different templates. The templates are subject to a text replacement system and then are concatenated. One of the things that is replaced within the templates is the actual functor implementation (CELL_FUNCTOR_IMPLEMENTATION). If this one contains again free parameters, it is your responsibility to first resolve those parameters, and then to reset the functor in this routine.

If you want to replace the functor, you can hence either first call this routine and then change d["CELL_FUNCTOR_IMPLEMENTATION"] or you set self.functor_implementation and then you call this routine, i.e. the superclass.

Reimplemented from api.ReconstructPatchWithHalo.ReconstructPatchWithHalo.

Definition at line 58 of file ReconstructPatchAndApplyFunctor.py.

References api.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor._add_action_set_entries_to_dictionary(), solvers.fv.EnclaveTasking.UpdateCell.functor_implementation, and api.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor.functor_implementation.

Referenced by api.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor._add_action_set_entries_to_dictionary(), api.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor.get_body_of_operation(), and api.ReconstructPatchWithHalo.ReconstructPatchWithHalo.get_body_of_operation().

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

◆ get_action_set_name()

api.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor.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 api.ReconstructPatchWithHalo.ReconstructPatchWithHalo.

Definition at line 84 of file ReconstructPatchAndApplyFunctor.py.

◆ get_body_of_operation()

api.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor.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 api.ReconstructPatchWithHalo.ReconstructPatchWithHalo.

Definition at line 94 of file ReconstructPatchAndApplyFunctor.py.

References solvers.fv.EnclaveTasking.UpdateCell._add_action_set_entries_to_dictionary(), solvers.fv.SingleSweep.UpdateCell._add_action_set_entries_to_dictionary(), api.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor._add_action_set_entries_to_dictionary(), api.ReconstructPatchWithHalo.ReconstructPatchWithHalo._add_action_set_entries_to_dictionary(), solvers.aderdg.actionsets.Prediction.Prediction._Template_TouchCellFirstTime_Core, api.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor._Template_TouchCellFirstTime_Core, solvers.aderdg.actionsets.Prediction.Prediction._Template_TouchCellFirstTime_Epilogue, api.ReconstructPatchWithHalo.ReconstructPatchWithHalo._Template_TouchCellFirstTime_Epilogue, api.ReconstructPatchWithHalo.ReconstructPatchWithHalo._Template_TouchCellFirstTime_Fill_Halos, api.ReconstructPatchWithHalo.ReconstructPatchWithHalo._Template_TouchCellFirstTime_Fill_Patch, solvers.aderdg.actionsets.Prediction.Prediction._Template_TouchCellFirstTime_Preamble, solvers.fv.EnclaveTasking.UpdateCell._Template_TouchCellFirstTime_Preamble, solvers.fv.SingleSweep.UpdateCell._Template_TouchCellFirstTime_Preamble, and api.ReconstructPatchWithHalo.ReconstructPatchWithHalo._Template_TouchCellFirstTime_Preamble.

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:

Field Documentation

◆ _Template_TouchCellFirstTime_Core

str api.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor._Template_TouchCellFirstTime_Core
staticprotected
Initial value:
= """
double* newQ = {CELL_ACCESSOR}.value;
{CELL_FUNCTOR_IMPLEMENTATION}
"""

Definition at line 88 of file ReconstructPatchAndApplyFunctor.py.

Referenced by solvers.aderdg.actionsets.Prediction.Prediction.get_body_of_operation(), and api.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor.get_body_of_operation().

◆ functor_implementation

api.ReconstructPatchAndApplyFunctor.ReconstructPatchAndApplyFunctor.functor_implementation

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