Mesh stats tools

The stats module of geos-mesh package contains filter to compute statistics on meshes.

geos.mesh.stats.CellTypeCounter filter

CellTypeCounter module is a vtk filter that computes cell type counts.

Filter input is a vtkUnstructuredGrid, output is a vtkTable

To use the filter:

from geos.mesh.stats.CellTypeCounter import CellTypeCounter

# filter inputs
input :vtkUnstructuredGrid

# instanciate the filter
filter :CellTypeCounter = CellTypeCounter()
# set input data object
filter.SetInputDataObject(input)
# do calculations
filter.Update()
# get counts
counts :CellTypeCounts = filter.GetCellTypeCounts()
class geos.mesh.stats.CellTypeCounter.CellTypeCounter[source]

Bases: VTKPythonAlgorithmBase

CellTypeCounter filter computes mesh stats.

FillInputPortInformation(port, info)[source]

Inherited from VTKPythonAlgorithmBase::RequestInformation.

Parameters:
  • port (int) – input port

  • info (vtkInformationVector) – info

Returns:

1 if calculation successfully ended, 0 otherwise.

Return type:

int

GetCellTypeCounts()[source]

Get CellTypeCounts object.

Returns:

CellTypeCounts object.

Return type:

CellTypeCounts

RequestData(request, inInfoVec, outInfoVec)[source]

Inherited from VTKPythonAlgorithmBase::RequestData.

Parameters:
  • request (vtkInformation) – request

  • inInfoVec (list[vtkInformationVector]) – input objects

  • outInfoVec (vtkInformationVector) – output objects

Returns:

1 if calculation successfully ended, 0 otherwise.

Return type:

int

getAllCellTypes()[source]

Get all cell type ids managed by CellTypeCount class.

Returns:

tuple containg cell type ids.

Return type:

tuple[int,…]