hookeai.model_architectures.materials.stress_features.compute_stress_feature

compute_stress_feature(stress_comps_array, stress_feature_label, n_dim, stress_comps_order, device=None)[source]

Compute stress-based feature.

Parameters:
  • stress_comps_array (torch.Tensor(1d)) – Strain components array.

  • stress_feature_label ({'vol_stress', 'dev_stress'}) –

    Stress-based feature:

    ’vol_stress’ : Volumetric (or hydrostatic) stress.

    ’dev_stress’ : Deviatoric component of stress tensor.

  • n_dim (int) – Number of spatial dimensions.

  • stress_comps_order (tuple[str]) – Strain components order.

  • device (torch.device, default=None) – Device on which torch.Tensor is allocated.

Returns:

stress_feature – Stress-based feature.

Return type:

torch.Tensor(1d)