MeshCellIndex
MeshCellIndex[mreg,d]
gives the cell indices for cells of dimension d in the mesh region mreg.
MeshCellIndex[mreg,cellspec]
gives the cell indices for the cells specified by cellspec.
Details
- MeshCellIndex is often used to get the cell index {d,i} from a symbolic cell h[{i1,…}].
- The cell indices returned have the form {d,i}, where d is dimension and i a positive integer.
- The mesh region mreg can be either MeshRegion or BoundaryMeshRegion.
- The cell specification cellspec follows the standard form described for MeshRegion and BoundaryMeshRegion.
- MeshCellCount can be used to find the maximum number of cell indices for each dimension.
Examples
open allclose allBasic Examples (1)
Scope (8)
Get the cell indices for a MeshRegion in 1D:
Get the cell indices for a MeshRegion in 2D:
Index of the top line segment:
Use it to highlight just that segment:
Get the cell indices for a MeshRegion in 3D:
Get the cell indices for a BoundaryMeshRegion in 1D:
Only the boundary points are cells:
Get the cell indices for a BoundaryMeshRegion in 2D:
Get the cell indices for a BoundaryMeshRegion in 3D:
Use All to get indices for cells of all dimensions:
Properties & Relations (4)
MeshCells gives the cells corresponding to cell indices:
MeshCellIndex gives the cell indices corresponding to MeshCells:
The corresponding cell indices:
HighlightMesh can use cell indices as input:
The length of a MeshCellIndex output is MeshCellCount evaluated with the same input:
Possible Issues (1)
When coordinates are unused, they are removed from the MeshRegion representation:
Text
Wolfram Research (2014), MeshCellIndex, Wolfram Language function, https://reference.wolfram.com/language/ref/MeshCellIndex.html.
CMS
Wolfram Language. 2014. "MeshCellIndex." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MeshCellIndex.html.
APA
Wolfram Language. (2014). MeshCellIndex. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MeshCellIndex.html