mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STY: Formatting log output for stabilityBlendingFactor
This commit is contained in:
@ -63,7 +63,7 @@ void Foam::functionObjects::stabilityBlendingFactor::writeFileHeader
|
|||||||
|
|
||||||
bool Foam::functionObjects::stabilityBlendingFactor::calc()
|
bool Foam::functionObjects::stabilityBlendingFactor::calc()
|
||||||
{
|
{
|
||||||
init(true);
|
init(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,6 +140,14 @@ bool Foam::functionObjects::stabilityBlendingFactor::init(bool first)
|
|||||||
|
|
||||||
if (nonOrthogonality_)
|
if (nonOrthogonality_)
|
||||||
{
|
{
|
||||||
|
if (maxNonOrthogonality_ >= minNonOrthogonality_)
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< " minNonOrthogonality should be larger than "
|
||||||
|
<< "maxNonOrthogonality."
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
indicator_ =
|
indicator_ =
|
||||||
max
|
max
|
||||||
(
|
(
|
||||||
@ -156,7 +164,7 @@ bool Foam::functionObjects::stabilityBlendingFactor::init(bool first)
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (log)
|
if (first)
|
||||||
{
|
{
|
||||||
Log << " Max non-orthogonality : " << max(*nonOrthPtr).value()
|
Log << " Max non-orthogonality : " << max(*nonOrthPtr).value()
|
||||||
<< endl;
|
<< endl;
|
||||||
@ -168,6 +176,13 @@ bool Foam::functionObjects::stabilityBlendingFactor::init(bool first)
|
|||||||
|
|
||||||
if (skewness_)
|
if (skewness_)
|
||||||
{
|
{
|
||||||
|
if (maxSkewness_ >= minSkewness_)
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< " minSkewness should be larger than maxSkewness."
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
indicator_ =
|
indicator_ =
|
||||||
max
|
max
|
||||||
(
|
(
|
||||||
@ -184,7 +199,7 @@ bool Foam::functionObjects::stabilityBlendingFactor::init(bool first)
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (log)
|
if (first)
|
||||||
{
|
{
|
||||||
Log << " Max skewness : " << max(*skewnessPtr).value()
|
Log << " Max skewness : " << max(*skewnessPtr).value()
|
||||||
<< endl;
|
<< endl;
|
||||||
@ -196,6 +211,13 @@ bool Foam::functionObjects::stabilityBlendingFactor::init(bool first)
|
|||||||
|
|
||||||
if (faceWeight_)
|
if (faceWeight_)
|
||||||
{
|
{
|
||||||
|
if (maxFaceWeight_ >= minFaceWeight_)
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< " minFaceWeight should be larger than maxFaceWeight."
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
indicator_ =
|
indicator_ =
|
||||||
max
|
max
|
||||||
(
|
(
|
||||||
@ -212,7 +234,7 @@ bool Foam::functionObjects::stabilityBlendingFactor::init(bool first)
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (log)
|
if (first)
|
||||||
{
|
{
|
||||||
Log << " Min face weight: " << min(*faceWeightsPtr).value()
|
Log << " Min face weight: " << min(*faceWeightsPtr).value()
|
||||||
<< endl;
|
<< endl;
|
||||||
@ -222,6 +244,13 @@ bool Foam::functionObjects::stabilityBlendingFactor::init(bool first)
|
|||||||
|
|
||||||
if (gradCc_)
|
if (gradCc_)
|
||||||
{
|
{
|
||||||
|
if (maxGradCc_ >= minGradCc_)
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< " minGradCc should be larger than maxGradCc."
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
tmp<volScalarField> magGradCCPtr
|
tmp<volScalarField> magGradCCPtr
|
||||||
(
|
(
|
||||||
new volScalarField
|
new volScalarField
|
||||||
@ -262,7 +291,7 @@ bool Foam::functionObjects::stabilityBlendingFactor::init(bool first)
|
|||||||
magGradCCPtr.ref() += mag(fvc::grad(cci)).ref();
|
magGradCCPtr.ref() += mag(fvc::grad(cci)).ref();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (log)
|
if (first)
|
||||||
{
|
{
|
||||||
Log << " Max magGradCc : " << max(magGradCCPtr.ref()).value()
|
Log << " Max magGradCc : " << max(magGradCCPtr.ref()).value()
|
||||||
<< endl;
|
<< endl;
|
||||||
@ -328,14 +357,14 @@ bool Foam::functionObjects::stabilityBlendingFactor::init(bool first)
|
|||||||
min(max(scalar(0), (Co - Co1_)/(Co2_ - Co1_)), scalar(1))
|
min(max(scalar(0), (Co - Co1_)/(Co2_ - Co1_)), scalar(1))
|
||||||
);
|
);
|
||||||
|
|
||||||
if (log)
|
if (first)
|
||||||
{
|
{
|
||||||
Log << " Max Co : " << max(Co).value()
|
Log << " Max Co : " << max(Co).value()
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (log)
|
if (first)
|
||||||
{
|
{
|
||||||
Log << nl;
|
Log << nl;
|
||||||
}
|
}
|
||||||
@ -555,7 +584,7 @@ Foam::functionObjects::stabilityBlendingFactor::stabilityBlendingFactor
|
|||||||
|
|
||||||
init(true);
|
init(true);
|
||||||
|
|
||||||
writeFileHeader(file());
|
writeFileHeader(file());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -679,7 +708,7 @@ bool Foam::functionObjects::stabilityBlendingFactor::write()
|
|||||||
reduce(nCellsScheme2, sumOp<label>());
|
reduce(nCellsScheme2, sumOp<label>());
|
||||||
reduce(nCellsBlended, sumOp<label>());
|
reduce(nCellsBlended, sumOp<label>());
|
||||||
|
|
||||||
Log << nl << type() << " : " << nl
|
Log << nl << type() << " execute :" << nl
|
||||||
<< " scheme 1 cells : " << nCellsScheme1 << nl
|
<< " scheme 1 cells : " << nCellsScheme1 << nl
|
||||||
<< " scheme 2 cells : " << nCellsScheme2 << nl
|
<< " scheme 2 cells : " << nCellsScheme2 << nl
|
||||||
<< " blended cells : " << nCellsBlended << nl
|
<< " blended cells : " << nCellsBlended << nl
|
||||||
|
|||||||
Reference in New Issue
Block a user