Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 610 Bytes

coarsening.md

File metadata and controls

33 lines (26 loc) · 610 Bytes

Coarsening

using Meshes # hide
import CairoMakie as Mke # hide
coarsen
CoarseningMethod

RegularCoarsening

RegularCoarsening
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