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:
Henry
2015-05-18 11:54:56 +01:00
parent f6c679f79b
commit d9090fcf42
16 changed files with 38 additions and 63 deletions

View File

@ -227,7 +227,7 @@ void Foam::forceCoeffs::write()
<< obr_.time().value() << tab << Cm << tab << Cd
<< tab << Cl << tab << Clf << tab << Clr << endl;
Info(log_)<< type() << " " << name_ << " output:" << nl
if (log_) Info<< type() << " " << name_ << " output:" << nl
<< " Cm = " << Cm << nl
<< " Cd = " << Cd << nl
<< " Cl = " << Cl << nl
@ -259,7 +259,7 @@ void Foam::forceCoeffs::write()
file(1) << endl;
}
Info(log_)<< endl;
if (log_) Info<< endl;
}
}

View File

@ -390,7 +390,7 @@ void Foam::forces::applyBins
void Foam::forces::writeForces()
{
Info(log_)
if (log_) Info
<< type() << " " << name_ << " output:" << nl
<< " sum of forces:" << nl
<< " pressure : " << sum(force_[0]) << nl
@ -639,7 +639,7 @@ void Foam::forces::read(const dictionary& dict)
log_ = dict.lookupOrDefault<Switch>("log", false);
Info(log_)<< type() << " " << name_ << ":" << nl;
if (log_) Info<< type() << " " << name_ << ":" << nl;
directForceDensity_ = dict.lookupOrDefault("directForceDensity", false);
@ -680,11 +680,11 @@ void Foam::forces::read(const dictionary& dict)
dict.readIfPresent("porosity", porosity_);
if (porosity_)
{
Info(log_)<< " Including porosity effects" << endl;
if (log_) Info<< " Including porosity effects" << endl;
}
else
{
Info(log_)<< " Not including porosity effects" << endl;
if (log_) Info<< " Not including porosity effects" << endl;
}
if (dict.found("binData"))
@ -801,7 +801,7 @@ void Foam::forces::write()
writeBins();
Info(log_)<< endl;
if (log_) Info<< endl;
}
}