Change variable name to be different from min and max

This commit is contained in:
Hrvoje Jasak 2019-08-10 17:55:53 +01:00
parent 3164a80459
commit 8b49921bf9
2 changed files with 18 additions and 14 deletions

View file

@ -209,8 +209,8 @@ void Foam::sixDOFqODE::constrainTranslation(vector& vec) const
void Foam::sixDOFqODE::aitkensRelaxation
(
const scalar min,
const scalar max
const scalar minRelFactor,
const scalar maxRelFactor
)
{
// Calculate translational relax factor
@ -228,17 +228,17 @@ void Foam::sixDOFqODE::aitkensRelaxation
}
else
{
relaxFactorT_ = min;
relaxFactorT_ = minRelFactor;
}
// Bound the relaxation factor for stability
if (relaxFactorT_ > max)
if (relaxFactorT_ > maxRelFactor)
{
relaxFactorT_ = max;
relaxFactorT_ = maxRelFactor;
}
else if (relaxFactorT_ < min)
else if (relaxFactorT_ < minRelFactor)
{
relaxFactorT_ = min;
relaxFactorT_ = minRelFactor;
}
// Calculate rotational relax factor
@ -259,17 +259,17 @@ void Foam::sixDOFqODE::aitkensRelaxation
}
else
{
relaxFactorR_ = min;
relaxFactorR_ = minRelFactor;
}
// Bound the relaxation factor for stability
if(relaxFactorR_ > max)
if(relaxFactorR_ > maxRelFactor)
{
relaxFactorR_ = max;
relaxFactorR_ = maxRelFactor;
}
else if(relaxFactorR_ < min)
else if(relaxFactorR_ < minRelFactor)
{
relaxFactorR_ = min;
relaxFactorR_ = minRelFactor;
}
}

View file

@ -233,7 +233,11 @@ class sixDOFqODE
void constrainTranslation(vector& vec) const;
//- Update Aitkens relaxation parameters
void aitkensRelaxation(const scalar min, const scalar max);
void aitkensRelaxation
(
const scalar minRelFactor,
const scalar maxRelFactor
);
public: