inla.mesh.segment {INLA} | R Documentation |
inla.mesh.segment
objects that can be used to specify
boundary and interior constraint edges in calls to inla.mesh()
.Constraint segments for inla.mesh
Constructs inla.mesh.segment
objects that can be used to specify
boundary and interior constraint edges in calls to inla.mesh()
.
inla.mesh.segment(...) ## Default S3 method: inla.mesh.segment( loc = NULL, idx = NULL, grp = NULL, is.bnd = TRUE, crs = NULL, ... ) ## S3 method for class 'inla.mesh.segment' inla.mesh.segment(..., grp.default = 0) inla.contour.segment( x = seq(0, 1, length.out = nrow(z)), y = seq(0, 1, length.out = ncol(z)), z, nlevels = 10, levels = pretty(range(z, na.rm = TRUE), nlevels), groups = seq_len(length(levels)), positive = TRUE, eps = NULL, crs = NULL )
... |
Additional parameters. When joining segments, a list of
|
loc |
Matrix of point locations. |
idx |
Segment index sequence vector or index pair matrix. The indices
refer to the rows of |
grp |
Vector of group labels for each segment. Set to |
is.bnd |
|
crs |
An optional |
grp.default |
When joining segments, use this group label for segments
that have |
x, y, z, nlevels, levels |
Parameters specifying a set of surface contours,
with syntax described in |
groups |
Vector of group ID:s, one for each contour level. |
positive |
|
eps |
Tolerance for |
An inla.mesh.segment
object.
Finn Lindgren finn.lindgren@gmail.com
inla.mesh.create()
, inla.mesh.2d()
## Create a square boundary and a diagonal interior segment loc.bnd <- matrix(c(0, 0, 1, 0, 1, 1, 0, 1), 4, 2, byrow = TRUE) loc.int <- matrix(c(0.9, 0.1, 0.1, 0.6), 2, 2, byrow = TRUE) segm.bnd <- inla.mesh.segment(loc.bnd) segm.int <- inla.mesh.segment(loc.int, is.bnd = FALSE) ## Points to be meshed loc <- matrix(runif(10 * 2), 10, 2) * 0.9 + 0.05 mesh <- inla.mesh.create(loc, boundary = segm.bnd, interior = segm.int, refine = list() ) plot(mesh) ## Not run: mesh <- inla.mesh.create(loc, interior = list(segm.bnd, segm.int)) plot(mesh) ## End(Not run)