ansys.dpf.core.Dimensionality#

class ansys.dpf.core.Dimensionality(dim_vec=None, nature: ansys.dpf.core.common.natures = natures.vector)#

Represents the dimensionality of a field.

This class reads a list of dimension vectors and creates a dimensionality message.

Parameters:
  • dim_vec (list) –

    List of integers for the dimension vectors. There is a 1D vector for a scalar or 3D vector. There is a 2D vector for a matrix. For example:

    • [1]: scalar

    • [3]: 3d vector

    • [3, 3]: 3 x 3 matrix

  • nature (ansys.dpf.core.common.natures)

dim = None#
nature#
is_1d_dim()#

Check if dimensionality is 1.

is_2d_dim()#

Check if dimensionality is 2.

__str__()#

Customize the string representation of the dimensionality.

property component_count#

Retrieve the number of components based on the dimensionality.

Returns:

Number of components.

Return type:

float

static scalar_dim()#

Retrieve the dimensionality of a scalar field.

Returns:

Dimensionality of the scalar field.

Return type:

ansys.dpf.core.dimensionnality.Dimensionality

static vector_dim(size)#

Retrieve the dimensionality of a vector field of a given size.

Parameters:

size (int) – Number of components by entity.

Returns:

Dimensionality of the vector field.

Return type:

ansys.dpf.core.dimensionnality.Dimensionality

static vector_3d_dim()#

Retrieve the dimensionality of a three-dimension vector field.

Returns:

Dimensionality of the three-dimension vector field.

Return type:

ansys.dpf.core.dimensionnality.Dimensionality

static tensor_dim()#

Retrieve the dimensionality of a symmetrical 3 x 3 tensor field.

Returns:

Dimensionality of the symmetrical 3 x 3 tensor field.

Return type:

ansys.dpf.core.dimensionnality.Dimensionality

__eq__(other)#

Check if this Dimensionality object is equal to another.

Two Dimensionality objects are considered equal if their dimensionality vectors (dim) and natures (nature) are the same.

Parameters:

other (Dimensionality) – The other Dimensionality object to compare with.

Returns:

True if the two objects are equal, False otherwise.

Return type:

bool

__ne__(other)#

Check if this Dimensionality object is not equal to another.

Two Dimensionality objects are considered not equal if their dimensionality vectors (dim) or natures (nature) differ.

Parameters:

other (Dimensionality) – The other Dimensionality object to compare with.

Returns:

True if the two objects are not equal, False otherwise.

Return type:

bool