reshaped F transpose error3
This commit is contained in:
parent
4f4d8d8c92
commit
0f42ff6b5d
|
@ -62,18 +62,18 @@ def strain_tensor(F,t,m):
|
||||||
F_ = F.reshape(1,3,3)
|
F_ = F.reshape(1,3,3)
|
||||||
|
|
||||||
if t == 'V':
|
if t == 'V':
|
||||||
B = np.matmul(F_,F_[0].T)
|
B = np.matmul(F_,mechanics.transpose(F_))
|
||||||
w,n = np.linalg.eigh(B)
|
w,n = np.linalg.eigh(B)
|
||||||
elif t == 'U':
|
elif t == 'U':
|
||||||
C = np.matmul(F_[0].T,F_)
|
C = np.matmul(mechanics.transpose(F_),F_)
|
||||||
w,n = np.linalg.eigh(C)
|
w,n = np.linalg.eigh(C)
|
||||||
|
|
||||||
if m > 0.0:
|
if m > 0.0:
|
||||||
eps = 1.0/(2.0*abs(m)) * (+ np.matmul(n,np.einsum('ij,ikj->ijk',w**m,n))
|
eps = 1.0/(2.0*abs(m)) * (+ np.matmul(n,np.einsum('ij,ikj->ijk',w**m,n))
|
||||||
- np.einsum('ijk->ijk',np.eye(3)))
|
- np.broadcast_to(np.eye(3),[F_.shape[0],3,3]))
|
||||||
elif m < 0.0:
|
elif m < 0.0:
|
||||||
eps = 1.0/(2.0*abs(m)) * (- np.matmul(n,np.einsum('ij,ikj->ijk',w**m,n))
|
eps = 1.0/(2.0*abs(m)) * (- np.matmul(n,np.einsum('ij,ikj->ijk',w**m,n))
|
||||||
+ np.einsum('ijk->ijk',np.eye(3)))
|
+ np.broadcast_to(np.eye(3),[F_.shape[0],3,3]))
|
||||||
else:
|
else:
|
||||||
eps = np.matmul(n,np.einsum('ij,ikj->ijk',0.5*np.log(w),n))
|
eps = np.matmul(n,np.einsum('ij,ikj->ijk',0.5*np.log(w),n))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue