pyvista.PointCellDataSelection#

class PointCellDataSelection[source]#

Mixin for readers that support data array selections.

Examples

>>> import pyvista as pv
>>> from pyvista import examples
>>> filename = examples.download_backward_facing_step(load=False)
>>> filename.split("/")[-1]  # omit the path
'foam_case_0_0_0_0.case'
>>> reader = pv.get_reader(filename)
>>> reader
EnSightReader('.../foam_case_0_0_0_0.case')
>>> reader.cell_array_names
['v2', 'nut', 'k', 'nuTilda', 'p', 'omega', 'f', 'epsilon', 'U']
>>> reader.point_array_names
[]
>>> reader.all_cell_arrays_status  
{'v2': True, 'nut': True, 'k': True, 'nuTilda': True, 'p': True, 'omega': True, 'f': True, 'epsilon': True, 'U': True}
>>> reader.disable_all_cell_arrays()
>>> reader.enable_cell_array('U')
>>> mesh = reader.read()  # MultiBlock mesh
>>> mesh[0].array_names
['U']

Methods

PointCellDataSelection.cell_array_status(name)

Get status of cell array with name.

PointCellDataSelection.disable_all_cell_arrays()

Disable all cell arrays.

PointCellDataSelection.disable_all_point_arrays()

Disable all point arrays.

PointCellDataSelection.disable_cell_array(name)

Disable cell array with name.

PointCellDataSelection.disable_point_array(name)

Disable point array with name.

PointCellDataSelection.enable_all_cell_arrays()

Enable all cell arrays.

PointCellDataSelection.enable_all_point_arrays()

Enable all point arrays.

PointCellDataSelection.enable_cell_array(name)

Enable cell array with name.

PointCellDataSelection.enable_point_array(name)

Enable point array with name.

PointCellDataSelection.point_array_status(name)

Get status of point array with name.

Attributes

PointCellDataSelection.all_cell_arrays_status

Return the status of all cell arrays.

PointCellDataSelection.all_point_arrays_status

Return the status of all point arrays.

PointCellDataSelection.cell_array_names

Return the list of all cell array names.

PointCellDataSelection.number_cell_arrays

Return the number of cell arrays.

PointCellDataSelection.number_point_arrays

Return the number of point arrays.

PointCellDataSelection.point_array_names

Return the list of all point array names.