lattice <- fm_lattice_2d(
seq(0, 1, length.out = 17),
seq(0, 1, length.out = 10)
)
## Use the lattice "as-is", without refinement:
mesh <- fm_rcdt_2d_inla(lattice = lattice, boundary = lattice$segm)
mesh <- fm_rcdt_2d_inla(lattice = lattice, extend = FALSE)
## Refine the triangulation, with limits on triangle angles and edges:
mesh <- fm_rcdt_2d(
lattice = lattice,
refine = list(max.edge = 0.08),
extend = FALSE
)
## Add an extension around the lattice, but maintain the lattice edges:
mesh <- fm_rcdt_2d(
lattice = lattice,
refine = list(max.edge = 0.08),
interior = lattice$segm
)
## Only add extension:
mesh <- fm_rcdt_2d(lattice = lattice, refine = list(max.edge = 0.08))
Run the code above in your browser using DataLab