P0.h file
Piecewise constant (P0) finite element space.
This header aggregates all functionality related to the P0 finite element space, which consists of piecewise constant functions over mesh elements.
Mathematical Foundation
The P0 space is defined as:
where denotes constant functions on element .
Features
- One degree of freedom per element (at element center)
- Discontinuous across element boundaries
- Suitable for DG methods and element-wise constant approximations
- Gradient of P0 functions is zero within each element
Usage Example
P0 Vh(mesh); // Define P0 space GridFunction<P0> u(Vh); // P0 grid function