template<class F>
Rodin::Variational::MatrixFunction class

Callable matrix coefficient with explicit row and column extents.

Base classes

template<class Scalar, class Derived>
class MatrixFunctionBase<FormLanguage::Traits<std::invoke_result_t<F, const Geometry::Point&>>::ScalarType, MatrixFunction<F>>
Base class for matrix-valued functions defined on a mesh.

Public types

using ScalarType = typename FormLanguage::Traits<std::invoke_result_t<F, const Geometry::Point&>>::ScalarType
Scalar type of matrix or tensor entries.
using RangeType = Math::SpatialMatrix<ScalarType>
Evaluated matrix, tensor, or scalar range type.
using Parent = MatrixFunctionBase<ScalarType, MatrixFunction>
CRTP or finite element base class.

Constructors, destructors, conversion operators

MatrixFunction(size_t rows, size_t columns, F function)
Constructs a constant or callable matrix coefficient, or copies its value.
MatrixFunction(const MatrixFunction& other)
Constructs a constant or callable matrix coefficient, or copies its value.
MatrixFunction(MatrixFunction&& other)
Constructs a constant or callable matrix coefficient, or copies its value.

Public functions

auto getValue(const Geometry::Point& point) const -> RangeType
Evaluates the expression at the supplied physical or integration point.
auto getValue(const IntegrationPoint& point) const -> RangeType
Evaluates the expression at the supplied physical or integration point.
auto getRows() const -> size_t
Returns the number of matrix rows.
auto getColumns() const -> size_t
Returns the number of matrix columns.
auto setOrder(size_t order) -> MatrixFunction&
Declares polynomial order for coefficient quadrature selection.
auto getOrder(const Geometry::Polytope& polytope) const -> Optional<size_t> noexcept
Returns the polynomial order when it is known.
auto copy() const -> MatrixFunction* override noexcept
Creates a polymorphic copy of the function.

Function documentation

template<class F>
Rodin::Variational::MatrixFunction<F>::MatrixFunction(size_t rows, size_t columns, F function)

Constructs a constant or callable matrix coefficient, or copies its value.

Parameters
rows Number of rows.
columns Number of matrix columns.
function Function to evaluate.

template<class F>
Rodin::Variational::MatrixFunction<F>::MatrixFunction(const MatrixFunction& other)

Constructs a constant or callable matrix coefficient, or copies its value.

Parameters
other Object to copy from.

template<class F>
Rodin::Variational::MatrixFunction<F>::MatrixFunction(MatrixFunction&& other)

Constructs a constant or callable matrix coefficient, or copies its value.

Parameters
other Object to move from.

template<class F>
RangeType Rodin::Variational::MatrixFunction<F>::getValue(const Geometry::Point& point) const

Evaluates the expression at the supplied physical or integration point.

Parameters
point Point at which the operation is evaluated.
Returns Value of the expression at the supplied evaluation point.

template<class F>
RangeType Rodin::Variational::MatrixFunction<F>::getValue(const IntegrationPoint& point) const

Evaluates the expression at the supplied physical or integration point.

Parameters
point Point at which the operation is evaluated.
Returns Value of the expression at the supplied evaluation point.

template<class F>
size_t Rodin::Variational::MatrixFunction<F>::getRows() const

Returns the number of matrix rows.

Returns The number of matrix rows.

template<class F>
size_t Rodin::Variational::MatrixFunction<F>::getColumns() const

Returns the number of matrix columns.

Returns The number of matrix columns.

template<class F>
MatrixFunction& Rodin::Variational::MatrixFunction<F>::setOrder(size_t order)

Declares polynomial order for coefficient quadrature selection.

Parameters
order Polynomial order.
Returns Reference to this object after the operation.

template<class F>
Optional<size_t> Rodin::Variational::MatrixFunction<F>::getOrder(const Geometry::Polytope& polytope) const noexcept

Returns the polynomial order when it is known.

Parameters
polytope Mesh entity; the reported order is independent of this argument.
Returns Polynomial order on the entity, or an empty optional when no order is available.

template<class F>
MatrixFunction* Rodin::Variational::MatrixFunction<F>::copy() const override noexcept

Creates a polymorphic copy of the function.

Returns Pointer to newly allocated copy