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

Examples

open allclose all

Basic Examples  (2)

Count the cells in each dimension for a MeshRegion in 2D:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Count only the 1D cells:

In[3]:=
Click for copyable input
Out[3]=

Count the cells in each dimension for a BoundaryMeshRegion in 3D:

In[1]:=
Click for copyable input
Out[1]=

Only the boundary surfaces are cells:

In[2]:=
Click for copyable input
Out[2]=

Scope  (8)

Properties & Relations  (5)

See Also

MeshCells  MeshCoordinates  MeshRegion  BoundaryMeshRegion

Introduced in 2014
(10.0)