Skip to content
Projects

Face space

The equations of patchwork.spaces.faces, declared on the code that implements them and checked by the tests.

CompositeFaces

classsource

The faces of the leaf cells of a 2D or 3D hierarchy, and the operators on them.

divergence
(Df)K=∑a(fK,a,upper−fK,a,lower)(D f)_K = \sum_{a} \big(f_{K, a, \mathrm{upper}} - f_{K, a, \mathrm{lower}}\big)
curl
(Ce)F=eb(at lower c)+ec(at upper b)−eb(at upper c)−ec(at lower b),(a,b,c) cyclic(C e)_F = e_{b}(\text{at lower } c) + e_{c}(\text{at upper } b) - e_{b}(\text{at upper } c) - e_{c}(\text{at lower } b), \quad (a, b, c) \text{ cyclic}
hanging faces
(T2f)g=(sgsF)d−1fFfor a fine face g of span sg in a coarse face F(T_2 f)_g = \Big(\frac{s_g}{s_F}\Big)^{d-1} f_F \quad \text{for a fine face } g \text{ of span } s_g \text{ in a coarse face } F
exact
C G=0,D C=0,C T1=T2 C T1C\,G = 0, \qquad D\,C = 0, \qquad C\,T_1 = T_2\,C\,T_1
whitney
Ba=(1−ξa) flower+ξa fupper∏i≠ahiB_a = \frac{(1 - \xi_a)\, f_\mathrm{lower} + \xi_a\, f_\mathrm{upper}}{\prod_{i \ne a} h_i}
Assumes
  • 2D and 3D Cartesian; faces addressed on the finest lattice like the edges
  • a coarse face and the fine faces that tile it are different faces; the fine ones hang
  • cells are the leaf cells of CompositeNodes, in the order of its cell_corners
References
Built from

mass

functionsource

The face mass matrix M2: f^T M2 f is the integral of |B|^2.

energy
f⊤M2f=∫∣B∣2 dVf^\top M_2 f = \int |\mathbf{B}|^2\, dV
lumped
Mgg=∑K∋gh⊥2 ∣g∣M_{gg} = \sum_{K \ni g} \frac{h_\perp}{2\, |g|}
Assumes
  • lumped: the vertex quadrature along the normal, diagonal
  • consistent: the exact integral of the linear normal profiles
  • for a field on hanging faces use T2⊤M2T2T_2^\top M_2 T_2
Built from