inla.mesh.components {INLA} | R Documentation

## Compute connected mesh subsets

### Description

Compute subsets of vertices and triangles in an inla.mesh object that are connected by edges. This function is deprecated from INLA `⁠25.4.10⁠` when fmesher version `⁠0.3.0.9005⁠` or later is installed, which had `fm_mesh_components()`, replaced from fmesher `⁠0.4.0.9001⁠` by `fmesher::fm_components()`.

### Usage

    inla.mesh.components(mesh)

### Arguments

`mesh` | An `fm_mesh_2d` object

### Value

A list with elements `vertex` and `triangle`, vectors of integer labels for which connected component they belong, and `info`, a `data.frame` with columns

`component` | Connected component integer label.
`nV` | The number of vertices in the component.
`nT` | The number of triangles in the component.
`area` | The surface area associated with the component. Component labels are not comparable across different meshes, but some ordering stability is guaranteed by initiating each component from the lowest numbered triangle whenever a new component is initiated.

### Author(s)

Finn Lindgren finn.lindgren@gmail.com

### See Also

`fmesher::fm_mesh_2d()`, `fmesher::fm_rcdt_2d()`

### Examples

    # Construct two simple meshes:
    library(fmesher)
    loc <- matrix(c(0, 1, 0, 1), 2, 2)
    mesh1 <- fm_mesh_2d(loc = loc, max.edge = 0.1)
    bnd <- fm_nonconvex_hull(loc, 0.3)
    mesh2 <- fm_mesh_2d(boundary = bnd, max.edge = 0.1)

    # Compute connectivity information:
    conn1 <- fm_components(mesh1)
    conn2 <- fm_components(mesh2)
    # One component, simply connected mesh
    conn1$info
    # Two disconnected components
    conn2$info

[Package INLA version 26.08.22 Index]