CEPS
24.01
Cardiac ElectroPhysiology Simulator
|
Base class for nodes used in meshes.
On top of coordinates, attributes and indexing, there is information on whether the node is on boundary, and which are its neighbors. A node may have several attributes.
Definition at line 44 of file GeomNode.hpp.
#include <GeomNode.hpp>
Public Member Functions | |
GeomNode (CepsReal x, CepsReal y, CepsReal z, CepsGlobalIndex gID, CepsAttribute *attrs=nullptr, CepsUInt nAttrs=0) | |
Constructor. More... | |
~GeomNode () override=default | |
Destructor. More... | |
void | reset () |
Wipes content. More... | |
CepsVertex (const CepsReal &x=0.0, const CepsReal &y=0.0, const CepsReal &z=0.0) | |
using CepsVertex constructors More... | |
CepsVertex (const CepsReal3D &coor) | |
using CepsVertex constructors More... | |
CepsVertex (const CepsVertex &)=default | |
using CepsVertex constructors More... | |
CepsVertex (CepsVertex &&) noexcept=default | |
using CepsVertex constructors More... | |
Public Member Functions inherited from ceps::HoldsGlobalIndex | |
HoldsGlobalIndex (const CepsGlobalIndex &gid) | |
Constructor with ID. More... | |
HoldsGlobalIndex ()=default | |
Default constructor. More... | |
HoldsGlobalIndex (const HoldsGlobalIndex &)=default | |
Copy constructor. More... | |
HoldsGlobalIndex (HoldsGlobalIndex &&) noexcept=default | |
Copy constructor. More... | |
virtual | ~HoldsGlobalIndex ()=default |
Destructor. More... | |
HoldsGlobalIndex & | operator= (const HoldsGlobalIndex &)=default |
Assignment operator. More... | |
HoldsGlobalIndex & | operator= (HoldsGlobalIndex &&) noexcept=default |
Assignment operator. More... | |
const CepsGlobalIndex & | getGlobalIndex () const |
Get the index More... | |
void | setGlobalIndex (const CepsGlobalIndex &gid) |
Set the index. More... | |
void | reset () |
Set the index to 0u. More... | |
Public Member Functions inherited from ceps::HoldsDimension | |
HoldsDimension (const CepsUInt &dim) | |
Constructor with dimension. More... | |
HoldsDimension ()=default | |
Default constructor. More... | |
HoldsDimension (const HoldsDimension &)=default | |
Constructor by copy. More... | |
HoldsDimension (HoldsDimension &&) noexcept=default | |
Constructor by copy. More... | |
virtual | ~HoldsDimension ()=default |
Destructor. More... | |
HoldsDimension & | operator= (const HoldsDimension &)=default |
Assignment operator. More... | |
HoldsDimension & | operator= (HoldsDimension &&) noexcept=default |
Assignment operator. More... | |
const CepsUInt & | getDimension () const |
Get the dimension of the object. More... | |
void | setDimension (const CepsUInt &dim) |
Set the dimension of the object. More... | |
void | reset () |
Set the dimension of the object to 0. More... | |
Public Member Functions inherited from ceps::HoldsBoundary | |
HoldsBoundary (const CepsBool &isBoundary) | |
Constructor with given information. More... | |
HoldsBoundary ()=default | |
Default constructor. More... | |
HoldsBoundary (const HoldsBoundary &)=default | |
Copy constructor. More... | |
HoldsBoundary (HoldsBoundary &&) noexcept=default | |
Copy constructor. More... | |
virtual | ~HoldsBoundary ()=default |
Destructor. More... | |
HoldsBoundary & | operator= (const HoldsBoundary &)=default |
Assignment operator. More... | |
HoldsBoundary & | operator= (HoldsBoundary &&) noexcept=default |
Assignment operator. More... | |
CepsBool | isBoundary () const |
Tells if entity is on boundary or not. More... | |
void | setOnBoundary (CepsBool value=true) |
Sets the entity as being on boundary or not. More... | |
void | reset () |
Sets the entity as NOT being on boundary. More... | |
Public Member Functions inherited from ceps::HoldsAttributes | |
HoldsAttributes (const CepsSet< CepsAttribute > &attributes) | |
Constructor with any number of attributes. More... | |
HoldsAttributes (const CepsVector< CepsAttribute > &attributes) | |
Constructor with any number of attributes. More... | |
HoldsAttributes (CepsAttribute *attributes, const CepsUInt &n) | |
Constructor with any number of attributes. More... | |
HoldsAttributes ()=default | |
Default constructor. More... | |
HoldsAttributes (const HoldsAttributes &)=default | |
Assignement operator. More... | |
HoldsAttributes (HoldsAttributes &&) noexcept=default | |
Copy constructor. More... | |
virtual | ~HoldsAttributes ()=default |
Destructor. More... | |
HoldsAttributes & | operator= (const HoldsAttributes &)=default |
Assignment operator. More... | |
HoldsAttributes & | operator= (HoldsAttributes &&) noexcept=default |
Assignment operator. More... | |
CepsUInt | getNumberOfAttributes () const |
Returns number of attributes of the entity. More... | |
CepsSet< CepsAttribute > & | getAttributes () |
Returns the attributes of the entity. More... | |
const CepsSet< CepsAttribute > & | getAttributes () const |
Returns the attributes of the entity, const version. More... | |
void | setAttributes (const CepsVector< CepsAttribute > &attributes) |
Sets the attributes of the entity. More... | |
void | setAttributes (const CepsSet< CepsAttribute > &attributes) |
Sets the attributes of the entity. More... | |
void | setAttributes (const CepsAttribute *attributes, const CepsUInt &n) |
Sets the attributes of the entity. More... | |
template<class _It > | |
void | setAttributes (_It first, _It last) |
Sets the attributes of the entity. More... | |
void | addAttribute (const CepsAttribute &name) |
Adds an attribute to the entity. More... | |
void | addAttributes (const CepsVector< CepsAttribute > &attributes) |
Adds several attributes to the entity. More... | |
void | addAttributes (const CepsSet< CepsAttribute > &attributes) |
Adds several attributes to the entity. More... | |
void | addAttributes (const CepsAttribute *attributes, const CepsUInt &n) |
Adds several attributes to the entity. More... | |
template<class _It > | |
void | addAttributes (_It first, _It last) |
Adds several attributes to the entity. More... | |
void | removeAttribute (const CepsAttribute &name) |
Removes an attribute from the entity. More... | |
void | removeAttributes (const CepsSet< CepsAttribute > &attributes) |
Removes several attributes from the entity. More... | |
void | removeAttributes (const CepsVector< CepsAttribute > &attributes) |
Removes several attributes from the entity. More... | |
void | removeAttributes (const CepsAttribute *attributes, const CepsUInt &n) |
Removes several attributes from the entity. More... | |
template<class _It > | |
void | removeAttributes (_It first, _It last) |
Removes several attributes from the entity. More... | |
void | clearAttributes () |
Removes all attributes from the entity. More... | |
CepsBool | hasAttribute (const CepsAttribute &name) const |
Tells if the entity has the attribute in argument. More... | |
CepsBool | hasAllAttributes (const CepsVector< CepsAttribute > &attributes) const |
Tells if the entity has all the attributes in argument. More... | |
CepsBool | hasAllAttributes (const CepsAttribute *attributes, const CepsUInt &n) const |
Tells if the entity has all the attributes in argument. More... | |
template<class _It > | |
CepsBool | hasAllAttributes (_It first, _It last) const |
Tells if the entity has all the attributes in argument. More... | |
CepsBool | hasOneOfAttributes (const CepsSet< CepsAttribute > &attributes) const |
Tells if the entity has one of the attributes in argument. More... | |
CepsBool | hasOneOfAttributes (const CepsVector< CepsAttribute > &attributes) const |
Tells if the entity has one of the attributes in argument. More... | |
CepsBool | hasOneOfAttributes (const CepsAttribute *attributes, const CepsUInt &n) const |
Tells if the entity has one of the attributes in argument. More... | |
template<class _It > | |
CepsBool | hasOneOfAttributes (_It first, _It last) const |
Tells if the entity has one of the attributes in argument. More... | |
CepsBool | hasUniversalAttribute () const |
Detect if the current entity has the attribute universal. More... | |
void | reset () |
Equivalent to HoldsAttributes::clear() More... | |
Public Member Functions inherited from ceps::HoldsProcIds | |
HoldsProcIds (const CepsProcId &owner, const CepsVector< CepsProcId > &halosPid={}) | |
Constructor with own CPU Id and Ids of neighboring CPUs. More... | |
HoldsProcIds ()=default | |
Default constructor. More... | |
HoldsProcIds (const HoldsProcIds &)=default | |
Copy constructor. More... | |
HoldsProcIds (HoldsProcIds &&) noexcept=default | |
Copy constructor. More... | |
virtual | ~HoldsProcIds ()=default |
Destructor. More... | |
HoldsProcIds & | operator= (const HoldsProcIds &)=default |
Assignment operator. More... | |
HoldsProcIds & | operator= (HoldsProcIds &&) noexcept=default |
Assignment operator. More... | |
CepsBool | isShared () const |
Tells if there are halo CPUs. More... | |
void | setShared (CepsBool flag) |
Tells if there are halo CPUs. More... | |
void | setOwner (const CepsProcId &pid) |
Set shared between several processes ? More... | |
const CepsProcId & | getOwner () const |
Get owner (processus id) of this entity. More... | |
void | setAsHaloFor (const CepsProcId &pid) |
Adds pid to the set of halo CPUs More... | |
CepsBool | isHaloFor (const CepsProcId &pid) const |
Detect if this entity is in the halo of. More... | |
void | reset () |
Gives ownership to rank(), removes halos. More... | |
Public Member Functions inherited from ceps::HoldsNodes< GeomNode > | |
HoldsNodes (const CepsVector< GeomNode * > &nodes) | |
Constructor with nodes. More... | |
HoldsNodes (GeomNode **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< GeomNode * > & | getNodes () |
Reference to the node pointers array. More... | |
const CepsVector< GeomNode * > & | getNodes () const |
Reference to the node pointers array, const version. More... | |
GeomNode * | getNodeAt (const CepsUInt &i) |
Pointer to the i-th node. More... | |
const GeomNode * | getNodeAt (const CepsUInt &i) const |
Pointer to the i-th node, const version. More... | |
void | setNodes (const CepsVector< GeomNode * > &nodes) |
Assign all nodes. More... | |
void | setNodes (GeomNode **nodes, const CepsUInt &n) |
Assign all nodes. More... | |
void | setNodes (_It first, _It last) |
Assign all nodes. More... | |
void | setNodeAt (const CepsUInt &i, GeomNode *neigh) |
Set the i-th node. If i>nNodes, nullptrs fill the vector. More... | |
void | addNode (GeomNode *name) |
Add a single node to the vector. More... | |
void | addNodes (const CepsVector< GeomNode * > &nodes) |
Add several nodes to the vector. More... | |
void | addNodes (GeomNode **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 (GeomNode *&name) |
Removes the given node from the list. More... | |
void | removeNodes (const CepsVector< GeomNode * > &nodes) |
Removes several nodes from the list. More... | |
void | removeNodes (GeomNode **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 (GeomNode *&neigh) |
Tells if object has the given node. More... | |
CepsBool | hasAllNodes (const CepsVector< GeomNode * > &nodes) |
Tells if object has all the given nodes. More... | |
CepsBool | hasAllNodes (GeomNode **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< GeomNode * > &nodes) |
Tells if object has one of the given nodes. More... | |
CepsBool | hasOneOfNodes (GeomNode **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< GeomNode * > | 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< GeomCell > | |
HoldsCells (const CepsVector< GeomCell * > &cells) | |
Constructor with a vector of cells. More... | |
HoldsCells (GeomCell **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< GeomCell * > | getValidCells () |
Reference to the valid cells. More... | |
CepsVector< GeomCell * > & | getCells () |
Reference to the cells. More... | |
const CepsVector< GeomCell * > & | getCells () const |
Reference to the cells, const version. More... | |
GeomCell *& | getCellAt (const CepsUInt &i) |
Pointer to the i-th cell. More... | |
const GeomCell *& | getCellAt (const CepsUInt &i) const |
Pointer to the i-th cell , const version. More... | |
void | setCells (const CepsVector< GeomCell * > &cells) |
Replaces currently held cell pointers. More... | |
void | setCells (GeomCell **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, GeomCell *neigh) |
Set a cell pointer in the vector of currently held cells, at given index. More... | |
void | addCell (GeomCell *&name) |
Adds a cell to the list. More... | |
void | addCells (const CepsVector< GeomCell * > &cells) |
Adds several cells to the list. More... | |
void | addCells (GeomCell **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 (GeomCell *&name) |
Removes a given cell pointer from the list. More... | |
void | removeCells (const CepsVector< GeomCell * > &cells) |
Removes several cell pointers from the list. More... | |
void | removeCells (GeomCell **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 (GeomCell *&neigh) |
Tells if object has the cell given in argument. More... | |
CepsBool | hasAllCells (const CepsVector< GeomCell * > &cells) |
Tells if object has all cells given in argument. More... | |
CepsBool | hasAllCells (GeomCell **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< GeomCell * > &cells) |
Tells if object has one of the cells given in argument. More... | |
CepsBool | hasOneOfCells (GeomCell **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... | |
Public Member Functions inherited from CepsVertex | |
CepsVertex (const CepsReal &x=0.0, const CepsReal &y=0.0, const CepsReal &z=0.0) | |
Constructor with coordinates. More... | |
CepsVertex (const CepsReal3D &coor) | |
Constructor with coordinates. More... | |
CepsVertex (const CepsVertex &)=default | |
Copy constructor. More... | |
CepsVertex (CepsVertex &&) noexcept=default | |
Copy constructor. More... | |
CepsVertex & | operator= (const CepsVertex &)=default |
Assignment operator. More... | |
CepsVertex & | operator= (CepsVertex &&) noexcept=default |
Assignment operator. More... | |
CepsVertex & | operator= (const CepsMathVertices &vec) |
Assignment operator from Eigen format. More... | |
CepsVertex & | operator= (const CepsReal3D &vec) |
Assignment operator. More... | |
virtual | ~CepsVertex ()=default |
Destructor. More... | |
operator CepsMathVertex () const | |
Cast operator into CepsMathVertex. More... | |
void | setX (const CepsReal &x) |
Set vertex x coordinate. More... | |
void | setY (const CepsReal &y) |
Set vertex y coordinate. More... | |
void | setZ (const CepsReal &z) |
Set vertex z coordinate. More... | |
void | setCoordinate (const CepsUInt &dim, const CepsReal &coor) |
Set the three coordinates. More... | |
void | setCoordinates (const CepsReal &x, const CepsReal &y=0., const CepsReal &z=0.) |
Set the 3 coordinates at once. More... | |
void | setCoordinates (const CepsReal3D &coor) |
Set the three coordinates. More... | |
void | setCoordinates (const CepsReal *coors, const CepsUInt &n) |
Set the three coordinates. More... | |
void | scale (const CepsReal &scaleFactor) |
Scale all coordinates of this node. More... | |
const CepsReal & | x () const |
Vertex x coordinate. More... | |
const CepsReal & | y () const |
Vertex y coordinate. More... | |
const CepsReal & | z () const |
Vertex z coordinate. More... | |
CepsReal & | getCoordinate (const CepsSize &dim) |
Get coordinate of dimension 0 1 2, read & write. More... | |
const CepsReal & | getCoordinate (const CepsSize &dim) const |
Get coordinate of dimension 0 1 2, read only. More... | |
CepsReal & | operator[] (const CepsUInt &dim) |
Get coordinate of dimension 0 1 2, read & write. More... | |
const CepsReal & | operator[] (const CepsUInt &dim) const |
Get coordinate of dimension 0 1 2, read only. More... | |
CepsReal3D & | getCoordinates () |
Get three coordinates, read & write. More... | |
const CepsReal3D & | getCoordinates () const |
Get three coordinates, read only. More... | |
CepsMathVertex | getCoordinatesForEigen () const |
Get three coordinates. More... | |
CepsBool | equals (const CepsVertex &vert, const CepsReal &errorFactor=1.0) |
Check for coordinates equality. More... | |
CepsReal | norm2 (const CepsSize &dim=3) const |
Euclidian norm of coordinates. More... | |
CepsReal | normp (const CepsInt &p, const CepsSize &dim=3) const |
Norm p (for p =-1, 1, 2, etc) with p=-1 gives the inf norm. More... | |
CepsReal | dot (const CepsVertex &other, const CepsSize &dim=3) const |
Scalar product. dim restricts which components are used (1:(x), 2:(x,y), 3:(x,y,z)) More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ceps::HoldsNodes< GeomNode > | |
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< GeomCell > | |
void | errorOnCellIndex (CepsUInt i, const CepsString &funcName) const |
Aborts if object holds less than i cells. More... | |
Protected Attributes inherited from ceps::HoldsGlobalIndex | |
CepsGlobalIndex | m_globalIndex |
the index More... | |
Protected Attributes inherited from ceps::HoldsAttributes | |
CepsSet< CepsAttribute > | m_attributes |
The attributes held by the entity. More... | |
Protected Attributes inherited from ceps::HoldsNodes< GeomNode > | |
CepsVector< GeomNode * > | m_nodes |
The node pointers. More... | |
GeomNode * | m_dummyNode |
An empty node to be returned after abort when testing. More... | |
Protected Attributes inherited from ceps::HoldsCells< GeomCell > | |
CepsVector< GeomCell * > | m_cells |
The cell pointers. More... | |
GeomNode::GeomNode | ( | CepsReal | x, |
CepsReal | y, | ||
CepsReal | z, | ||
CepsGlobalIndex | gID, | ||
CepsAttribute * | attrs = nullptr , |
||
CepsUInt | nAttrs = 0 |
||
) |
Constructor.
x | coordinates |
y | coordinates |
z | coordinates |
gID | global Index |
attrs | attributes |
nAttrs | number of attributes |
Definition at line 33 of file GeomNode.cpp.
|
overridedefault |
Destructor.
|
defaultnoexcept |
using CepsVertex constructors
CepsVertex::CepsVertex |
using CepsVertex constructors
Definition at line 45 of file CepsVertex.cpp.
|
explicit |
using CepsVertex constructors
Definition at line 48 of file CepsVertex.cpp.
|
default |
using CepsVertex constructors
void GeomNode::reset | ( | ) |
Wipes content.
Definition at line 49 of file GeomNode.cpp.