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

Detailed Description

template<typename _Result>
class ArraySAFunc< _Result >

Functor that gets its result from an array.

Can be initialized with data (then data is copied into the class instance), a pointer to data (then data is not copied), or from a vtk or msh file (data is stored in class instance)

A Flag must be specified at instantiation of ArraySAFunc objects, in order to tell if data must be accessed with nodeIDs or cellIDs

Definition at line 50 of file ArraySAFunc.hpp.

#include <ArraySAFunc.hpp>

Inheritance diagram for ArraySAFunc< _Result >:
[legend]

Public Member Functions

 ArraySAFunc (const ArraySAFunc &)=default
 We allow the copy from a functor to another. More...
 
ArraySAFuncoperator= (const ArraySAFunc &)=default
 We allow the assignement from a functor to another. More...
 
 ArraySAFunc (const DistributedInfos< _Result > &data, const CepsFunctionFlag &loc)
 Constructor with array, data is copied. More...
 
 ArraySAFunc (DistributedInfos< _Result > *data, const CepsFunctionFlag &loc)
 Constructor with array ptr, data is NOT copied. More...
 
 ArraySAFunc (const CepsString &fileName, const CepsString &arrayName, const CepsFunctionFlag &loc, Geometry *geom)
 Constructor with a vtk or msh file, data is copied. More...
 
 ArraySAFunc (DHVecPtr src, DistributedInfos< DegreeOfFreedom * > *dofs)
 Constructor with a DistributedHaloVector, data is COPIED from the vector into this class. It means that data will NOT change during execution. (unless a setValues method is implemented later on) The src vector must have the same structure has the dofs distributed info. More...
 
 ~ArraySAFunc ()
 Destructor. More...
 
virtual _Result eval (CepsStandardArgs args) final
 Call operator to evaluate functor. More...
 
CepsEnum getFlags () const final
 The final flag is a combination of Attribute and of the flags of the stored object type (if it has any) More...
 
- Public Member Functions inherited from SAFunc< _Result >
 SAFunc (const SAFunc &)=default
 We allow the copy from a functor to another. More...
 
SAFuncoperator= (const SAFunc &)=default
 We allow the assignement from a functor to another. More...
 
virtual void getLocalData ()
 Authorize access to data for solvecSAFunc, other derived classes : nothing. More...
 
virtual void releaseLocalData ()
 Authorize access to data for solvecSAFunc, other derived classes : nothing. More...
 
CepsBool hasOption (CepsFunctionFlag flag)
 Tells if option is activated. More...
 

Protected Member Functions

void checkLocation (const CepsFunctionFlag &loc)
 Determines if flag passed in constructor is valid (cells or nodes ID) More...
 

Protected Attributes

CepsFunctionFlag m_location
 Where the data is defined (point, cell) More...
 
CepsBool m_dataOwned
 Flag telling if data structure is created by this instance. More...
 
DistributedInfos< _Result > * m_data
 Ptr to data. More...
 

Additional Inherited Members

- Public Types inherited from SAFunc< _Result >
using BaseFunction = ceps::Function< _Result(CepsStandardArgs)>
 Typedef for the function type. More...
 

Constructor & Destructor Documentation

◆ ArraySAFunc() [1/5]

template<typename _Result >
ArraySAFunc< _Result >::ArraySAFunc ( const ArraySAFunc< _Result > &  )
default

We allow the copy from a functor to another.

◆ ArraySAFunc() [2/5]

template<typename _Result >
ArraySAFunc< _Result >::ArraySAFunc ( const DistributedInfos< _Result > &  data,
const CepsFunctionFlag loc 
)

Constructor with array, data is copied.

◆ ArraySAFunc() [3/5]

template<typename _Result >
ArraySAFunc< _Result >::ArraySAFunc ( DistributedInfos< _Result > *  data,
const CepsFunctionFlag loc 
)

Constructor with array ptr, data is NOT copied.

◆ ArraySAFunc() [4/5]

template<typename _Result >
ArraySAFunc< _Result >::ArraySAFunc ( const CepsString fileName,
const CepsString arrayName,
const CepsFunctionFlag loc,
Geometry geom 
)

Constructor with a vtk or msh file, data is copied.

Parameters
fileNamefile from where data is fetched
arrayNamename of array in the file
loclocation of data (either nodes or cells)
geomlink to a geometry (this is to perform a check: coeff readers are incompatible with multiple mesh geometries)

◆ ArraySAFunc() [5/5]

template<typename _Result >
ArraySAFunc< _Result >::ArraySAFunc ( DHVecPtr  src,
DistributedInfos< DegreeOfFreedom * > *  dofs 
)

Constructor with a DistributedHaloVector, data is COPIED from the vector into this class. It means that data will NOT change during execution. (unless a setValues method is implemented later on) The src vector must have the same structure has the dofs distributed info.

Parameters
[in]srcdata source
[in]dofsa structure of degrees of freedom (as stored in AbstractDiscretization) from which we extract dof ownership

◆ ~ArraySAFunc()

template<typename _Result >
ArraySAFunc< _Result >::~ArraySAFunc ( )

Destructor.

Member Function Documentation

◆ checkLocation()

template<typename _Result >
void ArraySAFunc< _Result >::checkLocation ( const CepsFunctionFlag loc)
protected

Determines if flag passed in constructor is valid (cells or nodes ID)

◆ eval()

template<typename _Result >
virtual _Result ArraySAFunc< _Result >::eval ( CepsStandardArgs  args)
finalvirtual

Call operator to evaluate functor.

◆ getFlags()

template<typename _Result >
CepsEnum ArraySAFunc< _Result >::getFlags ( ) const
finalvirtual

The final flag is a combination of Attribute and of the flags of the stored object type (if it has any)

Implements SAFunc< _Result >.

◆ operator=()

template<typename _Result >
ArraySAFunc& ArraySAFunc< _Result >::operator= ( const ArraySAFunc< _Result > &  )
default

We allow the assignement from a functor to another.

Field Documentation

◆ m_data

template<typename _Result >
DistributedInfos<_Result>* ArraySAFunc< _Result >::m_data
protected

Ptr to data.

Definition at line 109 of file ArraySAFunc.hpp.

◆ m_dataOwned

template<typename _Result >
CepsBool ArraySAFunc< _Result >::m_dataOwned
protected

Flag telling if data structure is created by this instance.

Definition at line 108 of file ArraySAFunc.hpp.

◆ m_location

template<typename _Result >
CepsFunctionFlag ArraySAFunc< _Result >::m_location
protected

Where the data is defined (point, cell)

Definition at line 107 of file ArraySAFunc.hpp.


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