set_active_tensors

UnstructuredGrid.set_active_tensors(name: str, preference='point')

Find the tensors by name and appropriately sets it as active.

To deactivate any active tensors, pass None as the name.

Parameters
namestr

Name of the tensors array to assign as active.

preferencestr, optional

If there are two arrays of the same name associated with points, cells, or field data, it will prioritize an array matching this type. Can be either 'cell', 'field', or 'point'.