CEPS  24.01
Cardiac ElectroPhysiology Simulator
AbstractAssembler Class Referenceabstract

Detailed Description

Common elements for linear system assembly.

Definition at line 39 of file AbstractAssembler.hpp.

#include <AbstractAssembler.hpp>

Inheritance diagram for AbstractAssembler:
[legend]

Public Member Functions

 AbstractAssembler ()
 Default constructor (used for virtual inheritance) More...
 
 AbstractAssembler (AbstractDiscretization *discr, const CepsSet< CepsAttribute > &attributes={CepsUniversal}, const CepsVector< Unknown * > &unknowns={})
 Basic constructor If the given attributes is empty, the assembler will assemble everywhere (CepsUniversal) Similar for unknowns: no unknown specified means assembly will be for all unknowns. More...
 
 AbstractAssembler (const AbstractAssembler &that)=delete
 No copy constructor. More...
 
AbstractAssembleroperator= (const AbstractAssembler &that)=delete
 No assignement operator. More...
 
virtual ~AbstractAssembler ()
 Destructor. More...
 
virtual void assemble (CepsReal t=0., CepsBool finalize=true)=0
 The main routine to call to assemble linear system. More...
 
virtual void assembleForZeroDDof (DegreeOfFreedom *dof, CepsReal t=0.)
 Assembly routine for zeroD dofs. Does nothing by default, redefine in derived classes. More...
 
CepsBool isAssemblingMatrix () const
 True if ptr to matrix has been set. More...
 
DistributedMatrixgetMatrix ()
 The matrix to assemble. More...
 
void setMatrix (DistributedMatrix *mat)
 The matrix to assemble. More...
 
CepsBool isAssemblingVector () const
 True if ptr to vector has been set. More...
 
DistributedVectorgetVector ()
 The vector to assemble. More...
 
void setVector (DistributedVector *vec)
 The vector to assemble. More...
 
void setScaleFactor (CepsReal scaleFactor)
 Factor that multiplies all coefficients to put in linear system. More...
 
CepsReal getScaleFactor () const
 Factor that multiplies all coefficients to put in linear system. More...
 
virtual CepsBool isChangingBetweenTimes (CepsReal t1, CepsReal t2) const
 Tells if this assembler changes between the two times. More...
 
void setAssemblingFlag (const CepsAssemblingFlag &value)
 Part to assemble in an assembler, see values of CepsAssemblingFlag. More...
 
CepsAssemblingFlag getAssemblingFlag () const
 Get part to assemble in an assembler, see values of CepsAssemblingFlag. More...
 
AbstractPdeProblemgetProblem () const
 Link to PDE problem. 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...
 
- Public Member Functions inherited from CepsObject
 CepsObject ()=default
 default constructor More...
 
 CepsObject (const CepsObject &)=default
 Copy constructor. More...
 
virtual ~CepsObject ()=default
 Destructor. More...
 
CepsObjectoperator= (const CepsObject &)=default
 Assignment operator. More...
 
CepsObjecttoBaseObject ()
 Returns a pointer to CepsObject class. More...
 
const CepsObjecttoBaseObject () const
 Returns a pointer to CepsObject class, const version. More...
 
ProfilergetProfiler () const
 Access to profiler. More...
 

Protected Attributes

AbstractPdeProblemm_problem
 Direct link to problem, you may write getXXXProblem methods in derived classes that return the right kind of PdeProblem pointer. More...
 
DistributedMatrixm_gMat
 Global matrix. More...
 
DistributedVectorm_gVec
 Global Vector. More...
 
CepsReal m_scaleFactor
 Scale factor. More...
 
CepsVector< Unknown * > m_unknownsWL
 White list of unknowns. More...
 
CepsAssemblingFlag m_assemblingFlag
 Switch from an assembling to another (see CepsAssemblingFlag) More...
 
- Protected Attributes inherited from ceps::HoldsAttributes
CepsSet< CepsAttributem_attributes
 The attributes held by the entity. More...
 

Additional Inherited Members

- Static Protected Attributes inherited from CepsObject
static Profiler m_profiler
 The same profiler for each big object. More...
 

Constructor & Destructor Documentation

◆ AbstractAssembler() [1/3]

AbstractAssembler::AbstractAssembler ( )

Default constructor (used for virtual inheritance)

Definition at line 32 of file AbstractAssembler.cpp.

◆ AbstractAssembler() [2/3]

AbstractAssembler::AbstractAssembler ( AbstractDiscretization discr,
const CepsSet< CepsAttribute > &  attributes = {CepsUniversal},
const CepsVector< Unknown * > &  unknowns = {} 
)
explicit

Basic constructor If the given attributes is empty, the assembler will assemble everywhere (CepsUniversal) Similar for unknowns: no unknown specified means assembly will be for all unknowns.

Definition at line 43 of file AbstractAssembler.cpp.

◆ AbstractAssembler() [3/3]

AbstractAssembler::AbstractAssembler ( const AbstractAssembler that)
delete

No copy constructor.

◆ ~AbstractAssembler()

AbstractAssembler::~AbstractAssembler ( )
virtual

Destructor.

