Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
bitpit::Reference2DElementInfo Class Referenceabstract

The Reference2DElementInfo class allows to define information about reference two-dimensional elements. More...

Inheritance diagram for bitpit::Reference2DElementInfo:
Inheritance graph
[legend]
Collaboration diagram for bitpit::Reference2DElementInfo:
Collaboration graph
[legend]

Public Member Functions

virtual bool areFacesCCWOrdered () const
 
virtual bool areVerticesCCWOrdered () const
 
virtual double evalArea (const std::array< double, 3 > *vertexCoords) const =0
 
double evalFaceLength (int face, const std::array< double, 3 > *vertexCoords) const
 
virtual std::array< double, 3 > evalNormal (const std::array< double, 3 > *vertexCoords, const std::array< double, 3 > &point={{0.5, 0.5, 0.5}}) const =0
 
double evalPerimeter (const std::array< double, 3 > *vertexCoords) const
 
double evalPointDistance (const std::array< double, 3 > &point, const std::array< double, 3 > *vertexCoords) const override
 
void evalPointProjection (const std::array< double, 3 > &point, const std::array< double, 3 > *vertexCoords, std::array< double, 3 > *projection, double *distance) const override
 
double evalSize (const std::array< double, 3 > *vertexCoords) const override
 
virtual int getCCWOrderedFace (int n) const
 
virtual int getCCWOrderedVertex (int n) const
 

Protected Member Functions

 Reference2DElementInfo (ElementType type, int nVertices)
 
void getCCWVertexCoords (const std::array< double, 3 > *vertexCoords, const std::array< double, 3 > **ccwVertexCoords, std::array< double, 3 > *ccwVertexCoordsStorage) const
 
- Protected Member Functions inherited from bitpit::ReferenceElementInfo
 ReferenceElementInfo (int _dimension, ElementType _type, int _nVertices, int _nFaces, int _nEdges)
 
 ReferenceElementInfo (ReferenceElementInfo const &)=delete
 
void initializeFaceEdges (const std::vector< const ReferenceElementInfo * > &facesInfo, const std::vector< const ReferenceElementInfo * > &edgesInfo)
 
ReferenceElementInfooperator= (ReferenceElementInfo const &)=delete
 

Additional Inherited Members

- Static Public Member Functions inherited from bitpit::ReferenceElementInfo
static BITPIT_PUBLIC_API const ReferenceElementInfogetInfo (ElementType type)
 
static bool hasInfo (ElementType type)
 
- Public Attributes inherited from bitpit::ReferenceElementInfo
int dimension
 
std::array< std::array< int, MAX_ELEM_VERTICES >, MAX_ELEM_EDGES > edgeConnectStorage
 
std::array< ElementType, MAX_ELEM_EDGES > edgeTypeStorage
 
std::array< std::array< int, MAX_ELEM_VERTICES >, MAX_ELEM_FACES > faceConnectStorage
 
std::array< std::array< int, MAX_ELEM_FACES >, MAX_ELEM_FACES > faceEdgeStorage
 
std::array< ElementType, MAX_ELEM_FACES > faceTypeStorage
 
int nEdges
 
int nFaces
 
int nVertices
 
ElementType type
 
- Static Public Attributes inherited from bitpit::ReferenceElementInfo
static BITPIT_PUBLIC_API const int MAX_ELEM_EDGES = 12
 
static BITPIT_PUBLIC_API const int MAX_ELEM_FACES = 6
 
static BITPIT_PUBLIC_API const int MAX_ELEM_VERTICES = 8
 

Detailed Description

The Reference2DElementInfo class allows to define information about reference two-dimensional elements.

The local numbering scheme of element vertices is shown below.

Definition at line 187 of file element_reference.hpp.

Constructor & Destructor Documentation

◆ Reference2DElementInfo()

bitpit::Reference2DElementInfo::Reference2DElementInfo ( ElementType type,
int nVertices )
protected

Constructor

Parameters
typeis the type of element
nVerticesis the number of vertices

Definition at line 1071 of file element_reference.cpp.

Member Function Documentation

◆ areFacesCCWOrdered()

bool bitpit::Reference2DElementInfo::areFacesCCWOrdered ( ) const
virtual

Check if the faces are ordered counter-clockwise.

Returns
Return true if the faces are ordered counter-clockwise, false otherwise.

Reimplemented in bitpit::ReferencePixelInfo.

Definition at line 1208 of file element_reference.cpp.

◆ areVerticesCCWOrdered()

bool bitpit::Reference2DElementInfo::areVerticesCCWOrdered ( ) const
virtual

Check if the vertices are ordered counter-clockwise.

Returns
Return true if the vertices are ordered counter-clockwise, false otherwise.

Reimplemented in bitpit::ReferencePixelInfo.

Definition at line 1184 of file element_reference.cpp.

◆ evalArea()

