ogstools.propertylib.matrix module#

class ogstools.propertylib.matrix.Matrix[source]#

Bases: Property

Represent a matrix property.

Matrix properties should contain either 4 (2D) or 6 (3D) components. Matrix components can be accesses with brackets e.g. stress[0]

__getitem__(index)[source]#

A scalar property as a matrix component.

Parameters:

index (int | Literal['xx', 'yy', 'zz', 'xy', 'yz', 'xz'])

Return type:

Scalar

property magnitude: Scalar#

A scalar property as the frobenius norm of the matrix.

property trace: Scalar#

A scalar property as the trace of the matrix.

property eigenvalues: Vector#

A vector property as the eigenvalues of the matrix.

property eigenvectors: VectorList#

A vector property as the eigenvectors of the matrix.

property det: Scalar#

A scalar property as the determinant of the matrix.

property invariant_1: Scalar#

A scalar property as the first invariant of the matrix.

property invariant_2: Scalar#

A scalar property as the second invariant of the matrix.

property invariant_3: Scalar#

A scalar property as the third invariant of the matrix.

property mean: Scalar#

A scalar property as the mean value of the matrix.

property hydrostatic_component: Matrix#

A vector property as the effective pressure of the matrix.

property deviator: Matrix#

A vector property as the deviator of the matrix.

property deviator_invariant_1: Scalar#

A scalar property as the first invariant of the matrix deviator.

property deviator_invariant_2: Scalar#

A scalar property as the second invariant of the matrix deviator.

property deviator_invariant_3: Scalar#

A scalar property as the third invariant of the matrix deviator.

property octahedral_shear: Scalar#

A scalar property as the octahedral shear component of the matrix.

property von_Mises: Scalar#

A scalar property as the von Mises stress.

property qp_ratio: Scalar#

A scalar property as the qp stress ratio.

__init__(data_name, data_unit='', output_unit='', output_name='', mask='', func=<function identity>, mesh_dependent=False, process_with_units=False, cmap='coolwarm', bilinear_cmap=False, categoric=False)#
Parameters:
  • data_name (str)

  • data_unit (str)

  • output_unit (str)

  • output_name (str)

  • mask (str)

  • func (Callable)

  • mesh_dependent (bool)

  • process_with_units (bool)

  • cmap (Colormap | str)

  • bilinear_cmap (bool)

  • categoric (bool)

Return type:

None