Definition at line 66 of file AbstractAssembler.cpp.

Member Function Documentation

◆ assemble()

virtual void AbstractAssembler::assemble ( CepsReal  t = 0.,
CepsBool  finalize = true 
)
pure virtual

The main routine to call to assemble linear system.

Parameters
tTime used to evaluate functions if needed
finalizeSet to false if successive calls to this method on the same matrix/vector are needed (eg in boundary conditions)

Implemented in FEDivKGradBCAssembler, FEAssembler, FEPacemakerPoissonAssembler, and FEPacemakerBidomainAssembler.

◆ assembleForZeroDDof()

void AbstractAssembler::assembleForZeroDDof ( DegreeOfFreedom dof,
CepsReal  t = 0. 
)
virtual

Assembly routine for zeroD dofs. Does nothing by default, redefine in derived classes.

Parameters
dofpointer to 0D degree of freedom
tTime used to evaluate functions if needed

Reimplemented in FEMassAssembler, FEPacemakerPoissonAssembler, and FEPacemakerBidomainAssembler.

Definition at line 76 of file AbstractAssembler.cpp.

◆ getAssemblingFlag()

CepsAssemblingFlag AbstractAssembler::getAssemblingFlag ( ) const

Get part to assemble in an assembler, see values of CepsAssemblingFlag.

Definition at line 139 of file AbstractAssembler.cpp.

◆ getMatrix()

DistributedMatrix * AbstractAssembler::getMatrix ( )

The matrix to assemble.

Definition at line 82 of file AbstractAssembler.cpp.

◆ getProblem()

AbstractPdeProblem * AbstractAssembler::getProblem ( ) const

Link to PDE problem.

Definition at line 145 of file AbstractAssembler.cpp.

◆ getScaleFactor()

CepsReal AbstractAssembler::getScaleFactor ( ) const

Factor that multiplies all coefficients to put in linear system.

Definition at line 121 of file AbstractAssembler.cpp.

◆ getVector()

DistributedVector * AbstractAssembler::getVector ( )

The vector to assemble.

Definition at line 101 of file AbstractAssembler.cpp.

◆ isAssemblingMatrix()

CepsBool AbstractAssembler::isAssemblingMatrix ( ) const

True if ptr to matrix has been set.

Definition at line 70 of file AbstractAssembler.cpp.

◆ isAssemblingVector()

CepsBool AbstractAssembler::isAssemblingVector ( ) const

True if ptr to vector has been set.

Definition at line 95 of file AbstractAssembler.cpp.

◆ isChangingBetweenTimes()

CepsBool AbstractAssembler::isChangingBetweenTimes ( CepsReal  t1,
CepsReal  t2 
) const
virtual

Tells if this assembler changes between the two times.

Reimplemented in FEDivKGradAssembler, FEPacemakerPoissonAssembler, and FEPacemakerBidomainAssembler.

Definition at line 127 of file AbstractAssembler.cpp.

◆ operator=()

AbstractAssembler& AbstractAssembler::operator= ( const AbstractAssembler that)
delete

No assignement operator.

◆ setAssemblingFlag()

void AbstractAssembler::setAssemblingFlag ( const CepsAssemblingFlag value)

Part to assemble in an assembler, see values of CepsAssemblingFlag.

Parameters
value

Definition at line 133 of file AbstractAssembler.cpp.

◆ setMatrix()

void AbstractAssembler::setMatrix ( DistributedMatrix mat)

The matrix to assemble.

Definition at line 88 of file AbstractAssembler.cpp.

◆ setScaleFactor()

void AbstractAssembler::setScaleFactor ( CepsReal  scaleFactor)

Factor that multiplies all coefficients to put in linear system.

Definition at line 114 of file AbstractAssembler.cpp.

◆ setVector()

void AbstractAssembler::setVector ( DistributedVector vec)

The vector to assemble.

Definition at line 107 of file AbstractAssembler.cpp.

Field Documentation

◆ m_assemblingFlag

CepsAssemblingFlag AbstractAssembler::m_assemblingFlag
protected

Switch from an assembling to another (see CepsAssemblingFlag)

Definition at line 138 of file AbstractAssembler.hpp.

◆ m_gMat

DistributedMatrix* AbstractAssembler::m_gMat
protected

Global matrix.

Definition at line 134 of file AbstractAssembler.hpp.

◆ m_gVec

DistributedVector* AbstractAssembler::m_gVec
protected

Global Vector.

Definition at line 135 of file AbstractAssembler.hpp.

◆ m_problem

AbstractPdeProblem* AbstractAssembler::m_problem
protected

Direct link to problem, you may write getXXXProblem methods in derived classes that return the right kind of PdeProblem pointer.

Definition at line 133 of file AbstractAssembler.hpp.

◆ m_scaleFactor

CepsReal AbstractAssembler::m_scaleFactor
protected

Scale factor.

Definition at line 136 of file AbstractAssembler.hpp.

◆ m_unknownsWL

CepsVector<Unknown*> AbstractAssembler::m_unknownsWL
protected

White list of unknowns.

Definition at line 137 of file AbstractAssembler.hpp.


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