cratepy.tensor.matrixoperations.get_tensor_mf

get_tensor_mf(tensor, n_dim, comp_order)[source]

Get tensor matricial form.

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. Otherwise, the matricial form is built columnwise.


Parameters:
  • tensor (numpy.ndarray (2d or 4d)) – Tensor to be stored in matricial form.

  • n_dim (int) – Problem number of spatial dimensions.

  • comp_order (list) – Strain/Stress components order associated to matricial form.

Returns:

tensor_mf – Matricial form of input tensor.

Return type:

numpy.ndarray (1d or 2d)