template<class Derived>
FunctionBase class
Base class for function objects which can be evaluated over a mesh.
Template parameters | |
---|---|
Derived | Derived class following CRTP (Curiously Recurring Template Pattern) |
Base class for functions defined on finite element meshes.
Instances of FunctionBase will always have the getValue() method defined, which enables the evaluation of any function on some mesh element.
FunctionBase provides the foundation for representing mathematical functions defined over geometric domains discretized by finite element meshes. This includes both analytical functions and discrete finite element functions (grid functions) that arise in variational formulations.
Mathematical Foundation
A function maps points in the domain to values in . In finite element analysis, functions serve various roles:
- Analytical functions: Exact solutions, boundary conditions, source terms
- Discrete functions: Finite element approximations
- Test/Trial functions: Basis functions spanning finite element spaces
Key Features
- Domain support: Functions can be restricted to subdomains or boundaries
- Trace operations: Support for function traces on mesh boundaries
- Point evaluation: Evaluation at arbitrary points within the domain
- Polymorphic design: CRTP enables compile-time polymorphism for efficiency
Base classes
- class Base
- Base class for all objects in Rodin's FormLanguage system.
Derived classes
-
template<class Derived>class BooleanFunctionBase
- Base class for objects representing boolean functions.
-
template<class Derived>class BooleanFunctionBase
- Base class for objects representing boolean functions.
-
template<class Derived>class BooleanFunctionBase
- Base class for objects representing boolean functions.
-
template<class Derived>class BooleanFunctionBase
- Base class for objects representing boolean functions.
-
template<class Derived>class BooleanFunctionBase
- Base class for objects representing boolean functions.
-
template<class Derived>class BooleanFunctionBase
- Base class for objects representing boolean functions.
-
template<class Derived>class BooleanFunctionBase
- Base class for objects representing boolean functions.
-
template<class StrictType>class GridFunctionBaseReference
- Base class for discrete finite element functions.
-
template<class StrictType>class GridFunctionBaseReference
- Base class for discrete finite element functions.
-
template<class StrictType>class GridFunctionBaseReference
- Base class for discrete finite element functions.
-
template<class Scalar, class Derived>class MatrixFunctionBase
- Base class for matrix-valued functions defined on a mesh.
-
template<class Scalar, class Derived>class MatrixFunctionBase
- Base class for matrix-valued functions defined on a mesh.
-
template<class Scalar, class Derived>class MatrixFunctionBase
- Base class for matrix-valued functions defined on a mesh.
-
template<class Scalar, class Derived>class VectorFunctionBase
- Base class for vector-valued functions defined on a mesh.
-
template<class Scalar, class Derived>class VectorFunctionBase
- Base class for vector-valued functions defined on a mesh.
-
template<class Scalar, class Derived>class VectorFunctionBase
- Base class for vector-valued functions defined on a mesh.
-
template<class Scalar, class Derived>class VectorFunctionBase
- Base class for vector-valued functions defined on a mesh.
-
template<class Scalar, class Derived>class VectorFunctionBase
- Base class for vector-valued functions defined on a mesh.
-
template<class Scalar, class Derived>class VectorFunctionBase
- Base class for vector-valued functions defined on a mesh.
-
template<class Scalar, class Derived>class VectorFunctionBase
- Base class for vector-valued functions defined on a mesh.
-
template<>class TraceOperator<FunctionBase>
- Trace operator.
Public types
-
using Parent = FormLanguage::
Base - Parent class type.
-
using TraceDomain = FlatSet<Geometry::
Attribute> - Domain type for trace operations (set of mesh attributes)
Constructors, destructors, conversion operators
- FunctionBase() defaulted
- Default constructor.
- FunctionBase(const FunctionBase& other)
- Copy constructor.
- FunctionBase(FunctionBase&& other)
- Move constructor.
- ~FunctionBase() defaulted virtual
- Virtual destructor.
Public functions
-
auto operator()(const Geometry::
Point& p) const -> decltype(auto) constexpr - Evaluates the function on a Point belonging to the mesh.
-
auto traceOf(const Geometry::
Attribute& attr) -> Derived& constexpr - Sets an attribute which will be interpreted as the domain to trace.
- auto getTraceDomain() const -> const TraceDomain& constexpr
- Gets the set of attributes which will be interpreted as the domains to "trace".
-
auto getValue(const Geometry::
Point& p) const -> decltype(auto) constexpr - Evaluates the function on a Point belonging to the mesh.
- auto copy() const -> FunctionBase* override noexcept
- Copies the object and returns a non-owning pointer to the copied object.
Function documentation
template<class Derived>
decltype(auto) Rodin:: Variational:: FunctionBase<Derived>:: operator()(const Geometry:: Point& p) const constexpr
Evaluates the function on a Point belonging to the mesh.
This calls the function get getValue(const Geometry::Point&).
template<class Derived>
Derived& Rodin:: Variational:: FunctionBase<Derived>:: traceOf(const Geometry:: Attribute& attr) constexpr
Sets an attribute which will be interpreted as the domain to trace.
Returns | Reference to self (for method chaining) |
---|
Convenience function to call traceOf(FlatSet<int>) with only one attribute.
template<class Derived>
const TraceDomain& Rodin:: Variational:: FunctionBase<Derived>:: getTraceDomain() const constexpr
Gets the set of attributes which will be interpreted as the domains to "trace".
The domains to trace are interpreted as the domains where there shall be a continuous extension from values to the interior boundaries. If the trace domain is empty, then this has the semantic value that it has not been specified yet.
template<class Derived>
decltype(auto) Rodin:: Variational:: FunctionBase<Derived>:: getValue(const Geometry:: Point& p) const constexpr
Evaluates the function on a Point belonging to the mesh.
template<class Derived>
FunctionBase* Rodin:: Variational:: FunctionBase<Derived>:: copy() const override noexcept
Copies the object and returns a non-owning pointer to the copied object.
Returns | Non-owning pointer to the copied object. |
---|