mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
messageStream: Remove confusing argument-based conditional output
This had been used in functionObjects:
Info(log)<< "messages" << data << ....
in which it is not at all clear what the "log" argument does whereas
if (log) Info<< "messages" << data << ....
is totally clear and more efficient.
This commit is contained in:
@ -174,12 +174,8 @@ void Foam::fieldMinMax::write()
|
||||
{
|
||||
functionObjectFile::write();
|
||||
|
||||
if (!location_)
|
||||
{
|
||||
file()<< obr_.time().value();
|
||||
}
|
||||
|
||||
Info(log_)<< type() << " " << name_ << " output:" << nl;
|
||||
if (!location_) file()<< obr_.time().value();
|
||||
if (log_) Info<< type() << " " << name_ << " output:" << nl;
|
||||
|
||||
forAll(fieldSet_, fieldI)
|
||||
{
|
||||
@ -190,12 +186,8 @@ void Foam::fieldMinMax::write()
|
||||
calcMinMaxFields<tensor>(fieldSet_[fieldI], mode_);
|
||||
}
|
||||
|
||||
if (!location_)
|
||||
{
|
||||
file()<< endl;
|
||||
}
|
||||
|
||||
Info(log_)<< endl;
|
||||
if (!location_) file()<< endl;
|
||||
if (log_) Info<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -67,34 +67,34 @@ void Foam::fieldMinMax::output
|
||||
|
||||
file<< endl;
|
||||
|
||||
Info(log_)
|
||||
if (log_) Info
|
||||
<< " min(" << outputName << ") = " << minValue
|
||||
<< " at location " << minC;
|
||||
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
Info(log_)<< " on processor " << minProcI;
|
||||
if (log_) Info<< " on processor " << minProcI;
|
||||
}
|
||||
|
||||
Info(log_)
|
||||
if (log_) Info
|
||||
<< nl << " max(" << outputName << ") = " << maxValue
|
||||
<< " at location " << maxC;
|
||||
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
Info(log_)<< " on processor " << maxProcI;
|
||||
if (log_) Info<< " on processor " << maxProcI;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
file<< token::TAB << minValue << token::TAB << maxValue;
|
||||
|
||||
Info(log_)
|
||||
if (log_) Info
|
||||
<< " min/max(" << outputName << ") = "
|
||||
<< minValue << ' ' << maxValue;
|
||||
}
|
||||
|
||||
Info(log_)<< endl;
|
||||
if (log_) Info<< endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -245,7 +245,7 @@ void Foam::fieldValues::cellSource::write()
|
||||
{
|
||||
file() << tab << volume_;
|
||||
}
|
||||
Info(log_)<< " total volume = " << volume_ << endl;
|
||||
if (log_) Info<< " total volume = " << volume_ << endl;
|
||||
}
|
||||
|
||||
forAll(fields_, i)
|
||||
@ -273,7 +273,7 @@ void Foam::fieldValues::cellSource::write()
|
||||
file()<< endl;
|
||||
}
|
||||
|
||||
Info(log_)<< endl;
|
||||
if (log_) Info<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -205,7 +205,7 @@ bool Foam::fieldValues::cellSource::writeValues(const word& fieldName)
|
||||
|
||||
file()<< tab << result;
|
||||
|
||||
Info(log_)<< " " << operationTypeNames_[operation_]
|
||||
if (log_) Info<< " " << operationTypeNames_[operation_]
|
||||
<< "(" << sourceName_ << ") of " << fieldName
|
||||
<< " = " << result << endl;
|
||||
}
|
||||
|
||||
@ -701,7 +701,7 @@ void Foam::fieldValues::faceSource::write()
|
||||
{
|
||||
file() << tab << totalArea_;
|
||||
}
|
||||
Info(log_)<< " total area = " << totalArea_ << endl;
|
||||
if (log_) Info<< " total area = " << totalArea_ << endl;
|
||||
}
|
||||
|
||||
// construct weight field. Note: zero size means weight = 1
|
||||
@ -748,7 +748,7 @@ void Foam::fieldValues::faceSource::write()
|
||||
file()<< endl;
|
||||
}
|
||||
|
||||
Info(log_)<< endl;
|
||||
if (log_) Info<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -353,7 +353,7 @@ bool Foam::fieldValues::faceSource::writeValues
|
||||
|
||||
file()<< tab << result;
|
||||
|
||||
Info(log_)<< " " << operationTypeNames_[operation_]
|
||||
if (log_) Info<< " " << operationTypeNames_[operation_]
|
||||
<< "(" << sourceName_ << ") of " << fieldName
|
||||
<< " = " << result << endl;
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ void Foam::fieldValue::write()
|
||||
{
|
||||
functionObjectFile::write();
|
||||
|
||||
Info(log_)<< type() << " " << name_ << " output:" << nl;
|
||||
if (log_) Info<< type() << " " << name_ << " output:" << nl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -158,7 +158,7 @@ void Foam::fieldValues::fieldValueDelta::write()
|
||||
file()<< obr_.time().value();
|
||||
}
|
||||
|
||||
Info(log_)<< type() << " " << name_ << " output:" << endl;
|
||||
if (log_) Info<< type() << " " << name_ << " output:" << endl;
|
||||
|
||||
bool found = false;
|
||||
processFields<scalar>(found);
|
||||
|
||||
@ -114,7 +114,7 @@ void Foam::fieldValues::fieldValueDelta::processFields(bool& found)
|
||||
|
||||
Type result = applyOperation(r1, r2);
|
||||
|
||||
Info(log_)<< " " << operationTypeNames_[operation_]
|
||||
if (log_) Info<< " " << operationTypeNames_[operation_]
|
||||
<< "(" << fieldName << ") = " << result
|
||||
<< endl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user