Rodin/Variational/P1/Div.h file

Divergence operator specialization for P1 vector functions.

This file provides specialized implementations of the divergence operator for P1 vector-valued GridFunctions and ShapeFunctions.

For P1 elements, the divergence is computed as:

\[ \nabla \cdot \mathbf{u}|_K = \sum_{i=1}^{n_v} \sum_{j=1}^d u_{i,j} \frac{\partial \phi_i}{\partial x_j} \]

where $ \phi_i $ are P1 basis functions and $ u_{i,j} $ are DOF values.

On affine simplices, P1 basis gradients and the divergence are constant on each element. Curved or product cells can have varying physical derivatives.

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 Scalar, class Data, class Mesh>
struct Rodin::FormLanguage::Traits<Variational::Div<Variational::GridFunction<Variational::P1<Math::SpatialVector<Scalar>, Mesh>, Data>>>
Type traits for Div over a grid function: exposes the finite element space, the scalar type and the operand type.
template<class NestedDerived, class Scalar, class Mesh, Variational::ShapeFunctionSpaceType Space>
struct Rodin::FormLanguage::Traits<Variational::Div<Variational::ShapeFunction<NestedDerived, Variational::P1<Math::SpatialVector<Scalar>, Mesh>, Space>>>
Type traits for Div over a shape function: exposes the finite element space, the shape function space, the scalar type and the operand type.
template<class Scalar, class Data, class Mesh>
class Rodin::Variational::Div<GridFunction<P1<Math::SpatialVector<Scalar>, Mesh>, Data>>
Divergence of a P1 vector GridFunction.
template<class NestedDerived, class Scalar, class Mesh, ShapeFunctionSpaceType Space>
class Rodin::Variational::Div<ShapeFunction<NestedDerived, P1<Math::SpatialVector<Scalar>, Mesh>, Space>>
Divergence of a P1 vector ShapeFunction.
struct Rodin::Variational::Div<ShapeFunction<NestedDerived, P1<Math::SpatialVector<Scalar>, Mesh>, Space>>::Cache
Per-cell tabulation cache.
struct Rodin::Variational::Div<ShapeFunction<NestedDerived, P1<Math::SpatialVector<Scalar>, Mesh>, Space>>::Cache::CellKey
Key identifying the cell a tabulation was computed for.
struct Rodin::Variational::Div<ShapeFunction<NestedDerived, P1<Math::SpatialVector<Scalar>, Mesh>, Space>>::Cache::QuadraturePointKey
Key identifying the quadrature point a tabulation was computed for.