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:

Count only the 1D cells:

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

Only the boundary surfaces are cells:

Scope  (8)

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

Count only the 0D cells:

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

Count only the 1D cells:

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

Count only 2D cells:

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:

Works with large mesh regions:

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:

In various dimensions:

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 :

With voids you have the relation :

Wolfram Research (2014), MeshCellCount, Wolfram Language function, https://reference.wolfram.com/language/ref/MeshCellCount.html.

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

BibTeX

@misc{reference.wolfram_2024_meshcellcount, author="Wolfram Research", title="{MeshCellCount}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/MeshCellCount.html}", note=[Accessed: 22-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_meshcellcount, organization={Wolfram Research}, title={MeshCellCount}, year={2014}, url={https://reference.wolfram.com/language/ref/MeshCellCount.html}, note=[Accessed: 22-December-2024 ]}