no need for type conversion
This commit is contained in:
parent
49ccbf3eb8
commit
ab5f0d1bcd
|
@ -74,7 +74,7 @@ echo PETSC_ARCH: $PETSC_ARCH
|
||||||
echo PETSC_DIR: $PETSC_DIR
|
echo PETSC_DIR: $PETSC_DIR
|
||||||
echo
|
echo
|
||||||
echo $PETSC_DIR/$PETSC_ARCH/lib:
|
echo $PETSC_DIR/$PETSC_ARCH/lib:
|
||||||
/s $PETSC_DIR/$PETSC_ARCH/lib
|
ls $PETSC_DIR/$PETSC_ARCH/lib
|
||||||
echo
|
echo
|
||||||
echo $PETSC_DIR/$PETSC_ARCH/lib/petsc/conf/petscvariables:
|
echo $PETSC_DIR/$PETSC_ARCH/lib/petsc/conf/petscvariables:
|
||||||
cat $PETSC_DIR/$PETSC_ARCH/lib/petsc/conf/petscvariables
|
cat $PETSC_DIR/$PETSC_ARCH/lib/petsc/conf/petscvariables
|
||||||
|
|
|
@ -257,18 +257,18 @@ def _polar_decomposition(T,requested):
|
||||||
u, _, vh = _np.linalg.svd(T)
|
u, _, vh = _np.linalg.svd(T)
|
||||||
R = _np.einsum('...ij,...jk',u,vh)
|
R = _np.einsum('...ij,...jk',u,vh)
|
||||||
|
|
||||||
output = []
|
output = ()
|
||||||
if 'R' in requested:
|
if 'R' in requested:
|
||||||
output.append(R)
|
output+=(R,)
|
||||||
if 'V' in requested:
|
if 'V' in requested:
|
||||||
output.append(_np.einsum('...ij,...kj',T,R))
|
output+=(_np.einsum('...ij,...kj',T,R),)
|
||||||
if 'U' in requested:
|
if 'U' in requested:
|
||||||
output.append(_np.einsum('...ji,...jk',R,T))
|
output+=(_np.einsum('...ji,...jk',R,T),)
|
||||||
|
|
||||||
if len(output) == 0:
|
if len(output) == 0:
|
||||||
raise ValueError('output needs to be out of V, R, U')
|
raise ValueError('output needs to be out of V, R, U')
|
||||||
|
|
||||||
return tuple(output)
|
return output
|
||||||
|
|
||||||
|
|
||||||
def _equivalent_Mises(T_sym,s):
|
def _equivalent_Mises(T_sym,s):
|
||||||
|
|
Loading…
Reference in New Issue