inla.mesh.lattice.RdConstruct 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))
## Use the lattice "as-is", without refinement:
mesh = inla.mesh.create(lattice=lattice, boundary=lattice$segm)
#> Error in inla.has_PROJ6(): inla.require("rgdal") is not TRUE
mesh = inla.mesh.create(lattice=lattice, extend=FALSE)
#> Error in inla.has_PROJ6(): inla.require("rgdal") is not TRUE
plot(mesh)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'plot': object 'mesh' not found
## Refine the triangulation, with limits on triangle angles and edges:
mesh = inla.mesh.create(lattice=lattice,
refine=list(max.edge=0.08),
extend=FALSE)
#> Error in inla.has_PROJ6(): inla.require("rgdal") is not TRUE
plot(mesh)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'plot': object 'mesh' not found
## 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)
#> Error in inla.has_PROJ6(): inla.require("rgdal") is not TRUE
plot(mesh)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'plot': object 'mesh' not found
## Only add extension:
mesh = inla.mesh.create(lattice=lattice, refine=list(max.edge=0.08))
#> Warning: error in running command
#> Error in fmesher.read(prefix, "manifold"): File '/tmp/Rtmp4ztB6d/fmesher53bd22475046.manifold' does not exist.
plot(mesh)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'plot': object 'mesh' not found