mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +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:
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user