hookeai.simulators.fetorch.material.models.standard.drucker_prager.vget_tensor_mf

vget_tensor_mf(tensor, n_dim, comp_order, is_kelvin_notation=True, device=None)[source]

Get tensor matricial form.

Compatible with vectorized mapping.

Store a given second-order or fourth-order tensor in matricial form for a given number of problem spatial dimensions and given 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 the Kelvin notation[#]_ is employed to perform the storage by default.


Parameters:
  • tensor (torch.Tensor) – Tensor to be 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_mf – Matricial form of input tensor.

Return type:

torch.Tensor