From dc9aca571002a9c7197379a2345cad160ee0bd54 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 18 Oct 2019 20:56:38 +0200 Subject: [PATCH] copy and paste error/invalid syntax --- python/damask/dadf5.py | 2 +- python/damask/mechanics.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/damask/dadf5.py b/python/damask/dadf5.py index ba81fa605..a50eb44f8 100644 --- a/python/damask/dadf5.py +++ b/python/damask/dadf5.py @@ -381,7 +381,7 @@ class DADF5(): """ def Cauchy(F,P): return { - 'data' : mechanics.Cauchy(F['data']),P['data']), + 'data' : mechanics.Cauchy(F['data'],P['data']), 'label' : 'sigma', 'meta' : { 'Unit' : P['meta']['Unit'], diff --git a/python/damask/mechanics.py b/python/damask/mechanics.py index 5f8dbc02d..dad601701 100644 --- a/python/damask/mechanics.py +++ b/python/damask/mechanics.py @@ -13,7 +13,7 @@ def deviator(x): if np.shape(x) == (3,3): return x - np.eye(3)*np.trace(x)/3.0 else: - return d - np.einsum('ijk,i->ijk',np.broadcast_to(np.eye(3),[d.shape[0],3,3]),np.trace(d,axis1=1,axis2=2)/3.0) + return x - np.einsum('ijk,i->ijk',np.broadcast_to(np.eye(3),[x.shape[0],3,3]),np.trace(x,axis1=1,axis2=2)/3.0) def spherical(x):