class matlantis_features.features.elasticity.elastic_tensor.ElasticTensor(stress_data: ndarray, strain_data: ndarray)#

Bases: object

Elastic tensor object calculated from the stress-strain relation.

Methods

__init__(stress_data, strain_data)

Initialize an instance.

fitting_result_linear(i, j[, threshold])

Check the linear relation between stress and strain values.

from_stress_strain(stress, strain)

Create elastic tensor object from stress and strain tensor objects.

__init__(stress_data: ndarray, strain_data: ndarray) None#

Initialize an instance.

Parameters
  • stress_data (np.ndarray) – Stress tensor for the calculation.

  • strain_data (np.ndarray) – Strain tensor for the calculation.

fitting_result_linear(i: int, j: int, threshold: float = 0.5) bool#

Check the linear relation between stress and strain values.

Parameters
  • i (int) – i-index for the tensor.

  • j (int) – j-index for the tensor.

  • threshold (float, optional) – Linearlity criterion threshold. Defaults to 0.5.

Returns

Returns True if the relation satisfy the linearlity criterion threshold.

Return type

bool

classmethod from_stress_strain(stress: StressTensorList, strain: StrainTensorList) ElasticTensor#

Create elastic tensor object from stress and strain tensor objects.

Parameters
Returns

Resulting elastic tensor object.

Return type

ElasticTensor