How to compute the stiffness matrix K?
FantasyVR opened this issue · comments
When computing dP(F:\delta F)
, there are some differences between your implementation and the SIGGRAPH 2012 FEM Course
Taichi/fem_3d_imp/fem-3d-implicit.py
Line 263 in a8df223
Why do you re-compute dF in the for-loop rather than using the already computed dF?
I tried to change some code according to algorithm 2 in SIGGRAPH 2012 FEM Course based on your code. The simulation still works.
for n in range(4):
for dim in range(self.dim):
for i in ti.static(range(self.dim)):
for j in ti.static(range(self.dim)):
dF = self.dF[e,n,dim]
dF_T = dF.transpose()
dTr = (F_1 @ dF).trace()
dP_dFij = self.mu * dF + (self.mu - self.la * ti.log(J)) * F_1_T @ dF_T @ F_1_T + self.la * dTr * F_1_T
self.dP[e, n, dim] += dP_dFij