New syntax for basic operations between tensor arrays
Tensor product: broadcasting or cross-combinations?
In order to avoid confusion, tensor product with single contraction (e.g. matrix-like product) is now made with ``dot``. By default, if the two tensors to be multiplied are multidimensional tensor arrays, the product is made on the last coincident axes, according to the numpy's broadcasting rules. E.g.:
`python
a = StressTensor.rand(4, 5)
b = StrainTensor.rand(5)
ab = a.dot(b)
ab.shape
(4, 5,)
`
Conversely, if one wants to compute *all* cross-combinations, he/she must use ``mode='cross'`` option, thus increasing the dimensionality of the returned tensor:
`python
ab_cross=a.dot(b, mode='cross')
ab_cross.shape
(4, 5, 5)
`
Rotation of tensors
The same considerations also apply with ``rotate`` (which takes the option ``mode='cross'`` to compute all cross-combinations between the single tensors and the considered rotations).
What about ``*`` operator then?
Standard multiplication (``*``) still works; it is just a shortcut for ``dot`` and ``rotate`` (depending on the type of object used for mutliplication). For instance:
`
np.all(a.dot(b) == a*b)
True
`
And ``matmul``?
For backward compatibility``matmul`` still works, but throws a warning message mentioning its deprecation.
Other features
- convertion of second-order tensors from/to vector(s), according to the Voigt or Kelvin(-Mandel) conventions,
- convertion of ``StiffnessTensor`` and ``ComplianceTensor`` from/to (6,6) Kelvin matrix,
- tensor analysis (e.g. eigenstiffnesses/eigencompliances),
- supports for multidim arrays of ``FourthOrderTensor`` thanks to multidim rotations, as provided by Orix,
- minor bug fixes.