|
| | CellMarker (const peano4::grid::GridTraversalEvent &event) |
| |
| bool | hasBeenRefined () const |
| | Has the cell been refined when we kicked off this mesh traversal.
|
| |
| bool | willBeRefined () const |
| | Will the cell be refined in the subsequent iteration.
|
| |
| tarch::la::Vector< Dimensions, double > | x () const |
| | Centre of a cell.
|
| |
| tarch::la::Vector< Dimensions, double > | getInvokingParentCellsCentre () const |
| | See getInvokingCellCentre().
|
| |
| bool | isContained (const tarch::la::Vector< Dimensions, double > &x, double tolerance=tarch::la::NUMERICAL_ZERO_DIFFERENCE) const |
| | Is x contained within cell identified by marker object.
|
| |
| bool | overlaps (const tarch::la::Vector< Dimensions, double > &offset, const tarch::la::Vector< Dimensions, double > &size) const |
| |
| tarch::la::Vector< Dimensions, double > | h () const |
| |
| tarch::la::Vector< Dimensions, double > | getOffset () const |
| |
| std::string | toString () const |
| |
| bool | isLocal () const |
| | Usually if you have an event of a cell, then the cell is alo local.
|
| |
| bool | isParentLocal () const |
| | A cell can be local and its parent still might not be local.
|
| |
| bool | hasBeenEnclaveCell () const |
| | Define enclave cell.
|
| |
| bool | willBeEnclaveCell () const |
| |
| bool | hasBeenSkeletonCell () const |
| | A skeleton cell is a not-enclave cell.
|
| |
| bool | willBeSkeletonCell () const |
| |
| tarch::la::Vector< Dimensions, int > | getRelativePositionWithinFatherCell () const |
| |
|
| static bool | isContained (const tarch::la::Vector< Dimensions, double > &x, const tarch::la::Vector< Dimensions, double > &cellCentre, const tarch::la::Vector< Dimensions, double > &h, double tolerance) |
| | Is point contained in cell.
|
| |
| static void | initDatatype () |
| | To be called prior to any MPI usage of this class.
|
| |
| static void | shutdownDatatype () |
| |
| static void | send (const CellMarker &buffer, int destination, int tag, MPI_Comm communicator) |
| | In DaStGen (the first version), I had a non-static version of the send as well as the receive.
|
| |
| static void | receive (CellMarker &buffer, int source, int tag, MPI_Comm communicator) |
| |
| static void | send (const CellMarker &buffer, int destination, int tag, std::function< void()> startCommunicationFunctor, std::function< void()> waitFunctor, MPI_Comm communicator) |
| | Alternative to the other send() where I trigger a non-blocking send an then invoke the functor until the corresponding MPI_Test tells me that the message went through.
|
| |
| static void | receive (CellMarker &buffer, int source, int tag, std::function< void()> startCommunicationFunctor, std::function< void()> waitFunctor, MPI_Comm communicator) |
| |
| static void | sendAndPollDanglingMessages (const CellMarker &message, int destination, int tag, MPI_Comm communicator) |
| |
| static void | receiveAndPollDanglingMessages (CellMarker &message, int source, int tag, MPI_Comm communicator) |
| |
Cell marker.
This object provides information on the cell aka octant within the spacetree. This includes spatial information such as size and position. It also comprises mesh topology properties such as "will this cell be refined" or "is its parent a
local cell".
It is an object which users are not supposed to manipulate. The mesh traversal automaton creates it once per octant while it runs through the mesh and passes in information about adjacent vertices, parent data, and so forth. The constructor then distills the user representation from that data and, from hereon, users can use this distilled information to make logical decisions what to do and how to do things within the spacetree octant.
Definition at line 39 of file CellMarker.h.
| bool peano4::datamanagement::CellMarker::hasBeenEnclaveCell |
( |
| ) |
const |
Define enclave cell.
A enclave cell in the definition of Charrier, Hazelwood, Weinzierl is a cell that is not a skeleton cell. A skeleton cell is cell which either
- is adjacent to a resolution transitions; or
- is adjacent to a domain boundary.
Enclave cells are cells that you can potentially (if your algorithm allows) deploy to a task running in the background. The only thing you have to do is to ensure that it is passed all data via firstprivate copy and that you never refine an enclave cell.
Dynamic load balancing
In line with the above definition, we may label a cell as enclave cell if some dynamic load balancing is triggered or actually running. In this case, any enclave cell might be subject of a domain transfer. If we deployed its computation to the background, we could move around a cell whose computations is done by a thread currently.
- See also
- page_exahype_solvers_enclave_solvers for a high-level description
| bool peano4::datamanagement::CellMarker::hasBeenRefined |
( |
| ) |
const |
Has the cell been refined when we kicked off this mesh traversal.
If the attribute holds, this implies that the cell is refined in this sweep, as cells do not change their state throughout the traversal. It does not mean that the cell will be refined in the next mesh traversal however. To find this out, you have to study willBeRefined().
- See also
- willBeRefined()
Is point contained in cell.
Evaluate if x is in a h/2 environment around cellCentre. We use tarch::la comparison functions as we operate with floating point values. tolerance is the tolerance we pass into these functions.
See the other isContained() routine for a description, but keep in mind that this other routine refers to this place, i.e. this routine provides the actual behaviour.
- Parameters
-
| x | Point to query |
| cellCentre | Centre of cell of interest |
| h | Mesh size on this level |
| tolerance | Search tolerance |
Is x contained within cell identified by marker object.
Check whether the point x is contained within the marker. This is an operation which works with smaller equals and greater equals and numerical tolerances. Therefore, the routine includes any x that is exactly on a cell boundary. The other way round: a particle for example that resides exactly on the cell boundary, subject to the chosen floating point precision in the tarch::la library, will be considered to belong both to its left and its right neighbour.
On top of the fact that we work with closed intervals, it is important to realise that we work with floating point comparisons from the tarch::la library. Therefore, we employ some built-in floating point precision. You might want to switch to another precision. Most popular is a relative size that takes the dimensions of the marker into account:
marker.isContained(
p->getX(), tarch::la::relativeEps( marker.h()(0) )
)
This variant uses relativeEps() as defined in tarch/la/Scalar.h.
- See also
- The routine calls the static isContained() routine and passes the local attributes in.
- Parameters
-
| tolerance | Absolute tolerance when we compare two values. |
| static void peano4::datamanagement::CellMarker::send |
( |
const CellMarker & | buffer, |
|
|
int | destination, |
|
|
int | tag, |
|
|
MPI_Comm | communicator ) |
|
static |
In DaStGen (the first version), I had a non-static version of the send as well as the receive.
However, this did not work with newer C++11 versions, as a member function using this as pointer usually doesn't see the vtable while the init sees the object from outside, i.e. including a vtable. So this routine now is basically an alias for a blocking MPI_Send.
| bool peano4::datamanagement::CellMarker::willBeRefined |
( |
| ) |
const |
Will the cell be refined in the subsequent iteration.
If hasBeenRefined() returns false but willBeRefined() holds, we have a cell which Peano 4 will refine in the current mesh sweep. It might however not yet be refined. This analysis makes sense once we take into account that refinement in Peano first have to be triggered. In the subsequent mesh traversal, the affected vertices then switch to refining and the new mesh elements are actually added.
The function which ultimately defines if this flag is set or not is peano4::grid::willVerticesBeRefined().
If willBeRefined() is false but hasBeenRefined() is true, the current cell is refined, but it will be coarsened in the very mesh traversal in which we run through the mesh.