39 template <
class _Result,
class _SupportType>
43 template <
class _SupportType>
46 template <
class _SupportType>
49 template <
class _SupportType>
78 template <
class _Result,
class _SupportType>
247 template<
class _SupportType>
258 template<
class _SupportType>
271 template<
class _SupportType>
288 template<
class _SupportType>
309 template<
class _SupportType>
314 std::function<
CepsBool(_SupportType*)>* predicate,
330 template<
class _SupportType>
335 std::function<
CepsBool(_SupportType*)>* predicate,
CepsFunctionFlag
Enum for CepsStandardArgs functions.
std::set< _Type, _Compare, _Alloc > CepsSet
C++ set.
std::vector< _Type, _Alloc > CepsVector
C++ vector.
std::make_unsigned_t< CepsInt > CepsUInt
Unsigned version on CepsInt.
float CepsReal
Need single precision floating point.
void scaleByField(DistributedVector *vec, ScalarField< _SupportType > &f, CepsReal t=0., CepsBool divide=false)
Multiplies or divides given vector by coeff value. (default behaviour)
void addFieldValuesTo(ScalarField< _SupportType > &f, DistributedVector *vec, CepsReal t=0.)
Add values to a distributed vector. Exclusive to scalar fields. Field data may be evaluated on the fl...
void setFieldValuesTo(ScalarField< _SupportType > &f, DistributedVector *vec, CepsReal t=0.)
Set values into a distributed vector. Exclusive to scalar fields.
void scaleByFieldInternal(DistributedVector *vec, ScalarField< _SupportType > &f, std::function< CepsBool(_SupportType *)> *predicate, CepsReal t, CepsBool divide, const CepsVector< _SupportType * > *domain, CepsUInt offset=0)
Multiplies or divides given vector by coeff value.
Boundary condition to manage Dirichlet, Neumann and Robin conditions.
Structure to hold spatially dependant data and distribute it between process.
A Field is an object wrapped around a SAFunc functor, defined on at least one domain.
CepsVector< _SupportType * > m_support
List of "points" where the field applies.
CepsBool isSpaceVariable() const
Knowing the behavior relating to the space variable.
const CepsVector< _SupportType * > & getSupport()
Get suppor.
CepsVector< CepsGlobalIndex > & getSupportIndices()
Get indices of support.
void addDomain(const _Domain *domain)
Add another domain of definition.
CepsBool isBuffered() const
Tells if field is bufferized.
void setFunctor(ceps::Function< _Result(CepsStandardArgs)> *functor)
Set the functor inside the object.
CepsReal m_scaleFactor
An optional scale factor.
CepsBool m_isPrecomputed
Check if values were already evaluated.
CepsVector< _Result > m_buffer
Get buffer with data evaluated.
FunctionType * m_functor
doesn't belong to this object
CepsVector< _SupportType * > _Domain
The objects on which is defined the support (GeomCell, GeomNode, DegreeOfFreedom)
CepsBool needsSolution() const
Knowing the behavior relating to the solution vector.
CepsBool m_precompute
Do we bufferize data ?
virtual void evaluateOn(const _Domain *domain, CepsReal t, CepsUInt offset, CepsVector< _Result > &results)
Precompute field data.
CepsBool isTimeVariable() const
Knowing the behavior relating to the time variable.
virtual void actualize(CepsReal t)
Precompute field data.
CepsVector< CepsGlobalIndex > m_supportIndices
List of "points" indices.
CepsVector< const CepsVector< _SupportType * > * > m_domains
Ranges on which the field is defined.
_Result getValue(_SupportType *point, CepsReal t)
Get single value for given row index. /!\ If not nullptr, the solution vector should HAVE ALREADY CAL...
CepsReal getScaleFactor() const
Get the scale factor used.
FunctionType * getFunctor() const
Get the functor inside the object.
void setScaleFactor(CepsReal scaleFactor)
Scale the result.
CepsVector< _Result > & getBufferedData()
Ref to buffered data.
void getValues(CepsVector< _Result > &values, CepsReal t, const CepsVector< _SupportType * > &points={})
Get the values for given row indices. If no support was given, simply call the functor for all dofs.
CepsBool hasFunctorOption(CepsFunctionFlag flag) const
Knowing the behavior relating to the time variable.
void computeSupport(AbstractSelector< _Iterator > *selector, CepsBool canStartEmpty=false)
Computes the support in the domains of definition, using the given selector.
virtual void evaluateAll(CepsReal t, CepsVector< _Result > &results)
Evaluate on all domain or support, put results in given vector.
CepsBool m_supportComputed
True if computeSupport has been called.
CepsBool hasBufferedData() const
Tells if field is bufferized and data has already been computed.
void clearDomains()
Removes domains and support.
CepsEnum getFunctorFlags() const
Get flags of the function.
virtual ~Field()=default
Destructor.
Field(FunctionType *functor, const _Domain *domain, CepsBool bufferize=false)
Construct a new Field object, with a vector, functor cannot be null.
typename CepsVector< _SupportType * >::const_iterator _Iterator
The objects on which is defined the support (GeomCell, GeomNode, DegreeOfFreedom)
const CepsVector< const CepsVector< _SupportType * > * > & getDomains()
Get the spans on which the field is defined.
A SAFunc is a ceps::Function that uses CepsStandardArgs as argument of call operator (),...
Source term manager to create and manage SourceTerm objects.
Structure used to pass arguments to SAFunc (see pde directory) The flags of the SAFunc allows extract...
function caller : abstract base, only contains an variadic operator()