PTEMS  0.1.0-dev+git.81fd0e4
PolyTopic Element Method Solver
ptems::FEFace< 1 > Class Reference

Defines a face between two finite elements in one-dimensions (i.e., a point between two intervals). More...

#include <ptems/finiteelement.hpp>

Inheritance diagram for ptems::FEFace< 1 >:
Collaboration diagram for ptems::FEFace< 1 >:

Public Types

typedef LegacyRandomAccessIterator< const std::size_titerator
 Type for an iterator over the list of vertex indices for the face. More...
 
typedef iterator const_iterator
 Type for a const iterator over the list of vertex indices for the face. More...
 
typedef std::reverse_iterator< iteratorreverse_iterator
 Type for an iterator over the list of vertex indices for the face, iterating in reverse. More...
 
typedef std::reverse_iterator< reverse_iteratorconst_reverse_iterator
 Type for a const iterator over the list of vertex indices for the face, iterating in reverse. More...
 

Public Member Functions

std::shared_ptr< FiniteElement< 1 > > Left () const
 Pointer to "left" neighbour of the face. More...
 
std::shared_ptr< FiniteElement< 1 > > Right () const
 Pointer to "right" neighbour of the face; or null if the face is on the boundary. More...
 
bool IsInterior () const
 Gets if the face represents an interior face (has right neighbour) More...
 
bool IsBoundary () const
 Gets if the face represents a boundary face (no right neighbour) More...
 
void Right (const std::shared_ptr< FiniteElement< 1 >> &right)
 Sets the right neighbour of the face. More...
 
const std::size_toperator[] (std::size_t i) const
 Returns the global index of the ith vertex of the face. More...
 
const std::size_tVertexIndex (std::size_t i) const
 Returns the global index of the ith vertex of the face. More...
 
std::size_t VertexCount () const
 Gets the number of vertices in the face. More...
 
iterator begin () const
 Gets the begin iterator for iterating over the vertex indices of the face. More...
 
iterator end () const
 Gets the end iterator for iterating over the vertex indices of the face. More...
 
const_iterator cbegin () const
 Gets the const begin iterator for iterating over the vertex indices of the face. More...
 
const_iterator cend () const
 Gets the const end iterator for iterating over the vertex indices of the face. More...
 
reverse_iterator rbegin () const
 Gets the begin iterator for iterating over the vertex indices of the face in reverse. More...
 
reverse_iterator rend () const
 Gets the end iterator for iterating over the vertex indices of the face in reverse. More...
 
const_reverse_iterator crbegin () const
 Gets the const begin iterator for iterating over the vertex indices of the face in reverse. More...
 
const_reverse_iterator crend () const
 Gets the const end iterator for iterating over the vertex indices of the face in reverse. More...
 
double Diameter () const
 Gets the diameter of the face. More...
 
double Volume () const
 Gets the volume of the face. More...
 
Vector< 1 > Normal () const
 Gets the normal to the face. More...
 
bool IsEqual (const std::shared_ptr< FEFace< 1 > > &rhs) const
 Checks if the specified face is equal to this face (has same vertices), even if vertices are in different order (e.g., Normal() may be different). More...
 
bool IsEqual (const FEFace< 1 > &rhs) const
 Checks if the specified face is equal to this face (has same vertices), even if vertices are in different order (e.g., Normal() may be different). More...
 
Vector< 1 > Barycentre () const
 Gets the barycentre of the face. More...
 
shared_from_this (T... args)
 
weak_from_this (T... args)
 

Friends

class FiniteElement< 1 >
 
class FEMesh< 1 >
 

Detailed Description

Defines a face between two finite elements in one-dimensions (i.e., a point between two intervals).

Warning
Object of this type (or derived) MUST be constructed and stored in a shared_ptr.

Member Typedef Documentation

◆ const_iterator

Type for a const iterator over the list of vertex indices for the face.

◆ const_reverse_iterator

Type for a const iterator over the list of vertex indices for the face, iterating in reverse.

◆ iterator

Type for an iterator over the list of vertex indices for the face.

◆ reverse_iterator

Type for an iterator over the list of vertex indices for the face, iterating in reverse.

Member Function Documentation

◆ Barycentre()

Vector< 1 > ptems::FEFace< 1 >::Barycentre ( ) const
inline

Gets the barycentre of the face.

Returns
Face barycentre

◆ begin()

iterator ptems::FEFace< 1 >::begin ( ) const
inline

Gets the begin iterator for iterating over the vertex indices of the face.

