cubicEqn, quadraticEqn: Correction to repeated roots

This resolves bug report https://bugs.openfoam.org/view.php?id=3015
This commit is contained in:
Will Bainbridge
2018-07-24 16:11:12 +01:00
parent 63b0469a7b
commit 82b3c0c1d5
2 changed files with 2 additions and 2 deletions

View File

@ -96,7 +96,7 @@ Foam::Roots<3> Foam::cubicEqn::roots() const
if (oneReal)
{
const Roots<1> r = linearEqn(- a, b/3).roots();
const Roots<1> r = linearEqn(a, b/3).roots();
return Roots<3>(r.type(0), r[0]);
}
else if (twoReal)

View File

@ -71,7 +71,7 @@ Foam::Roots<2> Foam::quadraticEqn::roots() const
if (oneReal)
{
const Roots<1> r = linearEqn(- a, b/2).roots();
const Roots<1> r = linearEqn(a, b/2).roots();
return Roots<2>(r, r);
}
else if (twoReal)