inla.mesh.lattice.Rd since
23.08.18.
Use fmesher::fm_lattice_2d() instead.
Construct a lattice grid for inla.mesh()
An inla.mesh.lattice object.
lattice <- inla.mesh.lattice(seq(0, 1, length.out = 17), seq(0, 1, length.out = 10))
#> Warning: `inla.mesh.lattice()` was deprecated in INLA 23.08.18.
#> ℹ Please use `fmesher::fm_lattice_2d()` instead.
#> ℹ For more information, see
#> https://inlabru-org.github.io/fmesher/articles/inla_conversion.html
#> ℹ To silence these deprecation messages in old legacy code, set
#> `inla.setOption(fmesher.evolution.warn = FALSE)`.
#> ℹ To ensure visibility of these messages in package tests, also set
#> `inla.setOption(fmesher.evolution.verbosity = 'warn')`.
## Use the lattice "as-is", without refinement:
mesh <- inla.mesh.create(lattice = lattice, boundary = lattice$segm)
mesh <- inla.mesh.create(lattice = lattice, extend = FALSE)
plot(mesh)
## Refine the triangulation, with limits on triangle angles and edges:
mesh <- inla.mesh.create(
lattice = lattice,
refine = list(max.edge = 0.08),
extend = FALSE
)
plot(mesh)
## Add an extension around the lattice, but maintain the lattice edges:
mesh <- inla.mesh.create(
lattice = lattice,
refine = list(max.edge = 0.08),
interior = lattice$segm
)
plot(mesh)
## Only add extension:
mesh <- inla.mesh.create(lattice = lattice, refine = list(max.edge = 0.08))
plot(mesh)