gives cells of dimension d adjacent to the cell specified by cellspec in the mesh mr.

# Details

• AdjacentMeshCells is also known as neighboring cells.
• Typical uses include getting cell adjacencies and topological information in a mesh.
• AdjacentMeshCells[mr,cellspec,d] returns a list of cell indices associated to the d-dimensional cells adjacent to cells specified by cellspec.
• The following cell specifications cellspec can be used:
•  {d,i} cell with index i of dimension d {d,ispec} cells with index specification ispec of dimension d {dspec,…} cells of dimensions given by dspec h[{i1,…}] explicit cell with head h and vertex indices i1, … {c1,c2,…} list of explicit cells ci
• The index specification ispec can have the following form:
•  i cell index i {i1,i2,…} cells with indices ik All all cells patt cells with indices matching the pattern patt
• The dimension specification dspec can have the following form:
•  d explicit dimension d All all dimensions from 0 to geometric dimension of region patt dimensions matching the pattern patt

# Examples

open allclose all

## Basic Examples(2)

A list of lines adjacent to the cell {0,2}:

Find all faces adjacent to the cells that match a pattern:

## Scope(5)

### Basic Uses(2)

Specify cells with index and dimension:

Pattern:

Explicit cells:

A list of cells:

Find the cells of different dimensions adjacent to the cell {0, 1}:

### Mesh Regions(2)

The AdjacentMeshCells of a MeshRegion in 2D:

Highlight the cells:

1D:

3D:

Highlight the cells:

Highlight the cells:

1D:

3D:

Highlight the cells:

## Applications(8)

### Basic Applications(5)

Adjacent mesh cells of 3D boundary mesh:

Get the point adjacency of a Voronoi mesh:

Use AdjacentMeshCells to find all the points that are connected to the point with cell index {0,1):

### Polyhedra Operations(1)

Use AdjacentMeshCells to compute the DualPolyhedron of a cuboid:

Get the adjacent faces for each point:

Compute the coordinates of the dual:

Construct the dual of the cube:

### Topological Operations(1)

Use MeshConnectivityGraph to test whether a mesh is connected:

## Properties & Relations(2)

The cell index {d, k} corresponds to the k cells of dimension d:

AdjacentMeshCells can be found using MeshConnectivityGraph:

## Neat Examples(1)

#### CMS

Wolfram Language. 2020. "AdjacentMeshCells." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AdjacentMeshCells.html.