Skip to content

Commit

Permalink
Fix dimension
Browse files Browse the repository at this point in the history
  • Loading branch information
FabienPean-Virtonomy committed Oct 16, 2024
1 parent 92ef4e5 commit 6630143
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/shared/materials/elastic_solid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ Matd SaintVenantKirchhoffSolid::StressPK2(Matd &F, size_t index_i)
}
Matd SaintVenantKirchhoffSolid::StressCauchy(Matd &almansi_strain, size_t index_i)
{
const auto I = SPH::Mat3d::Identity();
const SPH::Mat3d B = (I - 2 * almansi_strain).inverse();
const auto I = SPH::Matd::Identity();
const SPH::Matd B = (I - 2 * almansi_strain).inverse();
const double J = std::sqrt(B.determinant());
const double trE = 0.5 * (B.trace() - 3); // tr(C) == tr(B)
const double trE = 0.5 * (B.trace() - Dimensions); // tr(C) == tr(B)
const auto F_E_FT = 0.5 * (B * B - B);
return (lambda0_ * trE * B + 2.0 * G0_ * F_E_FT) / J;
}
Expand Down

0 comments on commit 6630143

Please sign in to comment.