Skip to content
Projects

Cell space

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

cell_body

functionsource

A body made of the leaf cells mask selects, with its surface on their faces.

fraction
θ=houthout+hin(the surface on the shared face)\theta = \frac{h_\mathrm{out}}{h_\mathrm{out} + h_\mathrm{in}} \quad \text{(the surface on the shared face)}
Assumes
  • a body given by a mask of leaf cells, fixed or floating

CompositeCells

classsource

The leaf cells of a hierarchy, their faces and the maps to its patches.

leaf cells
leaf=cells of a patch that no finer patch covers,span=rLmax−L lattice cells\text{leaf} = \text{cells of a patch that no finer patch covers}, \qquad \text{span} = r^{L_\mathrm{max} - L} \text{ lattice cells}
volumes
Vi=Δx Δy (plane),Vi=2πrc Δr Δz (r–z)V_i = \Delta x\,\Delta y \ \text{(plane)}, \qquad V_i = 2\pi r_c\,\Delta r\,\Delta z \ \text{(}r\text{–}z\text{)}
face areas
Af=t1−t0 (plane),Ar=2πrf(z1−z0),Az=π(r12−r02) (r–z)A_f = t_1 - t_0 \ \text{(plane)}, \qquad A_{r} = 2\pi r_f (z_1 - z_0), \quad A_{z} = \pi (r_1^2 - r_0^2) \ \text{(}r\text{–}z\text{)}
Assumes
  • a face is a run of finest-lattice faces between one pair of leaf cells
  • in 1D a face is a point of area 1
Built from