CEPS  24.01
Cardiac ElectroPhysiology Simulator
DegreeOfFreedom Class Reference

Detailed Description

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>

Inheritance diagram for DegreeOfFreedom:
[legend]

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...
 
DegreeOfFreedomoperator= (const DegreeOfFreedom &)=delete
 Copy assignement. More...
 
 ~DegreeOfFreedom ()=default
 Destructor. More...
 
void setUnknown (Unknown *unknown)
 Set the unknown (replace the existing one) More...
 
UnknowngetUnknown () const
 Get the unknow defined at this dof. More...
 
const CepsLocationFlaggetLocation () const
 Shorcut from unknown to know the location. More...
 
void setGeomId (CepsGlobalIndex geomId)
 Set the geom id (replace the existing one) More...
 
const CepsGlobalIndexgetGeomId () 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 CepsGlobalIndexgetDiscrId () 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...
 
CepsVertexgetVertex () 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...
 
HoldsGlobalIndexoperator= (const HoldsGlobalIndex &)=default
 Assignment operator. More...
 
HoldsGlobalIndexoperator= (HoldsGlobalIndex &&) noexcept=default
 Assignment operator. More...
 
const CepsGlobalIndexgetGlobalIndex () 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...
 
HoldsBoundaryoperator= (const HoldsBoundary &)=default
 Assignment operator. More...
 
HoldsBoundaryoperator= (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...
 
HoldsProcIdsoperator= (const HoldsProcIds &)=default
 Assignment operator. More...
 
HoldsProcIdsoperator= (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 CepsProcIdgetOwner () 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...
 
HoldsAttributesoperator= (const HoldsAttributes &)=default
 Assignment operator. More...
 
HoldsAttributesoperator= (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

Unknownm_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...
 
CepsVertexm_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< CepsAttributem_attributes
 The attributes held by the entity. More...
 

Constructor & Destructor Documentation

◆ DegreeOfFreedom() [1/3]

DegreeOfFreedom::DegreeOfFreedom ( )
delete

Deleted default constructor.

◆ DegreeOfFreedom() [2/3]

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.

◆ DegreeOfFreedom() [3/3]

DegreeOfFreedom::DegreeOfFreedom ( const DegreeOfFreedom )
delete

Copy constructor.

◆ ~DegreeOfFreedom()

DegreeOfFreedom::~DegreeOfFreedom ( )
default

Destructor.

Member Function Documentation

◆ addNeighbor()

void DegreeOfFreedom::addNeighbor ( DegreeOfFreedom x)

Add a neihboring dof.

Definition at line 114 of file DegreeOfFreedom.cpp.

◆ getDiscrId()

const CepsGlobalIndex & DegreeOfFreedom::getDiscrId ( ) const

Get the spatial discretization ID (FEnode id for FE)

Definition at line 95 of file DegreeOfFreedom.cpp.

◆ getGeomId()

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.

◆ getLocation()

const CepsLocationFlag & DegreeOfFreedom::getLocation ( ) const

Shorcut from unknown to know the location.

Definition at line 69 of file DegreeOfFreedom.cpp.

◆ getNeighbors()

const CepsSet< DegreeOfFreedom * > & DegreeOfFreedom::getNeighbors ( ) const

Neighbor dofs.

Definition at line 127 of file DegreeOfFreedom.cpp.

◆ getNumberOfNeighbors()

CepsUInt DegreeOfFreedom::getNumberOfNeighbors ( ) const

Neighbor dofs #.

Definition at line 121 of file DegreeOfFreedom.cpp.

◆ getUnknown()

Unknown * DegreeOfFreedom::getUnknown ( ) const

Get the unknow defined at this dof.

Definition at line 63 of file DegreeOfFreedom.cpp.

◆ getVertex()

CepsVertex * DegreeOfFreedom::getVertex ( ) const

Get the vertex pointer.

Definition at line 108 of file DegreeOfFreedom.cpp.

◆ operator=()

DegreeOfFreedom& DegreeOfFreedom::operator= ( const DegreeOfFreedom )
delete

Copy assignement.

◆ setDiscrId()

void DegreeOfFreedom::setDiscrId ( CepsGlobalIndex  discrId)

Set the FE node id (replace the existing one)

Definition at line 88 of file DegreeOfFreedom.cpp.

◆ setGeomId()

void DegreeOfFreedom::setGeomId ( CepsGlobalIndex  geomId)

Set the geom id (replace the existing one)

Definition at line 75 of file DegreeOfFreedom.cpp.

◆ setUnknown()

void DegreeOfFreedom::setUnknown ( Unknown unknown)

Set the unknown (replace the existing one)

Definition at line 56 of file DegreeOfFreedom.cpp.

◆ setVertex()

void DegreeOfFreedom::setVertex ( CepsVertex vertex)

Set the vertex pointer where is defined the dof.

Definition at line 101 of file DegreeOfFreedom.cpp.

Field Documentation

◆ m_discrId

CepsGlobalIndex DegreeOfFreedom::m_discrId
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.

◆ m_geomId

CepsGlobalIndex DegreeOfFreedom::m_geomId
protected

Id of geometric entity on which the dof is defined.

Definition at line 136 of file DegreeOfFreedom.hpp.

◆ m_neigh

CepsSet<DegreeOfFreedom*> DegreeOfFreedom::m_neigh
protected

Pointers on nieghboring dofs.

Definition at line 146 of file DegreeOfFreedom.hpp.

◆ m_unknown

Unknown* DegreeOfFreedom::m_unknown
protected

Link to unknown defined at that dof.

Definition at line 133 of file DegreeOfFreedom.hpp.

◆ m_vertex

CepsVertex* DegreeOfFreedom::m_vertex
protected

Geometrical location of the dof.

Definition at line 143 of file DegreeOfFreedom.hpp.


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