warp.fem.hanging_node_prolongation#
- warp.fem.hanging_node_prolongation(raw_basis)[source]#
Return the prolongation that eliminates the hanging nodes of a continuous Lagrange basis.
The geometry describes which sides cover each cell facet through
Geometry.side_facet_incidence(), asAdaptiveNanogriddoes. A side that covers a whole facet of one neighbor but only part of a facet of the other is a coarse-to-fine interface. Each node of the finer cell on such a side takes the value of the coarser cell’s interpolant at that node; chains of such constraints across several levels are resolved. Other raw nodes are independent. Passing the result tomake_constrained_basis_space()gives the same space asmake_conforming_basis_space().The basis must be interpolatory: each function is one at its own node and zero at the others, as for Lagrange polynomials of any degree. Nothing else depends on the element type.
- Parameters:
raw_basis (BasisSpace) – Continuous scalar interpolatory basis on a static geometry that implements
Geometry.side_facet_incidence().- Returns:
A compact BSR matrix with scalar blocks of the geometry scalar type, one row per node of
raw_basisand one column per independent node. Independent nodes are numbered in increasing raw node order, and each has a unit row.- Raises:
NotImplementedError – If
raw_basisis not a continuous, scalar and interpolatory basis, or if its geometry does not implementGeometry.side_facet_incidence().ValueError – If the interpolation from a coarser cell is invalid, which happens when the geometry’s sides do not cover cell facets, or if constraints are inconsistent or cyclic.
- Return type: