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 0beb7e7b56
commit dd04dd9c2c
16 changed files with 38 additions and 63 deletions

View File

@ -83,7 +83,7 @@ void Foam::wallShearStress::calcShearStress
<< endl;
}
Info(log_)<< " min/max(" << pp.name() << ") = "
if (log_) Info<< " min/max(" << pp.name() << ") = "
<< minSsp << ", " << maxSsp << endl;
}
}
@ -238,7 +238,7 @@ void Foam::wallShearStress::execute()
mesh.lookupObject<volVectorField>(type())
);
Info(log_)<< type() << " " << name_ << " output:" << nl;
if (log_) Info<< type() << " " << name_ << " output:" << nl;
tmp<volSymmTensorField> Reff;
@ -258,7 +258,7 @@ void Foam::wallShearStress::execute()
}
else
{
FatalErrorIn("void Foam::wallShearStress::write()")
FatalErrorIn("void Foam::wallShearStress::execute()")
<< "Unable to find turbulence model in the "
<< "database" << exit(FatalError);
}
@ -292,7 +292,7 @@ void Foam::wallShearStress::write()
const volVectorField& wallShearStress =
obr_.lookupObject<volVectorField>(type());
Info(log_)<< type() << " " << name_ << " output:" << nl
if (log_) Info<< type() << " " << name_ << " output:" << nl
<< " writing field " << wallShearStress.name() << nl
<< endl;

View File

@ -146,7 +146,7 @@ void Foam::yPlus::execute()
mesh.lookupObject<volScalarField>(type())
);
Info(log_)<< type() << " " << name_ << " output:" << nl;
if (log_) Info<< type() << " " << name_ << " output:" << nl;
tmp<volSymmTensorField> Reff;
if (mesh.foundObject<cmpModel>(turbulenceModel::propertiesName))
@ -197,7 +197,7 @@ void Foam::yPlus::write()
const volScalarField& yPlus =
obr_.lookupObject<volScalarField>(type());
Info(log_)<< " writing field " << yPlus.name() << nl << endl;
if (log_) Info<< " writing field " << yPlus.name() << nl << endl;
yPlus.write();
}

View File

@ -72,7 +72,7 @@ void Foam::yPlus::calcYPlus
if (Pstream::master())
{
Info(log_)
if (log_) Info
<< " patch " << patch.name()
<< " y+ : min = " << minYplus << ", max = " << maxYplus
<< ", average = " << avgYplus << nl;
@ -102,7 +102,7 @@ void Foam::yPlus::calcYPlus
if (Pstream::master())
{
Info(log_)
if (log_) Info
<< " patch " << patch.name()
<< " y+ : min = " << minYplus << ", max = " << maxYplus
<< ", average = " << avgYplus << nl;