mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
@ -159,9 +159,6 @@ Foam::bitSet& Foam::bitSet::orEq(const bitSet& other, const bool strict)
|
||||
<< "Perform |= on dissimilar sized bitSets: "
|
||||
<< size() << " vs. " << other.size() << nl;
|
||||
}
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
label minpos = -1; // Min trim point
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ Foam::Roots<3> Foam::cubicEqn::roots() const
|
||||
|
||||
// This is assumed not to over- or under-flow. If it does, all bets are off.
|
||||
const scalar p = c*a - b*b/3;
|
||||
const scalar q = b*b*b*(2.0/27.0) - b*c*a/3 + d*a*a;
|
||||
const scalar q = b*b*b*scalar(2)/27 - b*c*a/3 + d*a*a;
|
||||
const scalar disc = p*p*p/27 + q*q/4;
|
||||
|
||||
// How many roots of what types are available?
|
||||
@ -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)
|
||||
|
||||
@ -114,7 +114,10 @@ inline Foam::scalar Foam::cubicEqn::derivative(const scalar x) const
|
||||
|
||||
inline Foam::scalar Foam::cubicEqn::error(const scalar x) const
|
||||
{
|
||||
return mag(SMALL*x*(x*(x*3*a() + 2*b()) + c()));
|
||||
return
|
||||
SMALL*magSqr(x)*(mag(x*a()) + mag(b()))
|
||||
+ SMALL*mag(x)*(mag(x*(x*a() + b())) + mag(c()))
|
||||
+ SMALL*(mag(x*(x*(x*a() + b()) + c())) + mag(d()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -82,7 +82,7 @@ inline Foam::scalar Foam::linearEqn::derivative(const scalar x) const
|
||||
|
||||
inline Foam::scalar Foam::linearEqn::error(const scalar x) const
|
||||
{
|
||||
return mag(SMALL*x*a());
|
||||
return SMALL*(mag(x*a()) + mag(b()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -100,7 +100,9 @@ inline Foam::scalar Foam::quadraticEqn::derivative(const scalar x) const
|
||||
|
||||
inline Foam::scalar Foam::quadraticEqn::error(const scalar x) const
|
||||
{
|
||||
return mag(SMALL*x*(x*2*a() + b()));
|
||||
return
|
||||
SMALL*mag(x)*(mag(x*a()) + mag(b()))
|
||||
+ SMALL*(mag(x*(x*a() + b())) + mag(c()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -215,6 +215,7 @@ externalWallHeatFluxTemperatureFvPatchScalarField
|
||||
|
||||
if (qrName_ != "none")
|
||||
{
|
||||
qrPrevious_.setSize(mapper.size());
|
||||
qrPrevious_.map(ptf.qrPrevious_, mapper);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user