10 """! Update the cell label within a sweep
12 Update the cell label initialises cell labels correctly when a cell is
13 created, and it also resets the update flag.
15 It is important that this label update happens before the actual cell
16 update. This is ensured via a correct invocation order in
17 FV.add_actions_to_perform_time_step().
19 Cell labels exist everywhere and are not masked out via the LoadStoreCompute
20 flag. That is, we store them persistently in each and every cell on all
21 resolution levels all the time - even if the underlying solver des not
22 exist in such a cell. In this case, the cell label should be false all the
27 return solver_name +
"CellLabel"
31 SetLabels is an action set which is automatically merged into all ExaHyPE2
32 steps by the project. There's nothing for the user solvers to be done here.
36 super(UpdateCellLabel,self).
__init__(descend_invocation_order=1,parallel=
False)
54 return __name__.replace(
".py",
"").replace(
".",
"_")
63 if operation_name==ActionSet.OPERATION_CREATE_CELL:
65 fineGridCell""" + UpdateCellLabel.get_attribute_name(self.
_solver_name) +
""".setSemaphoreNumber( ::exahype2::EnclaveBookkeeping::NoEnclaveTaskNumber );
66 fineGridCell""" + UpdateCellLabel.get_attribute_name(self.
_solver_name) +
""".setAMDCriterionEvaluatedThroughoutGridConstruction( false );
67 if ( tarch::la::equals(repositories::getMinTimeStamp(),0.0) ) {
68 fineGridCell""" + UpdateCellLabel.get_attribute_name(self.
_solver_name) +
""".setTimeStamp( 0.0 );
69 fineGridCell""" + UpdateCellLabel.get_attribute_name(self.
_solver_name) +
""".setTimeStepSize( 0.0 );
72 fineGridCell""" + UpdateCellLabel.get_attribute_name(self.
_solver_name) +
""".setTimeStamp( coarseGridCell""" + UpdateCellLabel.get_attribute_name(self.
_solver_name) +
""".getTimeStamp() );
73 fineGridCell""" + UpdateCellLabel.get_attribute_name(self.
_solver_name) +
""".setTimeStepSize( coarseGridCell""" + UpdateCellLabel.get_attribute_name(self.
_solver_name) +
""".getTimeStepSize() );
75 fineGridCell""" + UpdateCellLabel.get_attribute_name(self.
_solver_name) +
""".setHasUpdated( false );
87#include "exahype2/EnclaveBookkeeping.h"
88#include "repositories/SolverRepository.h"
97 Build up the DaStGen2 data structure that we need per cell to maintain
98 per-cell data per solver.
100 :: Attributes per cell
102 - SemaphoreNumber is a number that links to a task that has been spawn in the
103 background. Consult the enclave tasking and its bookkeeping for details.
104 - TimeStamp holds the local time stamp of the current cell. Even for global
105 time stepping, it is important that this time stamp is stored per cell, as
106 some postprocessing (particles, e.g.) rely on the field.
107 - TimeStepSize (similar to arguments around TimeStamp).
108 - AMDCriterionEvaluatedThroughoutGridConstruction
109 - DeviceNumber is the number of the GPU that the device memory of this cell is allocated on.
110 - DeviceMemoryAddress is the pointer to the device memory of this cell. The device
111 memory is used to store the reconstructed patch of the cell when enclave tasking is used.
112 - DeviceMemoryStatus is the status of the device memory of this cell
128 result.peano4_mpi_and_storage_aspect.merge_implementation =
"""
130 case ::peano4::grid::TraversalObserver::SendReceiveContext::BoundaryExchange:
131 assertionMsg( false, "cells should never be subject of a boundary exchange" );
133 case ::peano4::grid::TraversalObserver::SendReceiveContext::ForkDomain:
137 assertionMsg( false, "not implemented yet" );
cardinality is a string (you can thus use symbols as well as long as they will be defined at compile ...
Wrapper around C++ enumerations which is not a datatype supported natively by MPI.
Update the cell label within a sweep.
get_includes(self)
Return include statements that you need.
get_destructor_body(self)
user_should_modify_template(self)
Is the user allowed to modify the output.
get_attribute_name(solver_name)
get_action_set_name(self)
Return unique action set name.
get_constructor_body(self)
Define a tailored constructor body.
get_attributes(self)
Return attributes as copied and pasted into the generated class.
get_body_of_operation(self, operation_name)
Return actual C++ code snippets to be inserted into C++ code.
__init__(self, solver_name)
Default superclass for any data model in Peano which is stored within the grid.
Action set (reactions to events)
create_cell_label(solver_name)
Build up the DaStGen2 data structure that we need per cell to maintain per-cell data per solver.