H1.h file
H1-conforming Lagrange finite element space.
This header provides access to the H1-conforming Lagrange finite element family. These are high-order-stable elements with continuous (H¹) basis functions across element boundaries.
Mathematical Foundation
The H1-conforming Lagrange space of degree k is defined as:
where denotes polynomials of degree at most k on element .
Features
- Supports arbitrary polynomial degree k (K=0, 1, 2, 3, 4, 5, 6, ...)
- H¹-conforming (continuous across element boundaries)
- Lagrange nodal basis functions:
- Optimal convergence: in norm, in norm
- Supports all standard geometries: Segment, Triangle, Quadrilateral, Tetrahedron, Wedge
- High-order-stable implementation
Degree of Freedom (DOF) Formulas
- Segment:
- Triangle:
- Quadrilateral:
- Tetrahedron:
- Wedge:
Usage Example
// H1 element of degree 2 (quadratic) RealH1Element<2> h1_2(Polytope::Type::Triangle); std::cout << "DOFs: " << h1_2.getCount() << std::endl; // 6 // H1 element of degree 3 (cubic) RealH1Element<3> h1_3(Polytope::Type::Segment); auto basis = h1_3.getBasis(0); auto value = basis(Math::Vector<Real>{{0.5}}); // Complex-valued H1 element of degree 4 ComplexH1Element<4> h1_c(Polytope::Type::Quadrilateral); // Vector-valued H1 element for elasticity VectorH1Element<2> h1_v(Polytope::Type::Tetrahedron, 3); // H1 finite element space of degree 2 H1<2> Vh(mesh); TrialFunction u(Vh); TestFunction v(Vh);