make_mesh: Make an R-INLA mesh based off a grid

View source: R/sim_dist_spde.R

make_meshR Documentation

Make an R-INLA mesh based off a grid

Description

This will make a mesh based off a given grid. Ideally the mesh construction and validation should be done by hand, but this exists for convenience. Meshes are used for sim_ays_covar_spde. The defaults are designed for the default grid. Just a basic interface between the grid and inla.mesh.2d.

Usage

make_mesh(
  grid = make_grid(),
  max.edge = 50,
  bound.outer = 150,
  cutoff = 10,
  offset = c(max.edge, bound.outer),
  ...
)

Arguments

grid

grid object to make a mesh of

max.edge

The largest allowed triangle edge length. One or two values. This is passed to inla.mesh.2d

bound.outer

The optional outer extension value given to offset.

cutoff

Minimum distance allowed between points

offset

The automatic extension distance given to inla.mesh.2d

...

Other options to pass to inla.mesh.2d

Value

Returns an object of class inla.mesh.

Examples




if (requireNamespace("INLA")) {
  basic_mesh <- make_mesh()
  plot(basic_mesh)
}




SimSurvey documentation built on Sept. 19, 2023, 5:07 p.m.