Skip to content

Commit 9961052

Browse files
committed
fixed ARAP
1 parent 7dcdff2 commit 9961052

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/PhysicalModels/MechanicalModels.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ struct ARAP2D_regularized <: IsoElastic
940940
J1 = 0.5 * (1.0 + sqrt(1.0 + δ^2))
941941
∂J1 = 0.5 * (1.0 + 1.0 / sqrt(1.0^2 + δ^2))
942942
β = μ * (J1^(-1) - J1^(-2) * ∂J1)
943-
Ψ(F) = μ * 0.5 * J(F)^(-1) * (tr((F)' * F)) - β * log(J_(F))
943+
Ψ(F) = μ * 0.5 * J(F)^(-1) * (tr((F)' * F)) - β * log(J_(F)) -μ*J(I2)^-1
944944

945945
∂Ψ1_∂J(F) = -μ / 2 * (tr((F)' * F)) * J(F)^(-2)
946946
∂Ψ2_∂J(F) = -β / J_(F)
@@ -972,7 +972,7 @@ struct ARAP2D <: IsoElastic
972972
μ = obj.μ
973973
J(F) = det(F)
974974
H(F) = det(F) * inv(F)'
975-
Ψ(F) = μ * 0.5 * J(F)^(-1) * (tr((F)' * F))
975+
Ψ(F) = μ * 0.5 * J(F)^(-1) * (tr((F)' * F)) -μ
976976
∂Ψ_∂F(F) = μ * F * J(F)^(-1)
977977
∂Ψ_∂J(F) = -μ / 2 * (tr((F)' * F)) * J(F)^(-2)
978978

0 commit comments

Comments
 (0)