MeshCellCount
MeshCellCount[mreg]
gives a list {c0,c1,…} of counts cd of cells of dimension d in the mesh region mreg.
MeshCellCount[mreg,d]
gives the total count of cells of dimension d.
MeshCellCount[mreg,cellspec]
gives the total count of cells specified by cellspec.
Details
- MeshCellCount counts the cells in each dimension.
- The mesh region mreg can be either MeshRegion or BoundaryMeshRegion.
- The cell specification cellspec follows the standard form {dim,indexes} and is specifically described in the reference pages for MeshRegion and BoundaryMeshRegion.
Examples
open allclose allBasic Examples (2)
Count the cells in each dimension for a MeshRegion in 2D:
Count the cells in each dimension for a BoundaryMeshRegion in 3D:
Scope (8)
Count the cells in each dimension for a MeshRegion in 1D:
Count the cells in each dimension for a MeshRegion in 2D:
Count the cells in each dimension for a MeshRegion in 3D:
Count the cells in each dimension for a BoundaryMeshRegion in 1D:
Only the boundary points are cells:
Count the cells in each dimension for a BoundaryMeshRegion in 2D:
Only the boundary curves are cells:
Count the cells in each dimension for a BoundaryMeshRegion in 3D:
Only the boundary surfaces are cells:
Use All to count the number of cells regardless of dimension:
The number of cells is equal to the sum of the cells in each dimension:
Properties & Relations (5)
MeshCellCount corresponds to the lengths cell lists in MeshCells:
MeshCellCount is typically larger than the number of cells used in MeshRegion:
The additional cells are points and edges for the triangle:
An -dimensional simplex has cells in total:
MeshCellCount for a BoundaryMeshRegion in 2D:
The vertex and edge count satisfy :
Even with holes it satisfies the same relation:
MeshCellCount for a BoundaryMeshRegion in 3D satisfies Euler's formula :
Text
Wolfram Research (2014), MeshCellCount, Wolfram Language function, https://reference.wolfram.com/language/ref/MeshCellCount.html.
CMS
Wolfram Language. 2014. "MeshCellCount." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MeshCellCount.html.
APA
Wolfram Language. (2014). MeshCellCount. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MeshCellCount.html