inla.mesh.segment {INLA} | R Documentation

## Constraint segments for inla.mesh

### Description

Use `fmesher::fm_segm()` instead.

Constructs `inla.mesh.segment` objects that can be used to specify boundary and interior constraint edges in calls to `inla.mesh()`.

### Usage

    inla.mesh.segment(...)

    inla.contour.segment(...)

### Arguments

`...` | Parameters passed on to `fmesher::fm_segm()` and other replacement `fmesher` functions.

### Value

An `fm_segm` object.

### Functions

- `inla.contour.segment()`: Use `fmesher::fm_segm_contour_helper()` instead.

### Author(s)

Finn Lindgren finn.lindgren@gmail.com

### See Also

`inla.mesh.create()`, `inla.mesh.2d()`

### Examples

    require("fmesher")
    ## 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 <- fm_segm(loc.bnd)
    segm.int <- fm_segm(loc.int, is.bnd = FALSE)

    ## Points to be meshed
    loc <- matrix(runif(10 * 2), 10, 2) * 0.9 + 0.05
    mesh <- fm_rcdt_2d_inla(loc,
      boundary = segm.bnd,
      interior = segm.int,
      refine = list()
    )
    plot(mesh)

    mesh <- fm_rcdt_2d_inla(loc, interior = fm_segm_join(segm.bnd, segm.int))
    plot(mesh)

[Package INLA version 25.06.07 Index]