![]() |
Peano
|
Provide information about selected face. More...
#include <FaceMarker.h>
Public Member Functions | |
FaceMarker (const peano4::grid::GridTraversalEvent &event, int select=0) | |
The derivation of _isLocal and _isRefined is very similar to peano4::grid::Spacetree::getFaceType(). | |
FaceMarker & | select (int face) |
Selects a face within a cell, i.e. | |
int | getSelectedFaceNumber () const |
Return the number of the face. | |
tarch::la::Vector< Dimensions, double > | x (int i) const |
Center of a particular face with respective reference cell. | |
tarch::la::Vector< Dimensions, double > | x () const |
A marker is always tied to one particular face. | |
tarch::la::Vector< Dimensions, double > | normal (int i) const |
This operation gives you the normal of a certain face. | |
tarch::la::Vector< Dimensions, double > | normal () const |
tarch::la::Vector< Dimensions, double > | outerNormal (int i) const |
This operation gives you the outer normal of a cell. | |
tarch::la::Vector< Dimensions, double > | outerNormal () const |
tarch::la::Vector< Dimensions, double > | h () const |
Size of the underlying cell. | |
std::string | toString () const |
bool | hasBeenRefined () const |
Has a face been refined. | |
bool | hasBeenRefined (int i) const |
bool | willBeRefined () const |
bool | willBeRefined (int i) const |
bool | isLocal () const |
bool | isLocal (int i) const |
bool | isAdjacentToParallelBoundary () const |
bool | isAdjacentToParallelBoundary (int i) const |
tarch::la::Vector< Dimensions, int > | getRelativePositionWithinFatherCell () const |
Return relative position within father cell. | |
tarch::la::Vector< Dimensions, int > | getRelativePositionWithinFatherCell (int i) const |
tarch::la::Vector< Dimensions-1, int > | getRelativePositionWithinFatherFace () const |
Return relative position of a subface within its father face. | |
bool | isInteriorFaceWithinPatch () const |
The term patch here refers to a 3x3 or 3x3x3 refinement. | |
Private Attributes | |
tarch::la::Vector< Dimensions, double > | _cellCentre |
Centre of the underlying cell. | |
tarch::la::Vector< Dimensions, double > | _h |
Size of the underlying cell. | |
bool | _cellIsLocal |
int | _select |
std::bitset< 2 *Dimensions > | _hasBeenRefined |
std::bitset< 2 *Dimensions > | _willBeRefined |
std::bitset< 2 *Dimensions > | _isLocal |
std::bitset< 2 *Dimensions > | _isAdjacentToParallelBoundary |
tarch::la::Vector< Dimensions, int > | _relativePositionOfCellWithinFatherCell |
Entries from (0,1,2). | |
Provide information about selected face.
This routine is passed into any observer/action set routine which refers to a face, so routines like touchFaceFirstTime(). It provides you with information about the particular face as well as their location within the mesh.
Definition at line 35 of file FaceMarker.h.
peano4::datamanagement::FaceMarker::FaceMarker | ( | const peano4::grid::GridTraversalEvent & | event, |
int | select = 0 ) |
The derivation of _isLocal and _isRefined is very similar to peano4::grid::Spacetree::getFaceType().
Definition at line 10 of file FaceMarker.cpp.
References _hasBeenRefined, _willBeRefined, peano4::grid::GridTraversalEvent::getHasBeenRefined(), peano4::grid::GridTraversalEvent::getWillBeRefined(), normal(), and TwoPowerD.
tarch::la::Vector< Dimensions, int > peano4::datamanagement::FaceMarker::getRelativePositionWithinFatherCell | ( | ) | const |
Return relative position within father cell.
The result is from (0,1,2,3) x (0,1,2) x (0,1,2) or (0,1,2) x (0,1,2,3) x (0,1,2) or (0,1,2) x (0,1,2) x (0,1,2,3).
Definition at line 138 of file FaceMarker.cpp.
References assertion1, and toString().
Referenced by toolbox::blockstructured::tests::IandRInMatricesTest::compareInterpolateLinearCaseToTensorProductPatch(), and toolbox::blockstructured::tests::IandRInMatricesTest::compareRestrictLinearCaseToTensorProductPatch().
tarch::la::Vector< Dimensions, int > peano4::datamanagement::FaceMarker::getRelativePositionWithinFatherCell | ( | int | i | ) | const |
Definition at line 144 of file FaceMarker.cpp.
References assertion2, and toString().
tarch::la::Vector< Dimensions-1, int > peano4::datamanagement::FaceMarker::getRelativePositionWithinFatherFace | ( | ) | const |
Return relative position of a subface within its father face.
The result is from (0,1,2)^(Dimensions-1)
Definition at line 153 of file FaceMarker.cpp.
Referenced by toolbox::blockstructured::tests::IandRSecondOrderTest::compareInterpolateLinearCaseToTensorProduct(), toolbox::blockstructured::tests::IandRThirdOrderTest::compareInterpolateLinearCaseToTensorProduct(), toolbox::blockstructured::tests::IandRSecondOrderTest::compareRestrictLinearCaseToTensorProduct(), and toolbox::blockstructured::tests::IandRThirdOrderTest::compareRestrictLinearCaseToTensorProduct().
int peano4::datamanagement::FaceMarker::getSelectedFaceNumber | ( | ) | const |
Return the number of the face.
If you use the modulo Dimensions, then you implicitly know along which coordinate axis the corresponding face normal points.
Definition at line 103 of file FaceMarker.cpp.
tarch::la::Vector< Dimensions, double > peano4::datamanagement::FaceMarker::h | ( | ) | const |
Size of the underlying cell.
Definition at line 92 of file FaceMarker.cpp.
Referenced by exahypype.kernel::Evaluate(), and exahypype.kernel::halo().
bool peano4::datamanagement::FaceMarker::hasBeenRefined | ( | ) | const |
Has a face been refined.
We do not really refine faces. We refine cells. Cells in turn are refined if and only if one of their adjacent vertices holds a refine flag. Consequently, if one vertex adjacent to a face carries the refine flag, the face will be refined as well. In this case, it is not hanging.
Definition at line 113 of file FaceMarker.cpp.
Definition at line 108 of file FaceMarker.cpp.
bool peano4::datamanagement::FaceMarker::isAdjacentToParallelBoundary | ( | ) | const |
bool peano4::datamanagement::FaceMarker::isInteriorFaceWithinPatch | ( | ) | const |
The term patch here refers to a 3x3 or 3x3x3 refinement.
The routine determines whether the face is on the boundary of this patch of not.
Definition at line 167 of file FaceMarker.cpp.
bool peano4::datamanagement::FaceMarker::isLocal | ( | ) | const |
Definition at line 133 of file FaceMarker.cpp.
Definition at line 128 of file FaceMarker.cpp.
tarch::la::Vector< Dimensions, double > peano4::datamanagement::FaceMarker::normal | ( | ) | const |
Definition at line 57 of file FaceMarker.cpp.
Referenced by FaceMarker().
tarch::la::Vector< Dimensions, double > peano4::datamanagement::FaceMarker::normal | ( | int | i | ) | const |
This operation gives you the normal of a certain face.
The orientation of the normal depends on the context in which the face marker is used: Every operation within Peano is always triggered from a cell point of view. The normal corresponds to this view. If you run through a mesh twice, and if you twice hit the same face, the normal thus might be mirrored as a face marker might be constructed from the other adjacent cell.
We do enumerate the faces as follows: The first face is the one whose normal is parallel to first coordinate axis. The second face is the one whose normal is parallel to the second axis. The d+1th face is the one parallel to the very first face. The very first face however is closer to the origin in the unit cube.
Definition at line 49 of file FaceMarker.cpp.
tarch::la::Vector< Dimensions, double > peano4::datamanagement::FaceMarker::outerNormal | ( | ) | const |
Definition at line 72 of file FaceMarker.cpp.
tarch::la::Vector< Dimensions, double > peano4::datamanagement::FaceMarker::outerNormal | ( | int | i | ) | const |
This operation gives you the outer normal of a cell.
Different to normal(int), the normal however is oriented along the domain boundaries, i.e. it always points outside from the local domain.
Definition at line 62 of file FaceMarker.cpp.
peano4::datamanagement::FaceMarker & peano4::datamanagement::FaceMarker::select | ( | int | face | ) |
Selects a face within a cell, i.e.
now the marker knows to which face it corresponds. After that, the routine returns a this reference.
face | Number from 0 to 2d-1 |
Definition at line 97 of file FaceMarker.cpp.
Referenced by exahype2::fv::tests::InterpolationRestrictionTest::testAverageRestrictionWithTensorProduct(), and exahype2::fv::tests::InterpolationRestrictionTest::testInjectionExtrapolationRestrictionWithTensorProduct().
std::string peano4::datamanagement::FaceMarker::toString | ( | ) | const |
Definition at line 77 of file FaceMarker.cpp.
bool peano4::datamanagement::FaceMarker::willBeRefined | ( | ) | const |
Definition at line 123 of file FaceMarker.cpp.
Definition at line 118 of file FaceMarker.cpp.
tarch::la::Vector< Dimensions, double > peano4::datamanagement::FaceMarker::x | ( | ) | const |
A marker is always tied to one particular face.
You can still get the data of all faces of a cell (see x(int)), but this particular function gives you the x coordinate with the centre of the currently selected face.
Definition at line 44 of file FaceMarker.cpp.
tarch::la::Vector< Dimensions, double > peano4::datamanagement::FaceMarker::x | ( | int | i | ) | const |
Center of a particular face with respective reference cell.
Definition at line 36 of file FaceMarker.cpp.
|
private |
Centre of the underlying cell.
Definition at line 40 of file FaceMarker.h.
|
private |
Definition at line 47 of file FaceMarker.h.
|
private |
Size of the underlying cell.
Definition at line 45 of file FaceMarker.h.
|
private |
|
private |
Definition at line 63 of file FaceMarker.h.
|
private |
Definition at line 61 of file FaceMarker.h.
|
private |
Entries from (0,1,2).
(0,0) or (0,0,0) is the left, bottom cell.
Definition at line 68 of file FaceMarker.h.
|
private |
Definition at line 49 of file FaceMarker.h.
|
private |