Skip to content

Commit 01f15ae

Browse files
GunnarssonJJacob Gunnarsson
andauthored
Added dXdF as input to update_extras! (#11)
Co-authored-by: Jacob Gunnarsson <jacob.gunnarsson@chalmers.se>
1 parent cd0eb1f commit 01f15ae

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/FiniteStrainPlastic.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ function MMB.material_response(m::FiniteStrainPlastic, F::Tensor{2,3}, old::Fini
122122
if converged
123123
x_sol = fromvector(x_vector, x0)
124124
check_solution(x_sol)
125-
update_extras!(extras, x_sol, ∂R∂X) # Use dRdx before calling inv!
126125
# dPdF = ∂P∂F + ∂P∂X dXdF
127126
# dRdF = 0 = ∂R∂F + ∂R∂X dXdF => dXdF = - ∂R∂X\∂R∂F
128127

@@ -131,6 +130,8 @@ function MMB.material_response(m::FiniteStrainPlastic, F::Tensor{2,3}, old::Fini
131130

132131
dXdF = - ∂R∂X \ ∂R∂F
133132

133+
update_extras!(extras, x_sol, ∂R∂X, dXdF)
134+
134135
P = calculate_PKstress(m, x_sol, old, F)
135136
P_X_fun = Tensor2VectorFun(x_sol, x -> calculate_PKstress(m, x, old, F))
136137
∂P∂X = ForwardDiff.jacobian(P_X_fun, tovector(SVector, x_sol))

0 commit comments

Comments
 (0)