Trace.h file
Matrix trace operator for matrix-valued functions.
This file defines the Trace class, which computes the trace (sum of diagonal elements) of matrix-valued functions in variational formulations.
Mathematical Foundation
For a square matrix , the trace is:
Properties
The trace operator satisfies:
- Linearity:
- Scalar multiplication:
- Cyclic property:
- Transpose invariance:
Applications
- Linear elasticity: (volumetric strain)
- Continuum mechanics: invariants of stress/strain tensors
- Fluid dynamics: divergence from velocity gradient
- General tensor operations
Usage Example
// Volumetric strain in linear elasticity auto strain = 0.5 * (Jacobian(u) + Transpose(Jacobian(u))); auto volumetric_strain = Trace(strain); // tr(ε)
Namespaces
- namespace Rodin
- The Rodin library for finite element methods and shape optimization.
- namespace Rodin::FormLanguage
- Typed expressions for constructing variational forms.
- namespace Rodin::Variational
- Finite element spaces, fields, and variational problems.
Classes
-
template<class NestedDerived, class FES, Variational::struct Rodin::FormLanguage::Traits<Variational::Trace<Variational::ShapeFunctionBase<NestedDerived, FES, Space>>>
ShapeFunctionSpaceType Space> - Type traits for
Traceover a shape function: exposes the finite element space and the shape function space. -
template<class NestedDerived>class Rodin::Variational::Trace<FunctionBase<NestedDerived>>
- Trace of a FunctionBase instance.
-
template<class NestedDerived, class FES, ShapeFunctionSpaceType Space>class Rodin::Variational::Trace<ShapeFunctionBase<NestedDerived, FES, Space>>
- Trace of a shape function.