Skip to content
Snippets Groups Projects
Commit 5744cd1e authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[MaL] KelvinVector; Relax deviatoric assertion.

parent d4b703eb
No related branches found
No related tags found
No related merge requests found
...@@ -18,7 +18,7 @@ double Invariants<KelvinVectorSize>::equivalentStress( ...@@ -18,7 +18,7 @@ double Invariants<KelvinVectorSize>::equivalentStress(
Eigen::Matrix<double, KelvinVectorSize, 1> const& deviatoric_v) Eigen::Matrix<double, KelvinVectorSize, 1> const& deviatoric_v)
{ {
assert(std::abs(trace(deviatoric_v)) <= assert(std::abs(trace(deviatoric_v)) <=
5e-14 * diagonal(deviatoric_v).norm()); 2e-13 * diagonal(deviatoric_v).norm());
return std::sqrt(3 * J2(deviatoric_v)); return std::sqrt(3 * J2(deviatoric_v));
} }
...@@ -34,7 +34,7 @@ double Invariants<KelvinVectorSize>::J2( ...@@ -34,7 +34,7 @@ double Invariants<KelvinVectorSize>::J2(
Eigen::Matrix<double, KelvinVectorSize, 1> const& deviatoric_v) Eigen::Matrix<double, KelvinVectorSize, 1> const& deviatoric_v)
{ {
assert(std::abs(trace(deviatoric_v)) <= assert(std::abs(trace(deviatoric_v)) <=
5e-14 * diagonal(deviatoric_v).norm()); 2e-13 * diagonal(deviatoric_v).norm());
return 0.5 * deviatoric_v.transpose() * deviatoric_v; return 0.5 * deviatoric_v.transpose() * deviatoric_v;
} }
...@@ -45,7 +45,7 @@ double Invariants<KelvinVectorSize>::J3( ...@@ -45,7 +45,7 @@ double Invariants<KelvinVectorSize>::J3(
Eigen::Matrix<double, KelvinVectorSize, 1> const& deviatoric_v) Eigen::Matrix<double, KelvinVectorSize, 1> const& deviatoric_v)
{ {
assert(std::abs(trace(deviatoric_v)) <= assert(std::abs(trace(deviatoric_v)) <=
5e-14 * diagonal(deviatoric_v).norm()); 2e-13 * diagonal(deviatoric_v).norm());
return determinant(deviatoric_v); return determinant(deviatoric_v);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment