38 m_isTimeDependant(
false)
53 m_isTimeDependant(
false)
107 res.reserve(us.size());
137 res.push_back(
m_fctTensors.at(u->getIdentifier())->operator()(args));
142 res.push_back(
m_fctScalars.at(u->getIdentifier())->operator()(args)*
id);
147 "Tensor for unknown " << std::quoted(u->getName()) <<
" was not set." << std::endl <<
148 " Use setKForUnknown(...) before assembly."
173 for (
CepsUInt i=0; i<us.size(); i++)
174 if (us[i]->isSpatial())
175 m_bMat[i][i] += gradPhi.transpose() * tensors[i] * gradPhi;
@ ZeroD
Data is defined once.
#define CEPS_ABORT(message)
Stops the execution with a message. If testing is enabled, only throws a runtime_error.
Eigen::Matrix< CepsScalar, Eigen::Dynamic, 1 > CepsMathDynamic1D
Dynamic 1D array, eigen format.
CepsIndex CepsUnknownIndex
For unknowns.
CepsScalar CepsMathScalar
Real numbers.
std::set< _Type, _Compare, _Alloc > CepsSet
C++ set.
Eigen::Matrix< CepsScalar, 3, 3 > CepsMathTensor
Tensor, eigen format.
std::vector< _Type, _Alloc > CepsVector
C++ vector.
std::make_unsigned_t< CepsInt > CepsUInt
Unsigned version on CepsInt.
float CepsReal
Need single precision floating point.
CepsArray3< CepsReal > CepsReal3D
Three real scalars, used like this for compatibility in polynomials.
Eigen::Matrix< CepsScalar, Eigen::Dynamic, Eigen::Dynamic > CepsMathDynamic2D
Dynamic 2D array, eigen format.
AbstractPdeProblem * m_problem
Direct link to problem, you may write getXXXProblem methods in derived classes that return the right ...
const CepsVector< Unknown * > & getUnknowns() const
List of unknowns of the pb.
A base class made for Finite Element assembler.
virtual void setupBlocksOnElementForUnknowns(FEBase *elem, const CepsVector< Unknown * > &unknowns)
Get all the dofs on an element related to the given unknowns. This routine MUST be called before addB...
CepsVector< Unknown * > extractUnknownsFrom(const CepsVector< Unknown * > &us, FEBase *elem) const
From a vector of unknowns, get the ones defined on that element.
CepsVector< CepsVector< CepsMathDynamic2D > > m_bMat
Block submatrices. The first two vectors account for unknowns: if assembly on element if for unknowns...
Abstract class for finite elements.
void computeBlocksOnElementAtQuadPoint(FEBase *element, CepsReal3D xQ, CepsReal t, const CepsMathDynamic1D &phi, const CepsMathDynamic2D &gradPhi) override
The function that is called to get the coefficients of the submatrix on a given finite element....
CepsMap< CepsUnknownIndex, CepsMathTensor > m_cstTensors
Diffusion coefficient.
CepsMap< CepsUnknownIndex, CepsMathScalar > m_cstScalars
Diffusion coefficient.
CepsBool m_isTimeDependant
Enforce time dependencie.
CepsBool isChangingBetweenTimes(CepsReal t1, CepsReal t2) const override
Tells if this assembler changes between the two times.
CepsMap< CepsUnknownIndex, SAFunc< CepsMathScalar > * > m_fctScalars
Diffusion coefficient.
virtual ~FEDivKGradAssembler()
Destructor.
CepsMap< CepsUnknownIndex, SAFunc< CepsMathTensor > * > m_fctTensors
Diffusion coefficient.
FEDivKGradAssembler()
Default constructor (for virtual inheritance)
CepsVector< CepsMathTensor > getDiffusionTensorsForUnknowns(const CepsVector< Unknown * > &us, FEBase *elem, CepsReal3D x, CepsReal t) const
Returns tensors with the correct k tensor type. To be defined in child classes.
void setKForUnknown(Unknown *u, CepsMathScalar k)
Register the diffusion coefficient (x,t,...) for given unknown.
Holds all finite elements corresponding to each geometrical element.
A SAFunc is a ceps::Function that uses CepsStandardArgs as argument of call operator (),...
CepsBool hasOption(CepsFunctionFlag flag)
Tells if option is activated.
A class used to defined an unknown of a PDE problem The unknown can be defined on a specific region,...
CepsUnknownIndex getIdentifier() const
Get the identifier of the unknown.
CepsSet< CepsAttribute > & getAttributes()
Returns the attributes of the entity.
_GeomObject * getGeomObject() const
Get the geom object.
const CepsGlobalIndex & getGlobalIndex() const
Get the index
Structure used to pass arguments to SAFunc (see pde directory) The flags of the SAFunc allows extract...
CepsSet< CepsAttribute > attr
attributes
CepsCellGlobalIndex cellId
cell index