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

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

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

◆ getRelativePositionWithinFatherCell() [2/2]

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

◆ getRelativePositionWithinFatherFace()

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)

◆ 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

◆ h()

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

Size of the underlying cell.

◆ 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.

◆ hasBeenRefined() [2/2]

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

◆ 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.

◆ isLocal() [1/2]

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

◆ isLocal() [2/2]

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

◆ normal() [1/2]

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

◆ 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.

◆ outerNormal() [1/2]

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

◆ 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.

◆ select()

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

◆ toString()

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

◆ willBeRefined() [1/2]

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

◆ willBeRefined() [2/2]

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

◆ 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)

◆ x() [2/2]

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

Center of a particular face with respective reference cell.

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.

◆ _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.


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