CEPS
24.01
Cardiac ElectroPhysiology Simulator
|
Abstract class for finite elements.
It contains a pointer to the geometrical element it is based on, and a pointer to the reference element to access data about node position and basis functions values.
Nodes:
At instantiation of element, the list of node pointers is not initialized, to prevent from duplicating nodes that are common between nodes.
The FiniteElements class manages the list of nodes, whether they directly come from the geometry, or are added (e.g for P2 nodes.)
GeomNode pointers are always listed in the following order:
setGeomNodePointers()
)addNewNode()
or setExistingNode()
methods Definition at line 61 of file FEBase.hpp.
#include <FEBase.hpp>
Public Member Functions | |
FEBase ()=delete | |
Deleted default construtcor. More... | |
FEBase (GeomCell *geom, CepsBool owned, ReferenceFE *reference) | |
Constructor from a geometric element and a reference element. More... | |
FEBase (const FEBase &that)=default | |
Copy constructor. More... | |
FEBase & | operator= (const FEBase &that) |
Copy assignement. More... | |
~FEBase () override | |
Destructor. More... | |
void | setGeomObject (GeomCell *object, CepsBool owned=false) override |
Set the geom object. More... | |
ReferenceFE * | getReferenceElement () const |
Pointer on Reference element. More... | |
CepsUInt | getNumberOfDofs () const |
Number of DoFs. More... | |
const CepsVector< CepsReal3D > & | getBasisVertices () const |
Direct access to positionning coefficients. More... | |
const CepsReal3D & | getBasisVertex (CepsUInt i) const |
Direct access to positionning coefficients. More... | |
CepsMathVertex | getOrigin () const |
Access to coordinate of the first node (the origin node) as eigen object. More... | |
CepsCellType | getCellType () const |
Cell type. More... | |
CepsUInt | getPolynomialOrder () const |
Polynomial order. More... | |
CepsReal | getMeasure () const |
Size of the element. More... | |
const GeomCell::JacobianMatrixType & | getJacobianMatrix () const |
Jacobian matrix from the geometrical element. More... | |
CepsReal | getJacobianDeterminant () const |
Jacobian determinant from the geometrical element. More... | |
const GeomCell::InverseJacobianMatrixType & | getInverseJacobian () const |
Inverse of the jacobian matrix from the geometrical element. More... | |
Public Member Functions inherited from ceps::HoldsGeomObject< GeomCell > | |
HoldsGeomObject (GeomCell *object=nullptr, CepsBool owned=false) | |
Constructor with ID. More... | |
HoldsGeomObject (const HoldsGeomObject &)=default | |
Copy constructor. More... | |
HoldsGeomObject (HoldsGeomObject &&) noexcept=default | |
Copy constructor. More... | |
virtual | ~HoldsGeomObject () |
Destructor. More... | |
HoldsGeomObject & | operator= (const HoldsGeomObject &)=default |
Assignment operator. More... | |
HoldsGeomObject & | operator= (HoldsGeomObject &&) noexcept=default |
Assignment operator. More... | |
GeomCell * | getGeomObject () const |
Get the geom object. More... | |
GeomCell * | getProperties () const |
Get the properties (in fact it's just the geom object) More... | |
void | reset () |
Set the geom object pointer to nullptr. More... | |
Public Member Functions inherited from ceps::HoldsNodes< FENode > | |
HoldsNodes (const CepsVector< FENode * > &nodes) | |
Constructor with nodes. More... | |
HoldsNodes (FENode **nodes, const CepsUInt &n) | |
Constructor with nodes. More... | |
HoldsNodes ()=default | |
Default constructor. More... | |
HoldsNodes (const HoldsNodes &)=default | |
Copy constructor. More... | |
HoldsNodes (HoldsNodes &&) noexcept=default | |
Copy constructor. More... | |
virtual | ~HoldsNodes ()=default |
Destructor. More... | |
HoldsNodes & | operator= (const HoldsNodes &)=default |
Assignment operator. More... | |
HoldsNodes & | operator= (HoldsNodes &&) noexcept=default |
Assignment operator. More... | |
CepsUInt | getNumberOfNodes () const |
Returns the total number of nodes. More... | |
CepsUInt | countValidNodes () |
Returns the number of nodes that are not nullptr. More... | |
CepsVector< FENode * > & | getNodes () |
Reference to the node pointers array. More... | |
const CepsVector< FENode * > & | getNodes () const |
Reference to the node pointers array, const version. More... | |
FENode * | getNodeAt (const CepsUInt &i) |
Pointer to the i-th node. More... | |
const FENode * | getNodeAt (const CepsUInt &i) const |
Pointer to the i-th node, const version. More... | |
void | setNodes (const CepsVector< FENode * > &nodes) |
Assign all nodes. More... | |
void | setNodes (FENode **nodes, const CepsUInt &n) |
Assign all nodes. More... | |
void | setNodes (_It first, _It last) |
Assign all nodes. More... | |
void | setNodeAt (const CepsUInt &i, FENode *neigh) |
Set the i-th node. If i>nNodes, nullptrs fill the vector. More... | |
void | addNode (FENode *name) |
Add a single node to the vector. More... | |
void | addNodes (const CepsVector< FENode * > &nodes) |
Add several nodes to the vector. More... | |
void | addNodes (FENode **nodes, const CepsUInt &n) |
Add several nodes to the vector. More... | |
void | addNodes (_It first, _It last) |
Add several nodes to the vector. More... | |
void | removeNode (FENode *&name) |
Removes the given node from the list. More... | |
void | removeNodes (const CepsVector< FENode * > &nodes) |
Removes several nodes from the list. More... | |
void | removeNodes (FENode **nodes, const CepsUInt &n) |
Removes several nodes from the list. More... | |
void | removeNodes (_It first, _It last) |
Removes several nodes from the list. More... | |
void | clearNodes () |
Wipes the vector of nodes. More... | |
CepsBool | hasNode (FENode *&neigh) |
Tells if object has the given node. More... | |
CepsBool | hasAllNodes (const CepsVector< FENode * > &nodes) |
Tells if object has all the given nodes. More... | |
CepsBool | hasAllNodes (FENode **nodes, const CepsUInt &n) |
Tells if object has all the given nodes. More... | |
CepsBool | hasAllNodes (_It first, _It last) |
Tells if object has all the given nodes. More... | |
CepsBool | hasOneOfNodes (const CepsVector< FENode * > &nodes) |
Tells if object has one of the given nodes. More... | |
CepsBool | hasOneOfNodes (FENode **nodes, const CepsUInt &n) |
Tells if object has one of the given nodes. More... | |
CepsBool | hasOneOfNodes (_It first, _It last) |
Tells if object has one of the given nodes. More... | |
CepsVector< FENode * > | getValidNodes () const |
Get pointers on all valid nodes. More... | |
CepsGlobalIndex | getNodeIndex (CepsUInt i) const |
Get the index of i-th node. More... | |
CepsVector< CepsGlobalIndex > | getNodeIndices () const |
Get indices of all nodes. More... | |
void | getNodeIndices (CepsGlobalIndex *nodesIndices, const CepsSize &nAllocated) const |
Get indices of all nodes. More... | |
void | reset () |
Equivalent to HoldsNodes::clearNodes. More... | |
Public Member Functions inherited from ceps::HoldsCells< FEBase > | |
HoldsCells (const CepsVector< FEBase * > &cells) | |
Constructor with a vector of cells. More... | |
HoldsCells (FEBase **cells, const CepsUInt &n) | |
Constructor with a vector of cells. More... | |
HoldsCells ()=default | |
Default constructor. More... | |
HoldsCells (const HoldsCells &)=default | |
Copy constructor. More... | |
HoldsCells (HoldsCells &&) noexcept=default | |
Copy constructor. More... | |
virtual | ~HoldsCells ()=default |
Destructor. More... | |
HoldsCells & | operator= (const HoldsCells &)=default |
Assignment operator. More... | |
HoldsCells & | operator= (HoldsCells &&) noexcept=default |
Assignment operator. More... | |
CepsUInt | getNumberOfCells () const |
Returns the number of cells in the object. More... | |
CepsUInt | countValidCells () |
Get the number of cells that are not nullptr. More... | |
CepsVector< FEBase * > | getValidCells () |
Reference to the valid cells. More... | |
CepsVector< FEBase * > & | getCells () |
Reference to the cells. More... | |
const CepsVector< FEBase * > & | getCells () const |
Reference to the cells, const version. More... | |
FEBase *& | getCellAt (const CepsUInt &i) |
Pointer to the i-th cell. More... | |
const FEBase *& | getCellAt (const CepsUInt &i) const |
Pointer to the i-th cell , const version. More... | |
void | setCells (const CepsVector< FEBase * > &cells) |
Replaces currently held cell pointers. More... | |
void | setCells (FEBase **cells, const CepsUInt &n) |
Replaces currently held cell pointers. More... | |
void | setCells (_It first, _It last) |
Replaces currently held cell pointers. More... | |
void | setCellAt (const CepsUInt &i, FEBase *neigh) |
Set a cell pointer in the vector of currently held cells, at given index. More... | |
void | addCell (FEBase *&name) |
Adds a cell to the list. More... | |
void | addCells (const CepsVector< FEBase * > &cells) |
Adds several cells to the list. More... | |
void | addCells (FEBase **cells, const CepsUInt &n) |
Adds several cells to the list. More... | |
void | addCells (_It first, _It last) |
Adds several cells to the list. More... | |
void | removeCell (FEBase *&name) |
Removes a given cell pointer from the list. More... | |
void | removeCells (const CepsVector< FEBase * > &cells) |
Removes several cell pointers from the list. More... | |
void | removeCells (FEBase **cells, const CepsUInt &n) |
Removes several cell pointers from the list. More... | |
void | removeCells (_It first, _It last) |
Removes several cell pointers from the list. More... | |
void | clearCells () |
Wipes the current list of cell pointers. More... | |
CepsBool | hasCell (FEBase *&neigh) |
Tells if object has the cell given in argument. More... | |
CepsBool | hasAllCells (const CepsVector< FEBase * > &cells) |
Tells if object has all cells given in argument. More... | |
CepsBool | hasAllCells (FEBase **cells, const CepsUInt &n) |
Tells if object has all cells given in argument. More... | |
CepsBool | hasAllCells (_It first, _It last) |
Tells if object has all cells given in argument. More... | |
CepsBool | hasOneOfCells (const CepsVector< FEBase * > &cells) |
Tells if object has one of the cells given in argument. More... | |
CepsBool | hasOneOfCells (FEBase **cells, const CepsUInt &n) |
Tells if object has one of the cells given in argument. More... | |
CepsBool | hasOneOfCells (_It first, _It last) |
Tells if object has one of the cells given in argument. More... | |
CepsIndex | getCellIndex (CepsUInt i) const |
Get the index of i-th cell. More... | |
CepsVector< CepsIndex > | getCellsIndices () const |
Get indices of all cells. More... | |
void | reset () |
Equivalent to HoldsCells::clearCells. More... | |
Protected Attributes | |
ReferenceFE * | m_reference |
Link to reference element. More... | |
Protected Attributes inherited from ceps::HoldsGeomObject< GeomCell > | |
CepsBool | m_owned |
Is the geom object owned by current CPU. More... | |
GeomCell * | m_gObject |
Ptr to the object. More... | |
Protected Attributes inherited from ceps::HoldsNodes< FENode > | |
CepsVector< FENode * > | m_nodes |
The node pointers. More... | |
FENode * | m_dummyNode |
An empty node to be returned after abort when testing. More... | |
Protected Attributes inherited from ceps::HoldsCells< FEBase > | |
CepsVector< FEBase * > | m_cells |
The cell pointers. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ceps::HoldsNodes< FENode > | |
void | errorOnNodeIndex (CepsUInt i, std::source_location loc=std::source_location::current()) const |
Aborts if requesting node with wrong index. More... | |
Protected Member Functions inherited from ceps::HoldsCells< FEBase > | |
void | errorOnCellIndex (CepsUInt i, const CepsString &funcName) const |
Aborts if object holds less than i cells. More... | |
|
delete |
Deleted default construtcor.
FEBase::FEBase | ( | GeomCell * | geom, |
CepsBool | owned, | ||
ReferenceFE * | reference | ||
) |
Constructor from a geometric element and a reference element.
Definition at line 33 of file FEBase.cpp.
|
default |
Copy constructor.
|
override |
Destructor.
Definition at line 54 of file FEBase.cpp.
const CepsReal3D & FEBase::getBasisVertex | ( | CepsUInt | i | ) | const |
Direct access to positionning coefficients.
Definition at line 93 of file FEBase.cpp.
const CepsVector< CepsReal3D > & FEBase::getBasisVertices | ( | ) | const |
Direct access to positionning coefficients.
Definition at line 87 of file FEBase.cpp.
CepsCellType FEBase::getCellType | ( | ) | const |
Cell type.
Definition at line 105 of file FEBase.cpp.
const GeomCell::InverseJacobianMatrixType & FEBase::getInverseJacobian | ( | ) | const |
Inverse of the jacobian matrix from the geometrical element.
Definition at line 139 of file FEBase.cpp.
CepsReal FEBase::getJacobianDeterminant | ( | ) | const |
Jacobian determinant from the geometrical element.
Definition at line 133 of file FEBase.cpp.
const GeomCell::JacobianMatrixType & FEBase::getJacobianMatrix | ( | ) | const |
Jacobian matrix from the geometrical element.
Definition at line 127 of file FEBase.cpp.
CepsReal FEBase::getMeasure | ( | ) | const |
Size of the element.
Definition at line 121 of file FEBase.cpp.
CepsUInt FEBase::getNumberOfDofs | ( | ) | const |
Number of DoFs.
Definition at line 81 of file FEBase.cpp.
CepsMathVertex FEBase::getOrigin | ( | ) | const |
Access to coordinate of the first node (the origin node) as eigen object.
Definition at line 99 of file FEBase.cpp.
CepsUInt FEBase::getPolynomialOrder | ( | ) | const |
Polynomial order.
Definition at line 111 of file FEBase.cpp.
ReferenceFE * FEBase::getReferenceElement | ( | ) | const |
Pointer on Reference element.
Definition at line 75 of file FEBase.cpp.
Set the geom object.
Reimplemented from ceps::HoldsGeomObject< GeomCell >.
Definition at line 59 of file FEBase.cpp.
|
protected |
Link to reference element.
Definition at line 139 of file FEBase.hpp.