AnalyticFunctionAdapters.h file
Lightweight FunctionBase adapters for analytic vector- and matrix-valued functions defined by a single callable.
Rodin::Variational::RealFunction(F) already wraps a scalar callable with signature (const Geometry::Point&) -> Real. The stock VectorFunction and MatrixFunction only accept either a constant value or a component-wise variadic list of scalar callables. For analytic level sets the natural shape is a SINGLE callable returning the whole vector or matrix; this header adds the missing adapters.
Usage:
Adaptation::AnalyticVectorFunction grad( [&](const Geometry::Point& p) -> Math::SpatialVector<Real> { const auto& c = p.getPhysicalCoordinates(); return analyticLevelSet.grad(c); });
Adaptation::AnalyticMatrixFunction hess( [&](const Geometry::Point& p) -> Math::SpatialMatrix<Real> { const auto& c = p.getPhysicalCoordinates(); return analyticLevelSet.hess(c); });
Namespaces
- namespace Rodin
- The Rodin library for finite element methods and shape optimization.
- namespace Rodin::Adaptation
- Namespace Rodin::
Tests:: Benchmarks.
Classes
-
template<class F>class Rodin::Adaptation::AnalyticVectorFunction
- Vector-valued
FunctionBaseadapter built from a single callable of signature(const Geometry::Point&) -> Math::SpatialVector<Real>. -
template<class F>class Rodin::Adaptation::AnalyticMatrixFunction
- Matrix-valued
FunctionBaseadapter built from a single callable of signature(const Geometry::Point&) -> Math::SpatialMatrix<Real>.