hookeai.simulators.fetorch.material.models.vmap.drucker_prager.vget_tensor_from_mf¶
- vget_tensor_from_mf(tensor_mf, n_dim, comp_order, is_kelvin_notation=True, device=None)[source]¶
Recover tensor from associated matricial form.
Compatible with vectorized mapping.
Recover a given second-order or fourth-order tensor from the associated matricial form, given the problem number of spatial dimensions and given a (compatible) ordered strain/stress components list. If the second-order tensor is symmetric or the fourth-order tensor has minor symmetry (component list only contains independent components), then matricial form is assumed to follow the Kelvin notation [1] by default.
- Parameters:
tensor_mf (torch.Tensor) – Tensor stored in matricial form.
n_dim (int) – Problem number of spatial dimensions.
comp_order (tuple) – Strain/Stress components order associated to matricial form.
is_kelvin_notation (bool, default=True) – If True, then Kelvin notation is employed to store symmetric tensors in matricial form. If False, then tensor components are stored unchanged.
device (torch.device, default=None) – Device on which torch.Tensor is allocated.
- Returns:
tensor – Tensor recovered from matricial form.
- Return type:
torch.Tensor