get_array_association

get_array_association#

get_array_association(
mesh: DataSet | _vtk.vtkDataSet | _vtk.vtkTable,
name: str,
preference: PointLiteral | CellLiteral | FieldLiteral | RowLiteral = 'cell',
err: bool = False,
) FieldAssociation[source]#

Return the array association.

Parameters:
meshpyvista.DataSet

Dataset to get the array association from.

namestr

The name of the array.

preferencestr, default: “cell”

When scalars is specified, this is the preferred array type to search for in the dataset. Must be either 'point', 'cell', or 'field'.

errbool, default: False

Boolean to control whether to throw an error if array is not present.

Returns:
pyvista.core.utilities.arrays.FieldAssociation

Association of the array. If array is not present and err is False, FieldAssociation.NONE is returned.