hookeai.model_architectures.materials.strain_features.compute_strain_feature

compute_strain_feature(strain_comps_array, strain_feature_label, n_dim, strain_comps_order, device=None)[source]

Compute strain-based feature.

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

  • strain_feature_label ({'i1_strain', 'i2_strain'}) –

    Strain-based feature:

    ’i1_strain’ : First (principal) invariant of strain tensor.

    ’i2_strain’ : Second (principal) invariant of strain tensor.

  • n_dim (int) – Number of spatial dimensions.

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

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

Returns:

strain_feature – Strain-based feature.

Return type:

torch.Tensor(1d)