return was missing

This commit is contained in:
Martin Diehl 2023-02-14 12:54:51 +01:00
parent d89850adc9
commit 4cd84ab8ce
1 changed files with 10 additions and 0 deletions

View File

@ -260,6 +260,11 @@ def _polar_decomposition(T: _np.ndarray,
Requested outputs: R for the rotation tensor,
V for left stretch tensor, and U for right stretch tensor.
Returns
-------
VRU : tuple of numpy.ndarray, shape (...,3,3)
Requested components of the singular value decomposition.
"""
u, _, vh = _np.linalg.svd(T)
R = _np.einsum('...ij,...jk',u,vh)
@ -290,6 +295,11 @@ def _equivalent_Mises(T_sym: _np.ndarray,
s : float
Scaling factor (2/3 for strain, 3/2 for stress).
Returns
-------
eq : numpy.ndarray, shape (...)
Scaled second invariant of the deviatoric part of T_sym.
"""
d = _tensor.deviatoric(T_sym)
return _np.sqrt(s*_np.sum(d**2.0,axis=(-1,-2)))