Peano
Loading...
Searching...
No Matches
peano4::datamanagement::FaceMarker Struct Reference

Provide information about selected face. More...

#include <FaceMarker.h>

Collaboration diagram for peano4::datamanagement::FaceMarker:

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().
 
FaceMarkerselect (int face)
 Selects a face within a cell, i.e.
 
int getSelectedFaceNumber () const
 Return the number of the face.
 
tarch::la::Vector< Dimensions, doublex (int i) const
 Center of a particular face with respective reference cell.
 
tarch::la::Vector< Dimensions, doublex () const
 A marker is always tied to one particular face.
 
tarch::la::Vector< Dimensions, doublenormal (int i) const
 This operation gives you the normal of a certain face.
 
tarch::la::Vector< Dimensions, doublenormal () const
 
tarch::la::Vector< Dimensions, doubleouterNormal (int i) const
 This operation gives you the outer normal of a cell.
 
tarch::la::Vector< Dimensions, doubleouterNormal () const
 
tarch::la::Vector< Dimensions, doubleh () 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, intgetRelativePositionWithinFatherCell () const
 Return relative position within father cell.
 
tarch::la::Vector< Dimensions, intgetRelativePositionWithinFatherCell (int i) const
 
tarch::la::Vector< Dimensions-1, intgetRelativePositionWithinFatherFace () 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).
 

Detailed Description

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.

See also
VertexMarker for an analogous description of the vertex handling.
FaceEnumerator for a discussion of the ordering of the faces.

Definition at line 35 of file FaceMarker.h.

Constructor & Destructor Documentation

◆ FaceMarker()

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.

Here is the call graph for this function:

Member Function Documentation

◆ getRelativePositionWithinFatherCell() [1/2]

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().

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

◆ getRelativePositionWithinFatherCell() [2/2]

tarch::la::Vector< Dimensions, int > peano4::datamanagement::FaceMarker::getRelativePositionWithinFatherCell ( int i) const

Definition at line 144 of file FaceMarker.cpp.

References assertion2, and toString().

Here is the call graph for this function:

◆ getRelativePositionWithinFatherFace()

tarch::la::Vector< Dimensions-1, int > peano4::datamanagement::FaceMarker::getRelativePositionWithinFatherFace ( ) const

◆ getSelectedFaceNumber()

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.

See also
FaceEnumerator for a discussion of the face ordering.
Returns
Number from 0 to 2d-1

Definition at line 103 of file FaceMarker.cpp.

◆ h()

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().

Here is the caller graph for this function:

◆ hasBeenRefined() [1/2]

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.

◆ hasBeenRefined() [2/2]

bool peano4::datamanagement::FaceMarker::hasBeenRefined ( int i) const

Definition at line 108 of file FaceMarker.cpp.

◆ isAdjacentToParallelBoundary() [1/2]

bool peano4::datamanagement::FaceMarker::isAdjacentToParallelBoundary ( ) const

◆ isAdjacentToParallelBoundary() [2/2]

bool peano4::datamanagement::FaceMarker::isAdjacentToParallelBoundary ( int i) const

◆ isInteriorFaceWithinPatch()

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.

◆ isLocal() [1/2]

bool peano4::datamanagement::FaceMarker::isLocal ( ) const

Definition at line 133 of file FaceMarker.cpp.

◆ isLocal() [2/2]

bool peano4::datamanagement::FaceMarker::isLocal ( int i) const

Definition at line 128 of file FaceMarker.cpp.

◆ normal() [1/2]

tarch::la::Vector< Dimensions, double > peano4::datamanagement::FaceMarker::normal ( ) const

Definition at line 57 of file FaceMarker.cpp.

Referenced by FaceMarker().

Here is the caller graph for this function:

◆ normal() [2/2]

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.

◆ outerNormal() [1/2]

tarch::la::Vector< Dimensions, double > peano4::datamanagement::FaceMarker::outerNormal ( ) const

Definition at line 72 of file FaceMarker.cpp.

◆ outerNormal() [2/2]

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.

◆ select()

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.

Parameters
faceNumber 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().

Here is the caller graph for this function:

◆ toString()

std::string peano4::datamanagement::FaceMarker::toString ( ) const

Definition at line 77 of file FaceMarker.cpp.

◆ willBeRefined() [1/2]

bool peano4::datamanagement::FaceMarker::willBeRefined ( ) const

Definition at line 123 of file FaceMarker.cpp.

◆ willBeRefined() [2/2]

bool peano4::datamanagement::FaceMarker::willBeRefined ( int i) const

Definition at line 118 of file FaceMarker.cpp.

◆ x() [1/2]

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.

See also
select(int)

Definition at line 44 of file FaceMarker.cpp.

◆ x() [2/2]

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.

Field Documentation

◆ _cellCentre

tarch::la::Vector<Dimensions,double> peano4::datamanagement::FaceMarker::_cellCentre
private

Centre of the underlying cell.

Definition at line 40 of file FaceMarker.h.

◆ _cellIsLocal

bool peano4::datamanagement::FaceMarker::_cellIsLocal
private

Definition at line 47 of file FaceMarker.h.

◆ _h

tarch::la::Vector<Dimensions,double> peano4::datamanagement::FaceMarker::_h
private

Size of the underlying cell.

Definition at line 45 of file FaceMarker.h.

◆ _hasBeenRefined

std::bitset<2*Dimensions> peano4::datamanagement::FaceMarker::_hasBeenRefined
private
See also
hasBeenRefined()

Definition at line 54 of file FaceMarker.h.

Referenced by FaceMarker().

◆ _isAdjacentToParallelBoundary

std::bitset<2*Dimensions> peano4::datamanagement::FaceMarker::_isAdjacentToParallelBoundary
private

Definition at line 63 of file FaceMarker.h.

◆ _isLocal

std::bitset<2*Dimensions> peano4::datamanagement::FaceMarker::_isLocal
private

Definition at line 61 of file FaceMarker.h.

◆ _relativePositionOfCellWithinFatherCell

tarch::la::Vector<Dimensions,int> peano4::datamanagement::FaceMarker::_relativePositionOfCellWithinFatherCell
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.

◆ _select

int peano4::datamanagement::FaceMarker::_select
private

Definition at line 49 of file FaceMarker.h.

◆ _willBeRefined

std::bitset<2*Dimensions> peano4::datamanagement::FaceMarker::_willBeRefined
private
See also
hasBeenRefined()

Definition at line 59 of file FaceMarker.h.

Referenced by FaceMarker().


The documentation for this struct was generated from the following files: