Traits.h file
Type traits system for form language objects.
This file defines the Traits template, which provides a uniform interface for querying type information and properties of form language objects. Specialized versions of Traits are defined throughout the library for specific form language types.
Design Pattern
The Traits system follows the trait-based design pattern common in C++ template metaprogramming. Each form language type can specialize the Traits template to expose:
- Associated types (e.g., scalar type, function space type)
- Compile-time properties (e.g., space type, dimension)
- Type transformations
Usage
// Query traits of a form language object using MyFES = typename Traits<MyFormObject>::FESType; constexpr auto space = Traits<MyFormObject>::SpaceType;
Namespaces
- namespace Rodin
- The Rodin library for finite element methods and shape optimization.
- namespace Rodin::FormLanguage
- Typed expressions for constructing variational forms.
Classes
-
template<class T>struct Rodin::FormLanguage::FunctionDerived
- Derived type
Dof the Variational::FunctionBase<D> thatTinherits from. -
template<class T>struct Rodin::FormLanguage::IsNamedForm
- Type trait: whether
Tis a named bilinear form.