Coarsening

RegularCoarsening

Meshes.RegularCoarseningType
RegularCoarsening(f₁, f₂, ..., fₙ)

Coarsen each dimension of the grid by given factors f₁, f₂, ..., fₙ.

Examples

coarsen(grid2D, RegularCoarsening(2, 3))
coarsen(grid3D, RegularCoarsening(2, 3, 1))
source
grid = CartesianGrid(100, 100)

# refine three times
cor1 = coarsen(grid, RegularCoarsening(2, 2))
cor2 = coarsen(cor1, RegularCoarsening(3, 2))
cor3 = coarsen(cor2, RegularCoarsening(2, 3))

fig = Mke.Figure(size = (800, 800))
viz(fig[1,1], grid, showsegments = true)
viz(fig[1,2], cor1, showsegments = true)
viz(fig[2,1], cor2, showsegments = true)
viz(fig[2,2], cor3, showsegments = true)
fig
Example block output