CEPS  24.01
Cardiac ElectroPhysiology Simulator
SourceTerm< _Result > Class Template Reference

Detailed Description

template<class _Result>
class SourceTerm< _Result >

Source term, essentially a ScalarField.

See also
ScalarField

Definition at line 49 of file SourceTerm.hpp.

#include <SourceTerm.hpp>

Inheritance diagram for SourceTerm< _Result >:
[legend]

Public Member Functions

 SourceTerm (SAFunc< _Result > *functor, const CepsVector< DegreeOfFreedom * > *domain, CepsUnknownIndex unknown, CepsBool isStim=false, CepsBool isLaplaceMatrix=false, CepsBool bufferize=false)
 Construct a new Source Term object. More...
 
 ~SourceTerm () override
 Delete data. More...
 
void setFlag (const CepsSourceTermFlag &flag)
 Set the source term flag. More...
 
CepsSourceTermFlag getFlag () const
 Get the source term flag. More...
 
CepsUnknownIndex getUnknownId () const
 Get the name of the unknown. More...
 
CepsBool hasOption (CepsSourceTermFlag flag) const
 Knowing the behavior relating to source term flag. More...
 
- Public Member Functions inherited from Field< _Result, DegreeOfFreedom >
 Field (FunctionType *functor, const _Domain *domain, CepsBool bufferize=false)
 Construct a new Field object, with a vector, functor cannot be null. More...
 
virtual ~Field ()=default
 Destructor. More...
 
void addDomain (const _Domain *domain)
 Add another domain of definition. More...
 
void clearDomains ()
 Removes domains and support. More...
 
FunctionTypegetFunctor () const
 Get the functor inside the object. More...
 
void setFunctor (ceps::Function< _Result(CepsStandardArgs)> *functor)
 Set the functor inside the object. More...
 
void setScaleFactor (CepsReal scaleFactor)
 Scale the result. More...
 
CepsReal getScaleFactor () const
 Get the scale factor used. More...
 
CepsBool isBuffered () const
 Tells if field is bufferized. More...
 
CepsBool hasBufferedData () const
 Tells if field is bufferized and data has already been computed. More...
 
CepsEnum getFunctorFlags () const
 Get flags of the function. More...
 
CepsBool hasFunctorOption (CepsFunctionFlag flag) const
 Knowing the behavior relating to the time variable. More...
 
CepsBool isSpaceVariable () const
 Knowing the behavior relating to the space variable. More...
 
CepsBool isTimeVariable () const
 Knowing the behavior relating to the time variable. More...
 
CepsBool needsSolution () const
 Knowing the behavior relating to the solution vector. More...
 
void getValues (CepsVector< _Result > &values, CepsReal t, const CepsVector< DegreeOfFreedom * > &points={})
 Get the values for given row indices. If no support was given, simply call the functor for all dofs. More...
 
_Result getValue (DegreeOfFreedom *point, CepsReal t)
 Get single value for given row index. /!\ If not nullptr, the solution vector should HAVE ALREADY CALLED getLocalData() !! More...
 
void computeSupport (AbstractSelector< _Iterator > *selector, CepsBool canStartEmpty=false)
 Computes the support in the domains of definition, using the given selector. More...
 
virtual void actualize (CepsReal t)
 Precompute field data. More...
 
CepsVector< _Result > & getBufferedData ()
 Ref to buffered data. More...
 
CepsVector< CepsGlobalIndex > & getSupportIndices ()
 Get indices of support. More...
 
const CepsVector< DegreeOfFreedom * > & getSupport ()
 Get suppor. More...
 
const CepsVector< const CepsVector< DegreeOfFreedom * > * > & getDomains ()
 Get the spans on which the field is defined. More...
 

Protected Attributes

CepsSourceTermFlag m_sourceFlag
 source term flag More...
 
CepsUnknownIndex m_unknown
 Unknown for which the source term applies. More...
 
- Protected Attributes inherited from Field< _Result, DegreeOfFreedom >
FunctionTypem_functor
 doesn't belong to this object More...
 
CepsReal m_scaleFactor
 An optional scale factor. More...
 
CepsVector< DegreeOfFreedom * > m_support
 List of "points" where the field applies. More...
 
CepsVector< CepsGlobalIndexm_supportIndices
 List of "points" indices. More...
 
CepsBool m_supportComputed
 True if computeSupport has been called. More...
 
CepsVector< _Result > m_buffer
 Get buffer with data evaluated. More...
 
CepsBool m_precompute
 Do we bufferize data ? More...
 
CepsBool m_isPrecomputed
 Check if values were already evaluated. More...
 
CepsVector< const CepsVector< DegreeOfFreedom * > * > m_domains
 Ranges on which the field is defined. More...
 

Friends

class SourceTermManager
 Friend class. More...
 

Additional Inherited Members

- Public Types inherited from Field< _Result, DegreeOfFreedom >
using FunctionType = SAFunc< _Result >
 The type returned by the functor. More...
 
using _Domain = CepsVector< DegreeOfFreedom * >
 The objects on which is defined the support (GeomCell, GeomNode, DegreeOfFreedom) More...
 
using _Iterator = typename CepsVector< DegreeOfFreedom * >::const_iterator
 The objects on which is defined the support (GeomCell, GeomNode, DegreeOfFreedom) More...
 
- Protected Member Functions inherited from Field< _Result, DegreeOfFreedom >
virtual void evaluateAll (CepsReal t, CepsVector< _Result > &results)
 Evaluate on all domain or support, put results in given vector. More...
 
virtual void evaluateOn (const _Domain *domain, CepsReal t, CepsUInt offset, CepsVector< _Result > &results)
 Precompute field data. More...
 

Constructor & Destructor Documentation

◆ SourceTerm()

template<class _Result >
SourceTerm< _Result >::SourceTerm ( SAFunc< _Result > *  functor,
const CepsVector< DegreeOfFreedom * > *  domain,
CepsUnknownIndex  unknown,
CepsBool  isStim = false,
CepsBool  isLaplaceMatrix = false,
CepsBool  bufferize = false 
)

Construct a new Source Term object.

Parameters
functorfunctor wrapped
domainlist of dofs where the source term applies
unknownthe unknown for which the source term applies
isStimstimulation type
isLaplaceMatrixto be multiplied by stiffness FE matrix
bufferizestore values

◆ ~SourceTerm()

template<class _Result >
SourceTerm< _Result >::~SourceTerm ( )
override

Delete data.

Member Function Documentation

◆ getFlag()

template<class _Result >
CepsSourceTermFlag SourceTerm< _Result >::getFlag ( ) const

Get the source term flag.

◆ getUnknownId()

template<class _Result >
CepsUnknownIndex SourceTerm< _Result >::getUnknownId ( ) const

Get the name of the unknown.

◆ hasOption()

template<class _Result >
CepsBool SourceTerm< _Result >::hasOption ( CepsSourceTermFlag  flag) const

Knowing the behavior relating to source term flag.

◆ setFlag()

template<class _Result >
void SourceTerm< _Result >::setFlag ( const CepsSourceTermFlag flag)

Set the source term flag.

Friends And Related Function Documentation

◆ SourceTermManager

template<class _Result >
friend class SourceTermManager
friend

Friend class.

Definition at line 91 of file SourceTerm.hpp.

Field Documentation

◆ m_sourceFlag

template<class _Result >
CepsSourceTermFlag SourceTerm< _Result >::m_sourceFlag
protected

source term flag

Definition at line 94 of file SourceTerm.hpp.

◆ m_unknown

template<class _Result >
CepsUnknownIndex SourceTerm< _Result >::m_unknown
protected

Unknown for which the source term applies.

Definition at line 95 of file SourceTerm.hpp.


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