hookeai.model_architectures.materials.strain_features.build_strain_from_comps

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

Build strain tensor from given components.

Parameters:
  • n_dim (int) – Number of spatial dimensions.

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

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

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

Returns:

strain – Strain tensor.

Return type:

torch.Tensor(2d)