virtual double bitpit::Reference2DElementInfo::evalArea ( const std::array< double, 3 > * vertexCoords) const
pure virtual

◆ evalFaceLength()

double bitpit::Reference2DElementInfo::evalFaceLength ( int face,
const std::array< double, 3 > * vertexCoords ) const

Evaluates the length of the specified face of a two-dimensional element with the given vertex coordinates.

Parameters
faceis the face
vertexCoordsare the coordinate of the vertices
Returns
The length of the specified face.

Definition at line 1126 of file element_reference.cpp.

◆ evalNormal()

virtual std::array< double, 3 > bitpit::Reference2DElementInfo::evalNormal ( const std::array< double, 3 > * vertexCoords,
const std::array< double, 3 > & point = {{0.5, 0.5, 0.5}} ) const
pure virtual

◆ evalPerimeter()

double bitpit::Reference2DElementInfo::evalPerimeter ( const std::array< double, 3 > * vertexCoords) const

Evaluates the perimeter of a two-dimensional element with the specified vertex coordinates.

Parameters
vertexCoordsare the coordinate of the vertices
Returns
The perimeter of the element.

Definition at line 1108 of file element_reference.cpp.

◆ evalPointDistance()

double bitpit::Reference2DElementInfo::evalPointDistance ( const std::array< double, 3 > & point,
const std::array< double, 3 > * vertexCoords ) const
overridevirtual

Evaluates the distance between the element and the specified point.

Parameters
[in]pointis the point
vertexCoordsare the coordinate of the vertices
Returns
The distance between the element and the specified point.

Implements bitpit::ReferenceElementInfo.

Reimplemented in bitpit::ReferenceTriangleInfo.

Definition at line 1167 of file element_reference.cpp.

◆ evalPointProjection()

void bitpit::Reference2DElementInfo::evalPointProjection ( const std::array< double, 3 > & point,
const std::array< double, 3 > * vertexCoords,
std::array< double, 3 > * projection,
double * distance ) const
overridevirtual

Evaluates the projection of the point on the element.

Parameters
pointis the point
vertexCoordsare the coordinate of the vertices
[out]projectionon output contains the projection point
[out]distanceon output contains the distance between the point and the projection

Implements bitpit::ReferenceElementInfo.

Reimplemented in bitpit::ReferenceTriangleInfo.

Definition at line 1147 of file element_reference.cpp.

◆ evalSize()

double bitpit::Reference2DElementInfo::evalSize ( const std::array< double, 3 > * vertexCoords) const
overridevirtual

Evaluates the characteristics size of an element with the specified vertex coordinates.

The characteristics size is evaluated as the area divided by the length of the longest face.

Parameters
vertexCoordsare the coordinate of the vertices
Returns
The length of the line.

Implements bitpit::ReferenceElementInfo.

Reimplemented in bitpit::ReferenceTriangleInfo, and bitpit::ReferencePixelInfo.

Definition at line 1086 of file element_reference.cpp.

◆ getCCWOrderedFace()

int bitpit::Reference2DElementInfo::getCCWOrderedFace ( int n) const
virtual

Get the index of the face occupying the n-th position in the counter-clockwise ordered list of faces.

Parameters
nis the requested position
Returns
The local index of the face occupying the n-th position in the counter-clockwise ordered list of faces.

Reimplemented in bitpit::ReferencePixelInfo.

Definition at line 1221 of file element_reference.cpp.

◆ getCCWOrderedVertex()

int bitpit::Reference2DElementInfo::getCCWOrderedVertex ( int n) const
virtual

Get the index of the vertex occupying the n-th position in the counter-clockwise ordered list of vertices.

Parameters
nis the requested position
Returns
The index of the vertex occupying the n-th position in the counter-clockwise ordered list of vertices.

Reimplemented in bitpit::ReferencePixelInfo.

Definition at line 1197 of file element_reference.cpp.

◆ getCCWVertexCoords()

void bitpit::Reference2DElementInfo::getCCWVertexCoords ( const std::array< double, 3 > * vertexCoords,
const std::array< double, 3 > ** ccwVertexCoords,
std::array< double, 3 > * ccwVertexCoordsStorage ) const
protected

Gets the vertex coordinates ordered counter-clockwise.

If the input vertex coordintaes are already ordered, the function will only make the output vertex coordinates point the input ones, otherwise a full reoredr will be perfromed (the re-ordered coordinates will be stored in the storage provided by the user).

Parameters
vertexCoordsare the coordinates of the vertices
[out]ccwVertexCoordson output will contain the coordinates of the vertices ordered counter-clockwise
[out]ccwVertexCoordsStorageif a re-ordered is needed, this is the storage that will contain the ordered coordinates

Definition at line 1240 of file element_reference.cpp.


The documentation for this class was generated from the following files:
--- layout: doxygen_footer ---