ENH: Silencing particle tracking warnings by default.

This commit is contained in:
graham
2011-03-04 14:06:07 +00:00
parent a9d0a6d02b
commit 77644def7a
2 changed files with 23 additions and 17 deletions

View File

@ -334,11 +334,14 @@ void Foam::Cloud<ParticleType>::move(TrackData& td, const scalar trackTime)
}
}
reduce(nTrackingRescues_, sumOp<label>());
if (nTrackingRescues_ > 0)
if (cloud::debug)
{
Info<< nTrackingRescues_ << " tracking rescue corrections" << endl;
reduce(nTrackingRescues_, sumOp<label>());
if (nTrackingRescues_ > 0)
{
Info<< nTrackingRescues_ << " tracking rescue corrections" << endl;
}
}
}

View File

@ -784,23 +784,26 @@ inline void Foam::particle::initCellFacePt()
<< position_ << abort(FatalError);
}
WarningIn("void Foam::particle::initCellFacePt()")
<< "Particle moved from " << position_
<< " to " << newPosition
<< " in cell " << cellI_
<< " tetFace " << tetFaceI_
<< " tetPt " << tetPtI_ << nl
<< " (A fraction of "
<< 1.0 - mag(cC - newPosition)/mag(cC - position_)
<< " of the distance to the cell centre)"
<< " because a decomposition tetFace and tetPt "
<< "could not be found."
<< endl;
if (debug)
{
WarningIn("void Foam::particle::initCellFacePt()")
<< "Particle moved from " << position_
<< " to " << newPosition
<< " in cell " << cellI_
<< " tetFace " << tetFaceI_
<< " tetPt " << tetPtI_ << nl
<< " (A fraction of "
<< 1.0 - mag(cC - newPosition)/mag(cC - position_)
<< " of the distance to the cell centre)"
<< " because a decomposition tetFace and tetPt "
<< "could not be found."
<< endl;
}
position_ = newPosition;
}
if (cellI_ != oldCellI)
if (debug && cellI_ != oldCellI)
{
WarningIn("void Foam::particle::initCellFacePt()")
<< "Particle at position " << position_