14 #ifndef _TENSOR_FUNCTION_H
15 #define _TENSOR_FUNCTION_H
40 virtual unsigned char getType()
const {
return 3; }
73 size_t index(
size_t nsd,
size_t i,
size_t j)
const;
88 virtual unsigned char getType()
const {
return 3; }
General functions with arbitrary argument and value type.
#define Real
The floating point type to use.
Definition: ImmersedBoundaries.h:18
Representation of second-order tensors with some basic operations.
Base class for unary spatial functions of arbitrary result type.
Definition: Function.h:147
size_t ncmp
Number of components in the return value.
Definition: Function.h:184
Symmetric tensor-valued unary function of a spatial point.
Definition: TensorFunction.h:71
virtual unsigned char getType() const
Returns the function type flag.
Definition: TensorFunction.h:88
virtual std::vector< Real > getValue(const Vec3 &X) const
Returns the function value as an array.
Definition: TensorFunction.h:91
STensorFunc(size_t n=0, bool with33=false)
The constructor is protected to allow sub-class instances only.
Definition: TensorFunction.h:77
utl::matrix3d< Real > gradient(const Vec3 &X) const
Evaluates first derivatives of the function.
Definition: TensorFunction.C:58
size_t index(size_t nsd, size_t i, size_t j) const
Returns the flat indices of the symmetric tensor.
Definition: TensorFunction.C:44
SymmTensor timeDerivative(const Vec3 &X) const
Evaluates time derivatives of the function.
Definition: TensorFunction.C:91
virtual ~STensorFunc()
Empty destructor.
Definition: TensorFunction.h:85
utl::matrix4d< Real > hessian(const Vec3 &X) const
Evaluates second derivatives of the function.
Definition: TensorFunction.C:73
virtual Real getScalarValue(const Vec3 &X) const
Returns a representative scalar equivalent of the function value.
Definition: TensorFunction.h:97
Simple class for representing a symmetric second-order tensor.
Definition: Tensor.h:183
Tensor-valued unary function of a spatial point.
Definition: TensorFunction.h:27
virtual ~TensorFunc()
Empty destructor.
Definition: TensorFunction.h:37
virtual std::vector< Real > getValue(const Vec3 &X) const
Returns the function value as an array.
Definition: TensorFunction.h:43
TensorFunc(size_t n=0)
The constructor is protected to allow sub-class instances only.
Definition: TensorFunction.h:30
utl::matrix4d< Real > hessian(const Vec3 &X) const
Evaluates second derivatives of the function.
Definition: TensorFunction.C:26
virtual unsigned char getType() const
Returns the function type flag.
Definition: TensorFunction.h:40
Tensor timeDerivative(const Vec3 &X) const
Evaluates time derivatives of the function.
Definition: TensorFunction.C:35
utl::matrix3d< Real > gradient(const Vec3 &X) const
Evaluates first derivatives of the function.
Definition: TensorFunction.C:17
virtual Real getScalarValue(const Vec3 &X) const
Returns a representative scalar equivalent of the function value.
Definition: TensorFunction.h:49
Simple class for representing a non-symmetric second-order tensor.
Definition: Tensor.h:28
size_t size() const
Returns the size of this tensor.
Definition: Tensor.h:124
Simple class for representing a point in 3D space.
Definition: Vec3.h:27
virtual Result evaluate(const Arg &x) const =0
Evaluates the function for the argument x.
Base class for unary spatial function of arbitrary result type.
Definition: Function.h:98
SpatialFunction(const Tensor &val)
The constructor is protected to allow sub-class instances only.
Definition: Function.h:101
Tensor zero
Return value for default implementations of derivatives.
Definition: Function.h:117
Simple template classes for dense multi-dimensional matrices.
General utility classes and functions.
Definition: SIMoptions.h:22