Halos and restriction
The equations of patchwork.mesh.halos, declared on the code that implements them and checked by the tests.
_key
functionsourceA patch as its level, box and ranks: the same in the hierarchies a regrid makes.
- same level
- position
- bilinear
- Order
- 2
- Assumes
- coarse points on no patch are dropped and the weights renormalised; next to a non-periodic wall the stencil is clipped to the two inside points (linear extrapolation)
- halo points outside the domain are left to the boundary conditions
- then mpiarray's
update_haloswithin a patch; oneAlltoallvper execution - the order is that of the interpolated halo values of a smooth field, maximum norm
conservative_from_below
functionsourceConservative interpolation of the level below at cells index of patch.
- fill
- slope
- radial shift
- mean
- Assumes
- cell-centered fields; the volume-weighted mean of the fine cells of a coarse cell is its value
- no new extrema (a positive density stays positive); a linear field is reproduced away from walls
- References
- van Leer, J. Comput. Phys. 23, 276 (1977)90095-X): the monotonized central limiter
Restriction
classsourceGive the coarse points under finer patches the fine values of field name.
- cells
- nodes
- Assumes
- finest level first, or one level; volume-weighted in , a plain mean in the plane
- only the points of each rank's block are written