Rodin/Variational/P1/P1Element.hpp file

Template implementation of P1 basis functions and derivatives.

This file provides the explicit implementations of P1 basis functions and their first derivatives for each supported polytope geometry.

Basis Functions by Geometry

Point (0D): $ \phi_0 = 1 $

Segment (1D): Linear interpolation on $ [0,1] $

  • $ \phi_0(x) = 1 - x $
  • $ \phi_1(x) = x $

Triangle (2D): Barycentric coordinates on reference triangle

  • $ \phi_0(x,y) = 1 - x - y $
  • $ \phi_1(x,y) = x $
  • $ \phi_2(x,y) = y $

Quadrilateral (2D): Bilinear functions on $ [0,1]^2 $

  • $ \phi_0 = (1-x)(1-y) $
  • $ \phi_1 = x(1-y) $
  • $ \phi_2 = xy $
  • $ \phi_3 = (1-x)y $

Tetrahedron (3D): Barycentric coordinates

  • $ \phi_0 = 1 - x - y - z $
  • $ \phi_1 = x $
  • $ \phi_2 = y $
  • $ \phi_3 = z $

Wedge (3D): Product of triangle and segment basis

All derivatives are computed analytically as the partial derivatives of these basis functions.

Namespaces

namespace Rodin
The Rodin library for finite element methods and shape optimization.
namespace Rodin::Variational
Finite element spaces, fields, and variational problems.