P1.h file
Piecewise linear (P1) finite element space.
This header aggregates all functionality related to the P1 finite element space, which consists of continuous piecewise linear functions over mesh elements. P1 is the most commonly used conforming finite element space.
Mathematical Foundation
The P1 space is defined as:
where denotes linear polynomials on element .
Features
- One degree of freedom per mesh vertex (nodal values)
- Continuous across element boundaries ( conforming)
- Gradient is constant within each element
- Optimal convergence: in norm for smooth solutions
- Basis functions: Lagrange nodal basis
Usage Example
P1 Vh(mesh); // Define P1 space TrialFunction u(Vh); // P1 trial function TestFunction v(Vh); // P1 test function // Poisson problem: -Δu = f Problem problem(u, v); problem = Integral(Grad(u), Grad(v)) - Integral(f, v);
Supported Operations
- Gradient (Grad)
- Divergence (Div) for vector-valued functions
- Jacobian transformations
- Potential recovery
- Linear elasticity specializations