CEPS
24.01
Cardiac ElectroPhysiology Simulator
|
A degree of freedom for any kind of problem The dof can be associated to a geometrical element or not. Each dof is tied to a single PDE unknown, has one global index, and can have one attribute.
Definition at line 39 of file DegreeOfFreedom.hpp.
#include <DegreeOfFreedom.hpp>
Public Member Functions | |
DegreeOfFreedom ()=delete | |
Deleted default constructor. More... | |
DegreeOfFreedom (Unknown *unknown, const CepsSet< CepsAttribute > &attrs, CepsGlobalIndex geomId, CepsIndex dofId=CepsUniversal, CepsProcId procId=ceps::getRank(), CepsSet< DegreeOfFreedom * > neighs={}) | |
Construct a dof from unknown, region ptr, geomId, dofId, procId and pointers to neighs. More... | |
DegreeOfFreedom (const DegreeOfFreedom &)=delete | |
Copy constructor. More... | |
DegreeOfFreedom & | operator= (const DegreeOfFreedom &)=delete |
Copy assignement. More... | |
~DegreeOfFreedom ()=default | |
Destructor. More... | |
void | setUnknown (Unknown *unknown) |
Set the unknown (replace the existing one) More... | |
Unknown * | getUnknown () const |
Get the unknow defined at this dof. More... | |
const CepsLocationFlag & | getLocation () const |
Shorcut from unknown to know the location. More... | |
void | setGeomId (CepsGlobalIndex geomId) |
Set the geom id (replace the existing one) More... | |
const CepsGlobalIndex & | getGeomId () const |
Get the Geom Identity for the dof (-1 means no geometric entity) More... | |
void | setDiscrId (CepsGlobalIndex discrId) |
Set the FE node id (replace the existing one) More... | |
const CepsGlobalIndex & | getDiscrId () const |
Get the spatial discretization ID (FEnode id for FE) More... | |
void | setVertex (CepsVertex *vertex) |
Set the vertex pointer where is defined the dof. More... | |
CepsVertex * | getVertex () const |
Get the vertex pointer. More... | |
void | addNeighbor (DegreeOfFreedom *x) |
Add a neihboring dof. More... | |
CepsUInt | getNumberOfNeighbors () const |
Neighbor dofs #. More... | |
const CepsSet< DegreeOfFreedom * > & | getNeighbors () const |
Neighbor dofs. 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::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::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::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... | |
Protected Attributes | |
Unknown * | m_unknown |
Link to unknown defined at that dof. More... | |
CepsGlobalIndex | m_geomId |
Id of geometric entity on which the dof is defined. More... | |
CepsGlobalIndex | m_discrId |
A global index used only for finite elements : it is the ID of the FE Node which may be different from the geom ID. More... | |
CepsVertex * | m_vertex |
Geometrical location of the dof. More... | |
CepsSet< DegreeOfFreedom * > | m_neigh |
Pointers on nieghboring dofs. 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... | |
|
delete |
Deleted default constructor.
DegreeOfFreedom::DegreeOfFreedom | ( | Unknown * | unknown, |
const CepsSet< CepsAttribute > & | attrs, | ||
CepsGlobalIndex | geomId, | ||
CepsIndex | dofId = CepsUniversal , |
||
CepsProcId | procId = ceps::getRank() , |
||
CepsSet< DegreeOfFreedom * > | neighs = {} |
||
) |
Construct a dof from unknown, region ptr, geomId, dofId, procId and pointers to neighs.
Definition at line 32 of file DegreeOfFreedom.cpp.
|
delete |
Copy constructor.
|
default |
Destructor.
void DegreeOfFreedom::addNeighbor | ( | DegreeOfFreedom * | x | ) |
Add a neihboring dof.
Definition at line 114 of file DegreeOfFreedom.cpp.
const CepsGlobalIndex & DegreeOfFreedom::getDiscrId | ( | ) | const |
Get the spatial discretization ID (FEnode id for FE)
Definition at line 95 of file DegreeOfFreedom.cpp.
const CepsGlobalIndex & DegreeOfFreedom::getGeomId | ( | ) | const |
Get the Geom Identity for the dof (-1 means no geometric entity)
Definition at line 82 of file DegreeOfFreedom.cpp.
const CepsLocationFlag & DegreeOfFreedom::getLocation | ( | ) | const |
Shorcut from unknown to know the location.
Definition at line 69 of file DegreeOfFreedom.cpp.
const CepsSet< DegreeOfFreedom * > & DegreeOfFreedom::getNeighbors | ( | ) | const |
Neighbor dofs.
Definition at line 127 of file DegreeOfFreedom.cpp.
CepsUInt DegreeOfFreedom::getNumberOfNeighbors | ( | ) | const |
Neighbor dofs #.
Definition at line 121 of file DegreeOfFreedom.cpp.
Unknown * DegreeOfFreedom::getUnknown | ( | ) | const |
Get the unknow defined at this dof.
Definition at line 63 of file DegreeOfFreedom.cpp.
CepsVertex * DegreeOfFreedom::getVertex | ( | ) | const |
Get the vertex pointer.
Definition at line 108 of file DegreeOfFreedom.cpp.
|
delete |
Copy assignement.
void DegreeOfFreedom::setDiscrId | ( | CepsGlobalIndex | discrId | ) |
Set the FE node id (replace the existing one)
Definition at line 88 of file DegreeOfFreedom.cpp.
void DegreeOfFreedom::setGeomId | ( | CepsGlobalIndex | geomId | ) |
Set the geom id (replace the existing one)
Definition at line 75 of file DegreeOfFreedom.cpp.
void DegreeOfFreedom::setUnknown | ( | Unknown * | unknown | ) |
Set the unknown (replace the existing one)
Definition at line 56 of file DegreeOfFreedom.cpp.
void DegreeOfFreedom::setVertex | ( | CepsVertex * | vertex | ) |
Set the vertex pointer where is defined the dof.
Definition at line 101 of file DegreeOfFreedom.cpp.
|
protected |
A global index used only for finite elements : it is the ID of the FE Node which may be different from the geom ID.
Definition at line 140 of file DegreeOfFreedom.hpp.
|
protected |
Id of geometric entity on which the dof is defined.
Definition at line 136 of file DegreeOfFreedom.hpp.
|
protected |
Pointers on nieghboring dofs.
Definition at line 146 of file DegreeOfFreedom.hpp.
|
protected |
Link to unknown defined at that dof.
Definition at line 133 of file DegreeOfFreedom.hpp.
|
protected |
Geometrical location of the dof.
Definition at line 143 of file DegreeOfFreedom.hpp.