MeshCellCount

MeshCellCount[mreg]
gives a list of counts 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.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples  (2)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]=
Introduced in 2014
(10.0)