mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use clamp/clamp_range instead of max(min(..., upper), lower)
This commit is contained in:
@ -1,14 +1,5 @@
|
||||
{
|
||||
alphav =
|
||||
max
|
||||
(
|
||||
min
|
||||
(
|
||||
(rho - rholSat)/(rhovSat - rholSat),
|
||||
scalar(1)
|
||||
),
|
||||
scalar(0)
|
||||
);
|
||||
alphav = clamp((rho - rholSat)/(rhovSat - rholSat), zero_one{});
|
||||
alphal = 1.0 - alphav;
|
||||
|
||||
Info<< "max-min alphav: " << max(alphav).value()
|
||||
|
||||
@ -108,7 +108,7 @@ void setAlpha
|
||||
{
|
||||
cutCell.calcSubCell(cellI, 0.0);
|
||||
|
||||
alpha1[cellI] = max(min(cutCell.VolumeOfFluid(), 1), 0);
|
||||
alpha1[cellI] = clamp(cutCell.VolumeOfFluid(), 0, 1);
|
||||
|
||||
if (writeOBJ && (mag(cutCell.faceArea()) >= 1e-14))
|
||||
{
|
||||
|
||||
@ -149,7 +149,7 @@ Type Foam::uniformInterpolationTable<Type>::interpolate(scalar x) const
|
||||
{
|
||||
if (bound_)
|
||||
{
|
||||
x = max(min(xMax() - SMALL*dx_, x), x0_);
|
||||
x = clamp(x, x0_, (xMax() - SMALL*dx_));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -100,7 +100,7 @@ protected:
|
||||
//- that forms the basis of many more complex ramp functions
|
||||
inline scalar linearRamp(const scalar t) const
|
||||
{
|
||||
return max(min((t - start_)/duration_, 1), 0);
|
||||
return clamp((t - start_)/duration_, 0, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -310,7 +310,7 @@ tmp<volScalarField::Internal> kOmegaSSTLM<BasicTurbulenceModel>::ReThetat0
|
||||
}
|
||||
|
||||
lambda = sqr(thetat)/nu[celli]*dUsds[celli];
|
||||
lambda = max(min(lambda, 0.1), -0.1);
|
||||
lambda = clamp(lambda, -0.1, 0.1);
|
||||
|
||||
lambdaErr = mag(lambda - lambda0);
|
||||
|
||||
|
||||
@ -109,13 +109,13 @@ void Foam::combustionModels::EDC<ReactionThermo>::correct()
|
||||
const scalar nu = mu[i]/(rho[i] + SMALL);
|
||||
|
||||
const scalar Da =
|
||||
max(min(sqrt(nu/(epsilon[i] + SMALL))/tc[i], 10), 1e-10);
|
||||
clamp(sqrt(nu/(epsilon[i] + SMALL))/tc[i], 1e-10, 10);
|
||||
|
||||
const scalar ReT = sqr(k[i])/(nu*epsilon[i] + SMALL);
|
||||
const scalar CtauI = min(C1_/(Da*sqrt(ReT + 1)), 2.1377);
|
||||
|
||||
const scalar CgammaI =
|
||||
max(min(C2_*sqrt(Da*(ReT + 1)), 5), 0.4082);
|
||||
clamp(C2_*sqrt(Da*(ReT + 1)), 0.4082, 5);
|
||||
|
||||
const scalar gammaL =
|
||||
CgammaI*pow025(nu*epsilon[i]/(sqr(k[i]) + SMALL));
|
||||
|
||||
@ -80,7 +80,7 @@
|
||||
);
|
||||
dimensionedScalar AkEst = gSum(mgb*mesh.V().field());
|
||||
|
||||
StCorr.value() = max(min((Ak/AkEst).value(), 10.0), 1.0);
|
||||
StCorr.value() = clamp((Ak/AkEst).value(), 1, 10);
|
||||
|
||||
Info<< "StCorr = " << StCorr.value() << endl;
|
||||
}
|
||||
|
||||
@ -249,9 +249,6 @@ void Foam::activeBaffleVelocityFvPatchVectorField::updateCoeffs()
|
||||
}
|
||||
|
||||
openFraction_ =
|
||||
max
|
||||
(
|
||||
min
|
||||
(
|
||||
openFraction_
|
||||
+ min
|
||||
@ -259,12 +256,11 @@ void Foam::activeBaffleVelocityFvPatchVectorField::updateCoeffs()
|
||||
this->db().time().deltaTValue()/openingTime_,
|
||||
maxOpenFractionDelta_
|
||||
)
|
||||
*(orientation_*sign(forceDiff)),
|
||||
1 - 1e-6
|
||||
),
|
||||
1e-6
|
||||
*(orientation_*sign(forceDiff))
|
||||
);
|
||||
|
||||
openFraction_ = clamp(openFraction_, 1e-6, 1 - 1e-6);
|
||||
|
||||
Info<< "openFraction = " << openFraction_ << endl;
|
||||
|
||||
vectorField::subField Sfw = this->patch().patch().faceAreas();
|
||||
|
||||
@ -299,27 +299,18 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs()
|
||||
if (mag(valueDiff) > mag(minThresholdValue_) || baffleActivated_)
|
||||
{
|
||||
openFraction_ =
|
||||
max
|
||||
(
|
||||
min
|
||||
(
|
||||
openFraction_
|
||||
+ min
|
||||
(
|
||||
this->db().time().deltaT().value()/openingTime_,
|
||||
maxOpenFractionDelta_
|
||||
),
|
||||
1 - 1e-6
|
||||
),
|
||||
1e-6
|
||||
)
|
||||
);
|
||||
|
||||
baffleActivated_ = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
openFraction_ = max(min(1 - 1e-6, openFraction_), 1e-6);
|
||||
}
|
||||
openFraction_ = clamp(openFraction_, 1e-6, 1 - 1e-6);
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
|
||||
@ -148,9 +148,9 @@ void Foam::phaseHydrostaticPressureFvPatchScalarField::updateCoeffs()
|
||||
meshObjects::gravity::New(db().time());
|
||||
|
||||
// scalar rhor = 1000;
|
||||
// scalarField alphap1 = max(min(alphap, scalar(1)), scalar(0));
|
||||
// scalarField alphap1 = clamp(alphap, zero_one{});
|
||||
// valueFraction() = alphap1/(alphap1 + rhor*(1.0 - alphap1));
|
||||
valueFraction() = max(min(alphap, scalar(1)), scalar(0));
|
||||
valueFraction() = clamp(alphap, zero_one{});
|
||||
|
||||
refValue() =
|
||||
pRefValue_
|
||||
|
||||
@ -512,23 +512,12 @@ void Foam::averageNeighbourFvGeometryScheme::makeNonOrthoWeights
|
||||
scalarField& faceWeights
|
||||
) const
|
||||
{
|
||||
cosAngles =
|
||||
max
|
||||
cosAngles = clamp
|
||||
(
|
||||
scalar(0),
|
||||
min
|
||||
(
|
||||
scalar(1),
|
||||
polyMeshTools::faceOrthogonality
|
||||
(
|
||||
mesh_,
|
||||
faceNormals,
|
||||
cellCentres
|
||||
)
|
||||
)
|
||||
polyMeshTools::faceOrthogonality(mesh_, faceNormals, cellCentres),
|
||||
zero_one{}
|
||||
);
|
||||
|
||||
|
||||
// Make weight: 0 for ortho faces, 1 for 90degrees non-ortho
|
||||
//const scalarField faceWeights(scalar(1)-cosAngles);
|
||||
faceWeights.setSize(cosAngles.size());
|
||||
|
||||
@ -192,16 +192,7 @@ void Foam::highAspectRatioFvGeometryScheme::calcAspectRatioWeights
|
||||
delta = SMALL;
|
||||
}
|
||||
|
||||
cellWeight =
|
||||
max
|
||||
(
|
||||
scalar(0),
|
||||
min
|
||||
(
|
||||
scalar(1),
|
||||
(aratio-minAspect_)/delta
|
||||
)
|
||||
);
|
||||
cellWeight = clamp((aratio-minAspect_)/delta, zero_one{});
|
||||
|
||||
faceWeight.setSize(mesh_.nFaces());
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ public:
|
||||
faceFlux, phiP, phiN, gradcP, gradcN, d
|
||||
);
|
||||
|
||||
return max(min(min(2*r, 0.5*r + 0.5), 2), 0);
|
||||
return clamp(min(2*r, 0.5*r + 0.5), 0, 2);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ public:
|
||||
faceFlux, phiP, phiN, gradcP, gradcN, d
|
||||
);
|
||||
|
||||
return max(min(r, 1), 0);
|
||||
return clamp(r, 0, 1);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -107,7 +107,7 @@ public:
|
||||
((faceFlux - phiU)/stabilise(phiCD - phiU, SMALL) + k_);
|
||||
|
||||
// Limit the limiter between upwind and central
|
||||
return max(min(PLimiter, 1), 0);
|
||||
return clamp(PLimiter, 0, 1);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ public:
|
||||
scalar QLimiter = (phif - phiU)/stabilise(phiCD - phiU, SMALL);
|
||||
|
||||
// Limit the limiter between upwind and downwind
|
||||
return max(min(QLimiter, 2), 0);
|
||||
return clamp(QLimiter, 0, 2);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -99,7 +99,7 @@ public:
|
||||
scalar QLimiter = (phif - phiU)/stabilise(phiCD - phiU, SMALL);
|
||||
|
||||
// Limit the limiter between upwind and downwind
|
||||
return max(min(QLimiter, 2), 0);
|
||||
return clamp(QLimiter, 0, 2);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -93,7 +93,7 @@ public:
|
||||
/(max(mag(dcP), mag(dcN)) + SMALL);
|
||||
|
||||
// Limit the limiter between linear and 20% upwind
|
||||
return max(min(limiter, 1), 0.8);
|
||||
return clamp(limiter, 0.8, 1);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -141,7 +141,7 @@ public:
|
||||
}
|
||||
|
||||
// Limit the limiter between linear and upwind
|
||||
return max(min(limiter, 1), 0);
|
||||
return clamp(limiter, 0, 1);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -143,7 +143,7 @@ public:
|
||||
}
|
||||
|
||||
// Limit the limiter between linear and upwind
|
||||
return max(min(limiter, 1), 0);
|
||||
return clamp(limiter, 0, 1);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -108,7 +108,7 @@ public:
|
||||
scalar limiter = 1 - k_*(dN - df)*(dP - df)/max(sqr(dN + dP), SMALL);
|
||||
|
||||
// Limit the limiter between linear and upwind
|
||||
return max(min(limiter, 1), 0);
|
||||
return clamp(limiter, 0, 1);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -110,7 +110,7 @@ public:
|
||||
scalar limiter = 1 - k_*(dN - df)*(dP - df)/max(sqr(dN + dP), SMALL);
|
||||
|
||||
// Limit the limiter between linear and upwind
|
||||
return max(min(limiter, 1), 0);
|
||||
return clamp(limiter, 0, 1);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -124,11 +124,11 @@ public:
|
||||
cubicLimiter = twor;
|
||||
}
|
||||
|
||||
return max(min(cubicLimiter, 2), 0);
|
||||
return clamp(cubicLimiter, 0, 2);
|
||||
*/
|
||||
|
||||
// Limit the limiter to obey the TVD constraint
|
||||
return max(min(min(twor, cubicLimiter), 2), 0);
|
||||
return clamp(min(twor, cubicLimiter), 0, 2);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -122,7 +122,7 @@ public:
|
||||
(fVphif - fVphiU)/stabilise(fVphiCD - fVphiU, SMALL);
|
||||
|
||||
// Limit the limiter to obey the TVD constraint
|
||||
return max(min(min(twor, cubicLimiter), 2), 0);
|
||||
return clamp(min(twor, cubicLimiter), 0, 2);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -97,7 +97,7 @@ public:
|
||||
faceFlux, phiP, phiN, gradcP, gradcN, d
|
||||
);
|
||||
|
||||
return max(min(twoByk_*r, 1), 0);
|
||||
return clamp(twoByk_*r, 0, 1);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ Description
|
||||
face-based Courant number and the lower and upper Courant number limits
|
||||
supplied:
|
||||
\f[
|
||||
weight = 1 - max(min((Co - Co1)/(Co2 - Co1), 1), 0)
|
||||
weight = 1 - clamp((Co - Co1)/(Co2 - Co1), 0, 1)
|
||||
\f]
|
||||
where
|
||||
\vartable
|
||||
@ -222,18 +222,14 @@ public:
|
||||
(
|
||||
vf.name() + "BlendingFactor",
|
||||
scalar(1)
|
||||
- max
|
||||
(
|
||||
min
|
||||
- clamp
|
||||
(
|
||||
(
|
||||
mesh.time().deltaT()*mesh.deltaCoeffs()
|
||||
*mag(tUflux)/mesh.magSf()
|
||||
- Co1_
|
||||
)/(Co2_ - Co1_),
|
||||
scalar(1)
|
||||
),
|
||||
scalar(0)
|
||||
zero_one{}
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@ -253,14 +253,10 @@ public:
|
||||
(
|
||||
vf.name() + "BlendingFactor",
|
||||
scalar(1)
|
||||
- max
|
||||
(
|
||||
min
|
||||
- clamp
|
||||
(
|
||||
(fvc::interpolate(Co) - Co1_)/(Co2_ - Co1_),
|
||||
scalar(1)
|
||||
),
|
||||
scalar(0)
|
||||
zero_one{}
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@ -58,25 +58,24 @@ class clippedLinear
|
||||
:
|
||||
public surfaceInterpolationScheme<Type>
|
||||
{
|
||||
// Private data
|
||||
// Private Data
|
||||
|
||||
const scalar cellSizeRatio_;
|
||||
scalar wfLimit_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
void calcWfLimit()
|
||||
static scalar calcWfLimit(scalar cellSizeRatio)
|
||||
{
|
||||
if (cellSizeRatio_ <= 0 || cellSizeRatio_ > 1)
|
||||
if (cellSizeRatio <= 0 || cellSizeRatio > 1)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Given cellSizeRatio of " << cellSizeRatio_
|
||||
<< "Given cellSizeRatio of " << cellSizeRatio
|
||||
<< " is not between 0 and 1"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
wfLimit_ = cellSizeRatio_/(1.0 + cellSizeRatio_);
|
||||
return cellSizeRatio/(1.0 + cellSizeRatio);
|
||||
}
|
||||
|
||||
|
||||
@ -96,19 +95,15 @@ public:
|
||||
clippedLinear(const fvMesh& mesh, const scalar cellSizeRatio)
|
||||
:
|
||||
surfaceInterpolationScheme<Type>(mesh),
|
||||
cellSizeRatio_(cellSizeRatio)
|
||||
{
|
||||
calcWfLimit();
|
||||
}
|
||||
wfLimit_(calcWfLimit(cellSizeRatio))
|
||||
{}
|
||||
|
||||
//- Construct from Istream
|
||||
clippedLinear(const fvMesh& mesh, Istream& is)
|
||||
:
|
||||
surfaceInterpolationScheme<Type>(mesh),
|
||||
cellSizeRatio_(readScalar(is))
|
||||
{
|
||||
calcWfLimit();
|
||||
}
|
||||
wfLimit_(calcWfLimit(readScalar(is)))
|
||||
{}
|
||||
|
||||
//- Construct from faceFlux and Istream
|
||||
clippedLinear
|
||||
@ -119,10 +114,8 @@ public:
|
||||
)
|
||||
:
|
||||
surfaceInterpolationScheme<Type>(mesh),
|
||||
cellSizeRatio_(readScalar(is))
|
||||
{
|
||||
calcWfLimit();
|
||||
}
|
||||
wfLimit_(calcWfLimit(readScalar(is)))
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -141,6 +134,8 @@ public:
|
||||
);
|
||||
const surfaceScalarField& cdWeights = tcdWeights();
|
||||
|
||||
const scalarMinMax bounds(wfLimit_, 1 - wfLimit_);
|
||||
|
||||
tmp<surfaceScalarField> tclippedLinearWeights
|
||||
(
|
||||
new surfaceScalarField
|
||||
@ -159,7 +154,7 @@ public:
|
||||
tclippedLinearWeights.ref();
|
||||
|
||||
clippedLinearWeights.primitiveFieldRef() =
|
||||
max(min(cdWeights.primitiveField(), 1 - wfLimit_), wfLimit_);
|
||||
clamp(cdWeights.primitiveField(), bounds);
|
||||
|
||||
surfaceScalarField::Boundary& clwbf =
|
||||
clippedLinearWeights.boundaryFieldRef();
|
||||
@ -169,15 +164,7 @@ public:
|
||||
if (clwbf[patchi].coupled())
|
||||
{
|
||||
clwbf[patchi] =
|
||||
max
|
||||
(
|
||||
min
|
||||
(
|
||||
cdWeights.boundaryField()[patchi],
|
||||
1 - wfLimit_
|
||||
),
|
||||
wfLimit_
|
||||
);
|
||||
clamp(cdWeights.boundaryField()[patchi], bounds);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -131,7 +131,7 @@ bool Foam::ETAB<CloudType>::update
|
||||
scalar phic = y1/a;
|
||||
|
||||
// constrain phic within -1 to 1
|
||||
phic = max(min(phic, 1), -1);
|
||||
phic = clamp(phic, -1, 1);
|
||||
|
||||
scalar phit = acos(phic);
|
||||
scalar phi = phit;
|
||||
|
||||
@ -143,7 +143,7 @@ bool Foam::TAB<CloudType>::update
|
||||
scalar phic = y1/a;
|
||||
|
||||
// constrain phic within -1 to 1
|
||||
phic = max(min(phic, 1), -1);
|
||||
phic = clamp(phic, -1, 1);
|
||||
|
||||
scalar phit = acos(phic);
|
||||
scalar phi = phit;
|
||||
|
||||
@ -167,7 +167,7 @@ void Foam::lineSearch::reset()
|
||||
// step_ = 2*(oldMeritValue_-prevMeritValue_)/directionalDeriv_;
|
||||
// Interpolate in order to get same improvement with the previous
|
||||
// optimisation cycle
|
||||
step_ = max(min(step_*prevMeritDeriv_/directionalDeriv_, 1.), minStep_);
|
||||
step_ = clamp(step_*prevMeritDeriv_/directionalDeriv_, minStep_, 1);
|
||||
Info<< "\n------- Computing initial step-------" << endl;
|
||||
Info<< "old dphi(0) " << prevMeritDeriv_ << endl;
|
||||
Info<< "dphi(0) " << directionalDeriv_ << endl;
|
||||
|
||||
@ -617,7 +617,7 @@ void Foam::MassTransferPhaseSystem<BasePhaseSystem>::alphaTransfer
|
||||
scalar dmdt21 = dmdtNet[celli];
|
||||
scalar coeffs12Cell = coeffs12[celli];
|
||||
|
||||
scalar alpha1Limited = max(min(alpha1[celli], 1.0), 0.0);
|
||||
scalar alpha1Limited = clamp(alpha1[celli], 0, 1);
|
||||
|
||||
// exp.
|
||||
SuPhase1[celli] += coeffs1[celli]*dmdt21;
|
||||
@ -660,7 +660,7 @@ void Foam::MassTransferPhaseSystem<BasePhaseSystem>::alphaTransfer
|
||||
scalar dmdt12 = -dmdtNet[celli];
|
||||
scalar coeffs21Cell = -coeffs12[celli];
|
||||
|
||||
scalar alpha2Limited = max(min(alpha2[celli], 1.0), 0.0);
|
||||
scalar alpha2Limited = clamp(alpha2[celli], 0, 1);
|
||||
|
||||
// exp
|
||||
SuPhase2[celli] += coeffs2[celli]*dmdt12;
|
||||
|
||||
@ -75,7 +75,7 @@ Foam::wallBoilingModels::TDNBModels::Shirai::TDNB
|
||||
{
|
||||
tmp<scalarField> tp = liquid.thermo().p().boundaryField()[patchi];
|
||||
|
||||
const scalarField pRatio(max(min(tp/Pc_, scalar(1)), scalar(0)));
|
||||
const scalarField pRatio(clamp(tp/Pc_, zero_one{}));
|
||||
|
||||
return
|
||||
(
|
||||
|
||||
@ -78,7 +78,11 @@ TolubinskiKostanchuk::dDeparture
|
||||
const scalarField& L
|
||||
) const
|
||||
{
|
||||
return max(min(dRef_*exp(-(Tsatw - Tl)/scalar(45)), dMax_), dMin_);
|
||||
return clamp
|
||||
(
|
||||
dRef_*exp(-(Tsatw - Tl)/scalar(45)),
|
||||
scalarMinMax(dMin_, dMax_)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -148,7 +148,7 @@ tmp<scalarField> curvatureSeparation::calcCosAngle
|
||||
volCosAngle.write();
|
||||
}
|
||||
|
||||
return max(min(cosAngle, scalar(1)), scalar(-1));
|
||||
return clamp(cosAngle, scalarMinMax(-1, 1));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -215,7 +215,7 @@ tmp<scalarField> curvatureSeparation::calcCosAngle
|
||||
volCosAngle.write();
|
||||
}
|
||||
|
||||
return max(min(cosAngle, scalar(1)), scalar(-1));
|
||||
return clamp(cosAngle, scalarMinMax(-1, 1));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -279,7 +279,7 @@ void Foam::reconstruction::plicRDF::calcResidual
|
||||
if (mag(normal) != 0 && j != 0)
|
||||
{
|
||||
vector n = normal/mag(normal);
|
||||
scalar cosAngle = max(min((cellNormal & n), 1), -1);
|
||||
scalar cosAngle = clamp((cellNormal & n), -1, 1);
|
||||
avgDiffNormal += acos(cosAngle) * mag(normal);
|
||||
weight += mag(normal);
|
||||
if (cosAngle < maxDiffNormal)
|
||||
|
||||
@ -133,11 +133,8 @@ void Foam::alphaContactAngleTwoPhaseFvPatchScalarField::evaluate
|
||||
gradient() =
|
||||
patch().deltaCoeffs()
|
||||
*(
|
||||
max(min
|
||||
(
|
||||
*this + gradient()/patch().deltaCoeffs(),
|
||||
scalar(1)), scalar(0)
|
||||
) - *this
|
||||
clamp(*this + gradient()/patch().deltaCoeffs(), zero_one{})
|
||||
- *this
|
||||
);
|
||||
}
|
||||
else if (limit_ == lcZeroGradient)
|
||||
@ -149,7 +146,7 @@ void Foam::alphaContactAngleTwoPhaseFvPatchScalarField::evaluate
|
||||
|
||||
if (limit_ == lcAlpha)
|
||||
{
|
||||
scalarField::operator=(max(min(*this, scalar(1)), scalar(0)));
|
||||
scalarField::operator=(clamp(*this, zero_one{}));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user