template<class Scalar>
Rodin::Variational::P1Element class

Degree 1 Lagrange element.

Template parameters
Scalar Type of scalar range (e.g., Real, Complex)

Continuous piecewise linear (degree 1) scalar Lagrange element.

The P1Element provides a first-order finite element with:

  • DOF count: One per vertex ( $ n_v $ total)
  • Basis functions: Linear functions satisfying $ \phi_i(x_j) = \delta_{ij} $
  • Gradient: Constant on each element, $ \nabla \phi_i|_K = \text{const} $
  • Continuity: Global C⁰ continuity across element interfaces

P1 elements provide first-order convergence and are the standard choice for elliptic PDEs like Poisson's equation $ -\Delta u = f $ .

Base classes

template<class Derived>
class FiniteElementBase<P1Element<Scalar>>
Base class for finite elements.

Public types

class BasisFunction
Represents a piecewise linear basis function of a P1 scalar element.
class LinearForm
Represents a linear form of a P1 scalar element.
using Parent = FiniteElementBase<P1Element<Scalar>>
Parent class.
using RangeType = ScalarType
Type of range.

Public functions

auto getCount() const -> size_t constexpr
Gets the number of degrees of freedom in the finite element.

Function documentation

template<class Scalar>
size_t Rodin::Variational::P1Element<Scalar>::getCount() const constexpr

Gets the number of degrees of freedom in the finite element.

Returns Number of degrees of freedom