mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
cubicEqn, quadraticEqn: Correction to repeated roots
This resolves bug report https://bugs.openfoam.org/view.php?id=3015
This commit is contained in:
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user