Skip to content
Snippets Groups Projects
Commit 63d07c9e authored by Mark OLESEN's avatar Mark OLESEN
Browse files

ENH: adjust AMI information for better log processing (issue #860)

- now report as  "min = XX max = YY average = ZZ"
  instead of as  "min/max/average = XX, YY, ZZ"

  this makes it easier to parse any particular value
  (eg, with foamLog)
parent c611bd6f
No related branches found
No related tags found
No related merge requests found
...@@ -63,4 +63,6 @@ alpha1Min/Min\(alpha1\) =/Min(alpha1) = ...@@ -63,4 +63,6 @@ alpha1Min/Min\(alpha1\) =/Min(alpha1) =
alpha1Max/Max\(alpha1\) =/Max(alpha1) = alpha1Max/Max\(alpha1\) =/Max(alpha1) =
# AMI # AMI
AMIMin/AMI: Patch source sum/average = AMIMin/AMI: Patch source sum/min =
AMIMax/AMI: Patch source sum/max =
AMIAvg/AMI: Patch source sum/average =
...@@ -223,10 +223,10 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::normaliseWeights ...@@ -223,10 +223,10 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::normaliseWeights
{ {
Info<< indent Info<< indent
<< "AMI: Patch " << patchName << "AMI: Patch " << patchName
<< " sum(weights) min/max/average = " << " sum(weights)"
<< gMin(wghtSum) << ", " << " min = " << gMin(wghtSum)
<< gMax(wghtSum) << ", " << " max = " << gMax(wghtSum)
<< gAverage(wghtSum) << endl; << " average = " << gAverage(wghtSum) << nl;
const label nLow = returnReduce(nLowWeight, sumOp<label>()); const label nLow = returnReduce(nLowWeight, sumOp<label>());
......
...@@ -98,7 +98,7 @@ void Foam::cyclicACMIPolyPatch::resetAMI ...@@ -98,7 +98,7 @@ void Foam::cyclicACMIPolyPatch::resetAMI
const_cast<AMIPatchToPatchInterpolation&>(this->AMI()); const_cast<AMIPatchToPatchInterpolation&>(this->AMI());
// Output some stats. AMIInterpolation will have already output the // Output some stats. AMIInterpolation will have already output the
// average weights ("sum(weights) min/max/average = 1, 1, 1") // average weights ("sum(weights) min = 1 max = 1 average = 1")
{ {
const scalarField& wghtsSum = AMI.srcWeightsSum(); const scalarField& wghtsSum = AMI.srcWeightsSum();
......
...@@ -547,12 +547,12 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI ...@@ -547,12 +547,12 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
if (nFace) if (nFace)
{ {
scalarField srcWghtSum(size(), 0); scalarField srcWghtSum(size(), Zero);
forAll(srcWghtSum, faceI) forAll(srcWghtSum, faceI)
{ {
srcWghtSum[faceI] = sum(AMIPtr_->srcWeights()[faceI]); srcWghtSum[faceI] = sum(AMIPtr_->srcWeights()[faceI]);
} }
scalarField tgtWghtSum(neighbPatch().size(), 0); scalarField tgtWghtSum(neighbPatch().size(), Zero);
forAll(tgtWghtSum, faceI) forAll(tgtWghtSum, faceI)
{ {
tgtWghtSum[faceI] = sum(AMIPtr_->tgtWeights()[faceI]); tgtWghtSum[faceI] = sum(AMIPtr_->tgtWeights()[faceI]);
...@@ -560,16 +560,16 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI ...@@ -560,16 +560,16 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
Info<< indent Info<< indent
<< "AMI: Patch " << name() << "AMI: Patch " << name()
<< " sum(weights) min/max/average = " << " sum(weights)"
<< gMin(srcWghtSum) << ", " << " min = " << gMin(srcWghtSum)
<< gMax(srcWghtSum) << ", " << " max = " << gMax(srcWghtSum)
<< gAverage(srcWghtSum) << endl; << " average = " << gAverage(srcWghtSum) << nl;
Info<< indent Info<< indent
<< "AMI: Patch " << neighbPatch().name() << "AMI: Patch " << neighbPatch().name()
<< " sum(weights) min/max/average = " << " sum(weights)"
<< gMin(tgtWghtSum) << ", " << " min = " << gMin(tgtWghtSum)
<< gMax(tgtWghtSum) << ", " << " max = " << gMax(tgtWghtSum)
<< gAverage(tgtWghtSum) << endl; << " average = " << gAverage(tgtWghtSum) << nl;
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment