Commit 60cb14a3 authored by Patrick Jaap's avatar Patrick Jaap
Browse files

Merge branch 'fix/mooneyrivlindensity' into 'master'

Fix for compiling mooneyrivlindensity: Do not wrap return statements in if-statements

See merge request agnumpde/dune-elasticity!40
parents f07d6fd8 990e54cc
......@@ -95,8 +95,7 @@ public:
{
using std::log;
return mooneyrivlin_a*normFSquared + mooneyrivlin_b*normFinvSquared*detF + mooneyrivlin_c*detF*detF - ((dim-1)*mooneyrivlin_a + mooneyrivlin_b + 2*mooneyrivlin_c)*log(detF);
}
else {
} else {
strainEnergy = mooneyrivlin_10 * trCTildeMinus3 +
mooneyrivlin_01 * c2TildeMinus3 +
mooneyrivlin_20 * trCTildeMinus3 * trCTildeMinus3 +
......@@ -110,7 +109,7 @@ public:
using std::log;
field_type logDetF = log(detF);
return strainEnergy + 0.5 * mooneyrivlin_k* logDetF * logDetF;
} else if (mooneyrivlin_energy == "square") {
} else { //mooneyrivlin_energy is "square"
field_type detFMinus1 = detF - 1;
return strainEnergy + mooneyrivlin_k* detFMinus1 * detFMinus1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment