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

Definition of a 1D finite element (interval). More...

#include <ptems/finiteelement.hpp>

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

Public Types

typedef LegacyRandomAccessIterator< const Vector< 1 > > iterator
 Type for an iterator over the list of vertices for the element. More...
 
typedef iterator const_iterator
 Type for a const iterator over the list of vertices for the element. More...
 
typedef std::reverse_iterator< iteratorreverse_iterator
 Type for an iterator over the list of vertices for the element, iterating in reverse. More...
 
typedef std::reverse_iterator< reverse_iteratorconst_reverse_iterator
 Type for a const iterator over the list of vertices for the element, iterating in reverse. More...
 
typedef LegacyRandomAccessIterator< const PFEFace< 1 > > faceiterator
 Type for an iterator over the list of faces for the element. More...
 
typedef faceiterator const_faceiterator
 Type for a const iterator over the list of faces for the element. More...
 
typedef std::reverse_iterator< faceiteratorreverse_faceiterator
 Type for an iterator over the list of faces for the element, iterating in reverse. More...
 
typedef std::reverse_iterator< const_faceiteratorconst_reverse_faceiterator
 Type for a const iterator over the list of faces for the element, iterating in reverse. More...
 

Public Member Functions

std::size_t Index () const
 The index of the finite element within the mesh,. More...
 
const Vector< 1 > & operator[] (std::size_t i) const
 Returns the ith vertex of the finite element. More...
 
const Vector< 1 > & Vertex (std::size_t i) const
 Returns the ith vertex of the finite element. More...
 
std::size_t VertexIndex (std::size_t i) const
 Returns the index in the mesh of ith vertex of the finite element. More...
 
iterator begin () const
 Gets the begin iterator for iterating over the vertices of the element. More...
 
iterator end () const
 Gets the end iterator for iterating over the vertices of the element. More...
 
const_iterator cbegin () const
 Gets the const begin iterator for iterating over the vertices of the element. More...
 
const_iterator cend () const
 Gets the const end iterator for iterating over the vertices of the element. More...
 
reverse_iterator rbegin () const
 Gets the begin iterator for iterating over the vertices of the element in reverse. More...
 
reverse_iterator rend () const
 Gets the end iterator for iterating over the vertices of the element in reverse. More...
 
const_reverse_iterator crbegin () const
 Gets the const begin iterator for iterating over the vertices of the element in reverse. More...
 
const_reverse_iterator crend () const
 Gets the const end iterator for iterating over the vertices of the element in reverse. More...
 
const PFEFace< 1 > & Face (std::size_t i) const
 Returns the ith face of the finite element. More...
 
faceiterator begin_faces () const
 Gets the begin iterator for iterating over the faces of the element. More...
 
faceiterator end_faces () const
 Gets the end iterator for iterating over the faces of the element. More...
 
const_faceiterator cbegin_faces () const
 Gets the const begin iterator for iterating over the faces of the element. More...
 
const_faceiterator cend_faces () const
 Gets the const end iterator for iterating over the faces of the element. More...
 
reverse_faceiterator rbegin_faces () const
 Gets the begin iterator for iterating over the faces of the element in reverse. More...
 
reverse_faceiterator rend_faces () const
 Gets the end iterator for iterating over the faces of the element in reverse. More...
 
const_reverse_faceiterator crbegin_faces () const
 Gets the const begin iterator for iterating over the faces of the element in reverse. More...
 
const_reverse_faceiterator crend_faces () const
 Gets the const end iterator for iterating over the faces of the element in reverse. More...
 
std::size_t VertexCount () const
 Gets the number of vertices in the element. More...
 
std::size_t FaceCount () const
 Gets the number of faces in the element. More...
 
double Diameter () const
 Gets the diameter of the element. More...
 
double Volume () const
 Gets the volume of the element. More...
 
Vector< 1 > Barycentre () const
 Gets the barycentre of the element. More...
 
BBox< 1 > BoundingBox () const
 Computes the bounding box for the element. More...
 
bool SetNeighbour (const std::shared_ptr< FiniteElement< 1 >> &element)
 Specify that the specified element is a neighbour of this element. More...
 
std::shared_ptr< FEMesh< 1 > > Mesh () const
 Gets a reference to the underlying mesh for the element. More...
 
const std::array< ReferenceMapping< 1 >, 1 > & ReferenceMappings () const
 Gets the mapping from the element to the reference interval. More...
 
template<typename ALGO >
QuadraturePoints< 1 > ComputeQuadraturePoints (ALGO algorithm, std::size_t order)
 Computes the quadrature points for the element. More...
 
shared_from_this (T... args)
 
weak_from_this (T... args)
 

Friends

class FEMesh< 1 >
 

Detailed Description

Definition of a 1D finite element (interval).

Warning
Object of this type MUST be constructed and stored in a shared_ptr.

Member Typedef Documentation

◆ const_faceiterator

Type for a const iterator over the list of faces for the element.

◆ const_iterator

Type for a const iterator over the list of vertices for the element.

◆ const_reverse_faceiterator

Type for a const iterator over the list of faces for the element, iterating in reverse.

◆ const_reverse_iterator

Type for a const iterator over the list of vertices for the element, iterating in reverse.

◆ faceiterator

Type for an iterator over the list of faces for the element.

◆ iterator

Type for an iterator over the list of vertices for the element.

◆ reverse_faceiterator

Type for an iterator over the list of faces for the element, iterating in reverse.

◆ reverse_iterator

Type for an iterator over the list of vertices for the element, iterating in reverse.

Member Function Documentation

◆ Barycentre()

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

Gets the barycentre of the element.

Returns
Element barycentre

◆ begin()

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

Gets the begin iterator for iterating over the vertices of the element.

◆ begin_faces()

faceiterator ptems::FiniteElement< 1 >::begin_faces ( ) const
inline

Gets the begin iterator for iterating over the faces of the element.

◆ BoundingBox()

BBox<1> ptems::FiniteElement< 1 >::BoundingBox ( ) const
inline

Computes the bounding box for the element.

Returns
The minimum and maximum point of the bounding box for the element

◆ cbegin()

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

Gets the const begin iterator for iterating over the vertices of the element.

◆ cbegin_faces()

const_faceiterator ptems::FiniteElement< 1 >::cbegin_faces ( ) const
inline

Gets the const begin iterator for iterating over the faces of the element.

◆ cend()

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

Gets the const end iterator for iterating over the vertices of the element.

◆ cend_faces()

const_faceiterator ptems::FiniteElement< 1 >::cend_faces ( ) const
inline

Gets the const end iterator for iterating over the faces of the element.

◆ ComputeQuadraturePoints()

template<typename ALGO >
QuadraturePoints<1> ptems::FiniteElement< 1 >::ComputeQuadraturePoints ( ALGO  algorithm,
std::size_t  order 
)
inline

Computes the quadrature points for the element.

The points are in local element coordinates, and weights are for the global integration.

Template Parameters
ALGOType of an algorithm for generating quadrature points on a reference element
Parameters
algorithmAn algorithm for generating quadrature points on a reference element
orderThe order of the quadrature
Returns
The set of quadrature points to use in local element coordinates (local to reference element if only one reference element, otherwise to bounding box)

◆ crbegin()

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

Gets the const begin iterator for iterating over the vertices of the element in reverse.

◆ crbegin_faces()

const_reverse_faceiterator ptems::FiniteElement< 1 >::crbegin_faces ( ) const
inline

Gets the const begin iterator for iterating over the faces of the element in reverse.

◆ crend()

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

Gets the const end iterator for iterating over the vertices of the element in reverse.

◆ crend_faces()

const_reverse_faceiterator ptems::FiniteElement< 1 >::crend_faces ( ) const
inline

Gets the const end iterator for iterating over the faces of the element in reverse.

◆ Diameter()

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

Gets the diameter of the element.

Returns
The element diameter.

◆ end()

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

Gets the end iterator for iterating over the vertices of the element.

◆ end_faces()

faceiterator ptems::FiniteElement< 1 >::end_faces ( ) const
inline

Gets the end iterator for iterating over the faces of the element.

◆ Face()

const PFEFace<1>& ptems::FiniteElement< 1 >::Face ( std::size_t  i) const
inline

Returns the ith face of the finite element.

Parameters
iThe index of the face to get.
Exceptions
std::out_of_rangeIf i is not less than FaceCount()
Returns
Immutable reference to the specified face.

◆ FaceCount()

std::size_t ptems::FiniteElement< 1 >::FaceCount ( ) const
inline

Gets the number of faces in the element.

Returns
Number of faces in the element.

◆ Index()

std::size_t ptems::FiniteElement< 1 >::Index ( ) const
inline

The index of the finite element within the mesh,.

Returns
The index of the finite element

◆ Mesh()

std::shared_ptr<FEMesh<1> > ptems::FiniteElement< 1 >::Mesh ( ) const
inline

Gets a reference to the underlying mesh for the element.

Returns
The underlying mesh

◆ operator[]()

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

Returns the ith vertex of the finite element.

Parameters
iThe index of the vertex to get.
Exceptions
std::out_of_rangeIf i is not less than VertexCount()
Returns
Immutable reference to the specified vertex.

◆ rbegin()

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

Gets the begin iterator for iterating over the vertices of the element in reverse.

◆ rbegin_faces()

reverse_faceiterator ptems::FiniteElement< 1 >::rbegin_faces ( ) const
inline

Gets the begin iterator for iterating over the faces of the element in reverse.

◆ ReferenceMappings()

const std::array<ReferenceMapping<1>,1>& ptems::FiniteElement< 1 >::ReferenceMappings ( ) const
inline

Gets the mapping from the element to the reference interval.

Returns
Mapping to reference interval

◆ rend()

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

Gets the end iterator for iterating over the vertices of the element in reverse.

◆ rend_faces()

reverse_faceiterator ptems::FiniteElement< 1 >::rend_faces ( ) const
inline

Gets the end iterator for iterating over the faces of the element in reverse.

◆ SetNeighbour()

bool ptems::FiniteElement< 1 >::SetNeighbour ( const std::shared_ptr< FiniteElement< 1 >> &  element)
inline

Specify that the specified element is a neighbour of this element.

Parameters
elementThe neighbour
Returns
true If the element was added as neighbour; false otherwise (error)

◆ Vertex()

const Vector<1>& ptems::FiniteElement< 1 >::Vertex ( std::size_t  i) const
inline

Returns the ith vertex of the finite element.

Parameters
iThe index of the vertex to get.
Exceptions
std::out_of_rangeIf i is not less than VertexCount()
Returns
Immutable reference to the specified vertex.

◆ VertexCount()

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

Gets the number of vertices in the element.

Returns
Number of vertices in the element.

◆ VertexIndex()

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

Returns the index in the mesh of ith vertex of the finite element.

Parameters
iThe index of the vertex to get.
Exceptions
std::out_of_rangeIf i is not less than VertexCount()
Returns
Mesh index of the vertex at the specified element vertex index

◆ Volume()

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

Gets the volume of the element.

Returns
Element volume

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