◆ cbegin()

const_iterator ptems::FEFace< 1 >::cbegin ( ) const
inline

Gets the const begin iterator for iterating over the vertex indices of the face.

◆ cend()

const_iterator ptems::FEFace< 1 >::cend ( ) const
inline

Gets the const end iterator for iterating over the vertex indices of the face.

◆ crbegin()

const_reverse_iterator ptems::FEFace< 1 >::crbegin ( ) const
inline

Gets the const begin iterator for iterating over the vertex indices of the face in reverse.

◆ crend()

const_reverse_iterator ptems::FEFace< 1 >::crend ( ) const
inline

Gets the const end iterator for iterating over the vertex indices of the face in reverse.

◆ Diameter()

double ptems::FEFace< 1 >::Diameter ( ) const
inline

Gets the diameter of the face.

Returns
The face diameter.

◆ end()

iterator ptems::FEFace< 1 >::end ( ) const
inline

Gets the end iterator for iterating over the vertex indices of the face.

◆ IsBoundary()

bool ptems::FEFace< 1 >::IsBoundary ( ) const
inline

Gets if the face represents a boundary face (no right neighbour)

Note
Opposite of IsInterior()
Returns
true If boundary, false otherwise

◆ IsEqual() [1/2]

bool ptems::FEFace< 1 >::IsEqual ( const FEFace< 1 > &  rhs) const
inline

Checks if the specified face is equal to this face (has same vertices), even if vertices are in different order (e.g., Normal() may be different).

Parameters
rhsThe face to check if equal to this
Returns
true if the faces represent the same face, regardless of orientation; false otherwise

◆ IsEqual() [2/2]

bool ptems::FEFace< 1 >::IsEqual ( const std::shared_ptr< FEFace< 1 > > &  rhs) const
inline

Checks if the specified face is equal to this face (has same vertices), even if vertices are in different order (e.g., Normal() may be different).

Parameters
rhsThe face to check if equal to this
Returns
true if the faces represent the same face, regardless of orientation; false otherwise

◆ IsInterior()

bool ptems::FEFace< 1 >::IsInterior ( ) const
inline

Gets if the face represents an interior face (has right neighbour)

Note
Opposite of IsBoundary()
Returns
true If interior, false otherwise

◆ Left()

std::shared_ptr<FiniteElement<1> > ptems::FEFace< 1 >::Left ( ) const
inline

Pointer to "left" neighbour of the face.

◆ Normal()

Vector<1> ptems::FEFace< 1 >::Normal ( ) const
inline

Gets the normal to the face.

The normal is the outward normal w.r.t. the left neighbour, and the inward normal w.r.t the right neighbour.

Returns
The normal w.r.t. the left neighbour.

◆ operator[]()

const std::size_t& ptems::FEFace< 1 >::operator[] ( std::size_t  i) const
inline

Returns the global index of the ith vertex of the face.

Parameters
iThe index of the vertex to get.
Exceptions
std::out_of_rangeIf i is not less than VertexCount()
Returns
Index of the vertex on the mesh

◆ rbegin()

reverse_iterator ptems::FEFace< 1 >::rbegin ( ) const
inline

Gets the begin iterator for iterating over the vertex indices of the face in reverse.

◆ rend()

reverse_iterator ptems::FEFace< 1 >::rend ( ) const
inline

Gets the end iterator for iterating over the vertex indices of the face in reverse.

◆ Right() [1/2]

std::shared_ptr<FiniteElement<1> > ptems::FEFace< 1 >::Right ( ) const
inline

Pointer to "right" neighbour of the face; or null if the face is on the boundary.

◆ Right() [2/2]

void ptems::FEFace< 1 >::Right ( const std::shared_ptr< FiniteElement< 1 >> &  right)
inline

Sets the right neighbour of the face.

Parameters
rightThe right hand neighbour, or null for no neighbour.

◆ VertexCount()

std::size_t ptems::FEFace< 1 >::VertexCount ( ) const
inline

Gets the number of vertices in the face.

Returns
Number of vertices in the face.

◆ VertexIndex()

const std::size_t& ptems::FEFace< 1 >::VertexIndex ( std::size_t  i) const
inline

Returns the global index of the ith vertex of the face.

Parameters
iThe index of the vertex to get.
Exceptions
std::out_of_rangeIf i is not less than VertexCount()
Returns
Index of the vertex on the mesh

◆ Volume()

double ptems::FEFace< 1 >::Volume ( ) const
inline

Gets the volume of the face.

Returns
Face volume

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