diff --git a/src/OpenFOAM/db/error/messageStream.H b/src/OpenFOAM/db/error/messageStream.H index cb14af1aa3..2fcc531809 100644 --- a/src/OpenFOAM/db/error/messageStream.H +++ b/src/OpenFOAM/db/error/messageStream.H @@ -313,6 +313,11 @@ extern messageStream Info; << #var " " << var << ::Foam::endl +//- Report write to Foam::Info if the local log switch is true +#define Log \ + if (log) Info + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif diff --git a/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.C b/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.C index 47b26420b4..99ccc98f22 100644 --- a/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.C +++ b/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.C @@ -49,7 +49,7 @@ bool Foam::functionObjects::regionFunctionObject::writeObject { const regIOobject& field = obr_.lookupObject(fieldName); - if (log_) + if (log) { Info<< "functionObjects::" << type() << " " << name() << " writing field: " << field.name() << endl; @@ -109,7 +109,7 @@ Foam::functionObjects::regionFunctionObject::regionFunctionObject dict.lookupOrDefault("region", polyMesh::defaultRegion) ) ), - log_(true) + log(true) {} @@ -123,7 +123,7 @@ Foam::functionObjects::regionFunctionObject::regionFunctionObject functionObject(name), time_(obr.time()), obr_(obr), - log_(true) + log(true) {} @@ -137,7 +137,7 @@ Foam::functionObjects::regionFunctionObject::~regionFunctionObject() bool Foam::functionObjects::regionFunctionObject::read(const dictionary& dict) { - log_ = dict.lookupOrDefault("log", true); + log = dict.lookupOrDefault("log", true); return true; } diff --git a/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.H b/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.H index 427aaa84d4..dcdb7b7f44 100644 --- a/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.H +++ b/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.H @@ -72,9 +72,6 @@ protected: //- Reference to the region objectRegistry const objectRegistry& obr_; - //- Switch to send output to Info as well as to file - Switch log_; - // Protected member functions @@ -118,6 +115,9 @@ public: //- Runtime type information TypeName("regionFunctionObject"); + //- Switch write log to Info + Switch log; + // Constructors diff --git a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage.C b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage.C index 99ffbedb2c..aa457c108c 100644 --- a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage.C +++ b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage.C @@ -95,7 +95,7 @@ void Foam::functionObjects::fieldAverage::initialize() void Foam::functionObjects::fieldAverage::restart() { - if (log_) Info + Log << " Restarting averaging at time " << obr_.time().timeName() << nl << endl; @@ -134,7 +134,7 @@ void Foam::functionObjects::fieldAverage::calcAverages() periodIndex_++; } - if (log_) Info + Log << type() << " " << name() << " output:" << nl << " Calculating averages" << nl; @@ -156,13 +156,13 @@ void Foam::functionObjects::fieldAverage::calcAverages() totalTime_[fieldi] += obr_.time().deltaTValue(); } - if (log_) Info<< endl; + Log << endl; } void Foam::functionObjects::fieldAverage::writeAverages() const { - if (log_) Info<< " Writing average fields" << endl; + Log << " Writing average fields" << endl; writeFields(); writeFields(); @@ -170,7 +170,7 @@ void Foam::functionObjects::fieldAverage::writeAverages() const writeFields(); writeFields(); - if (log_) Info<< endl; + Log << endl; } @@ -200,7 +200,7 @@ void Foam::functionObjects::fieldAverage::writeAveragingProperties() const propsDict.regIOobject::write(); - if (log_) Info<< endl; + Log << endl; } @@ -212,7 +212,7 @@ void Foam::functionObjects::fieldAverage::readAveragingProperties() totalTime_.clear(); totalTime_.setSize(faItems_.size(), obr_.time().deltaTValue()); - if ((restartOnRestart_ || restartOnOutput_) && log_) + if ((restartOnRestart_ || restartOnOutput_) && log) { Info<< " Starting averaging at time " << obr_.time().timeName() << nl; @@ -232,7 +232,7 @@ void Foam::functionObjects::fieldAverage::readAveragingProperties() if (!propsDictHeader.headerOk()) { - if (log_) Info + Log << " Starting averaging at time " << obr_.time().timeName() << nl; @@ -241,7 +241,7 @@ void Foam::functionObjects::fieldAverage::readAveragingProperties() IOdictionary propsDict(propsDictHeader); - if (log_) Info<< " Restarting averaging for fields:" << nl; + Log << " Restarting averaging for fields:" << nl; forAll(faItems_, fieldi) { @@ -253,7 +253,7 @@ void Foam::functionObjects::fieldAverage::readAveragingProperties() totalIter_[fieldi] = readLabel(fieldDict.lookup("totalIter")); totalTime_[fieldi] = readScalar(fieldDict.lookup("totalTime")); - if (log_) Info + Log << " " << fieldName << " iters = " << totalIter_[fieldi] << " time = " << totalTime_[fieldi] << nl; @@ -302,7 +302,7 @@ bool Foam::functionObjects::fieldAverage::read(const dictionary& dict) initialised_ = false; - if (log_) Info<< type() << " " << name() << ":" << nl; + Log << type() << " " << name() << ":" << nl; dict.readIfPresent("restartOnRestart", restartOnRestart_); dict.readIfPresent("restartOnOutput", restartOnOutput_); @@ -316,7 +316,7 @@ bool Foam::functionObjects::fieldAverage::read(const dictionary& dict) readAveragingProperties(); - if (log_) Info<< endl; + Log << endl; return true; } diff --git a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverageTemplates.C b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverageTemplates.C index 8ab915cb65..87da1e3cb1 100644 --- a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverageTemplates.C +++ b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverageTemplates.C @@ -36,7 +36,7 @@ void Foam::functionObjects::fieldAverage::addMeanFieldType(const label fieldi) const word& fieldName = faItems_[fieldi].fieldName(); const word& meanFieldName = faItems_[fieldi].meanFieldName(); - if (log_) Info<< " Reading/initialising field " << meanFieldName << endl; + Log << " Reading/initialising field " << meanFieldName << endl; if (obr_.foundObject(meanFieldName)) { @@ -44,8 +44,7 @@ void Foam::functionObjects::fieldAverage::addMeanFieldType(const label fieldi) } else if (obr_.found(meanFieldName)) { - if (log_) Info - << " Cannot allocate average field " << meanFieldName + Log << " Cannot allocate average field " << meanFieldName << " since an object with that name already exists." << " Disabling averaging for field." << endl; @@ -112,8 +111,7 @@ void Foam::functionObjects::fieldAverage::addPrime2MeanFieldType const word& meanFieldName = faItems_[fieldi].meanFieldName(); const word& prime2MeanFieldName = faItems_[fieldi].prime2MeanFieldName(); - if (log_) Info - << " Reading/initialising field " << prime2MeanFieldName << nl; + Log << " Reading/initialising field " << prime2MeanFieldName << nl; if (obr_.foundObject(prime2MeanFieldName)) { @@ -121,8 +119,7 @@ void Foam::functionObjects::fieldAverage::addPrime2MeanFieldType } else if (obr_.found(prime2MeanFieldName)) { - if (log_) Info - << " Cannot allocate average field " << prime2MeanFieldName + Log << " Cannot allocate average field " << prime2MeanFieldName << " since an object with that name already exists." << " Disabling averaging for field." << nl; diff --git a/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C b/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C index 1a529262a5..8fb7e66f1c 100644 --- a/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C +++ b/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C @@ -60,8 +60,7 @@ fieldCoordinateSystemTransform { read(dict); - if (log_) Info - << type() << " " << name << ":" << nl + Log << type() << " " << name << ":" << nl << " Applying transformation from global Cartesian to local " << coordSys_ << nl << endl; } diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C index ec0d25ad14..320a9abcf7 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C +++ b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C @@ -151,7 +151,7 @@ bool Foam::functionObjects::fieldMinMax::write(const bool postProcess) writeFiles::write(); if (!location_) writeTime(file()); - if (log_) Info<< type() << " " << name() << " output:" << nl; + Log << type() << " " << name() << " output:" << nl; forAll(fieldSet_, fieldi) { @@ -163,7 +163,7 @@ bool Foam::functionObjects::fieldMinMax::write(const bool postProcess) } if (!location_) file()<< endl; - if (log_) Info<< endl; + Log << endl; return true; } diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C index 744f2061ea..397b4fad4d 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C +++ b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C @@ -67,34 +67,31 @@ void Foam::functionObjects::fieldMinMax::output file<< endl; - if (log_) Info - << " min(" << outputName << ") = " << minValue + Log << " min(" << outputName << ") = " << minValue << " at location " << minC; if (Pstream::parRun()) { - if (log_) Info<< " on processor " << minProci; + Log << " on processor " << minProci; } - if (log_) Info - << nl << " max(" << outputName << ") = " << maxValue + Log << nl << " max(" << outputName << ") = " << maxValue << " at location " << maxC; if (Pstream::parRun()) { - if (log_) Info<< " on processor " << maxProci; + Log << " on processor " << maxProci; } } else { file<< token::TAB << minValue << token::TAB << maxValue; - if (log_) Info - << " min/max(" << outputName << ") = " + Log << " min/max(" << outputName << ") = " << minValue << ' ' << maxValue; } - if (log_) Info<< endl; + Log << endl; } diff --git a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C index b4fa182049..f6e1d15f9c 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C +++ b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C @@ -294,7 +294,7 @@ bool Foam::functionObjects::fieldValues::cellSource::write { file() << tab << volume_; } - if (log_) Info<< " total volume = " << volume_ << endl; + Log << " total volume = " << volume_ << endl; } forAll(fields_, i) @@ -322,7 +322,7 @@ bool Foam::functionObjects::fieldValues::cellSource::write file()<< endl; } - if (log_) Info<< endl; + Log << endl; return true; } diff --git a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceTemplates.C b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceTemplates.C index 4bb2dad28c..3e753d037f 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceTemplates.C +++ b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceTemplates.C @@ -205,7 +205,7 @@ bool Foam::functionObjects::fieldValues::cellSource::writeValues file()<< tab << result; - if (log_) Info<< " " << operationTypeNames_[operation_] + Log << " " << operationTypeNames_[operation_] << "(" << sourceName_ << ") of " << fieldName << " = " << result << endl; } diff --git a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C index 3800b55455..4859c8074b 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C +++ b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C @@ -744,7 +744,7 @@ bool Foam::functionObjects::fieldValues::faceSource::write { file() << tab << totalArea_; } - if (log_) Info<< " total area = " << totalArea_ << endl; + Log << " total area = " << totalArea_ << endl; } // construct weight field. Note: zero size means weight = 1 @@ -791,7 +791,7 @@ bool Foam::functionObjects::fieldValues::faceSource::write file()<< endl; } - if (log_) Info<< endl; + Log << endl; return true; } diff --git a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C index a5047f249c..2eee473061 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C +++ b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C @@ -344,7 +344,7 @@ bool Foam::functionObjects::fieldValues::faceSource::writeValues file()<< tab << result; - if (log_) Info<< " " << operationTypeNames_[operation_] + Log << " " << operationTypeNames_[operation_] << "(" << sourceName_ << ") of " << fieldName << " = " << result << endl; } diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C b/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C index 602e143fd4..4aed8b0aed 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C +++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C @@ -110,7 +110,7 @@ bool Foam::functionObjects::fieldValue::write(const bool postProcess) { writeFiles::write(); - if (log_) Info<< type() << " " << name() << " output:" << nl; + Log << type() << " " << name() << " output:" << nl; return true; } diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C index c0f78798a8..2e2e3d96b6 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C +++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C @@ -179,7 +179,7 @@ bool Foam::functionObjects::fieldValues::fieldValueDelta::write writeTime(file()); } - if (log_) Info<< type() << " " << name() << " output:" << endl; + Log << type() << " " << name() << " output:" << endl; bool found = false; processFields(found); @@ -193,16 +193,13 @@ bool Foam::functionObjects::fieldValues::fieldValueDelta::write file()<< endl; } - if (log_) + if (!found) { - if (!found) - { - Info<< " none" << endl; - } - else - { - Info<< endl; - } + Log << " none" << endl; + } + else + { + Log << endl; } return true; diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDeltaTemplates.C b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDeltaTemplates.C index 075e26f52a..ed4163e80a 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDeltaTemplates.C +++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDeltaTemplates.C @@ -110,7 +110,7 @@ void Foam::functionObjects::fieldValues::fieldValueDelta::processFields Type result = applyOperation(r1, r2); - if (log_) Info<< " " << operationTypeNames_[operation_] + Log << " " << operationTypeNames_[operation_] << "(" << fieldName << ") = " << result << endl; diff --git a/src/postProcessing/functionObjects/field/histogram/histogram.C b/src/postProcessing/functionObjects/field/histogram/histogram.C index d0e4d812b6..a568efcb0c 100644 --- a/src/postProcessing/functionObjects/field/histogram/histogram.C +++ b/src/postProcessing/functionObjects/field/histogram/histogram.C @@ -57,8 +57,7 @@ void Foam::functionObjects::histogram::writeGraph outputPath/formatterPtr_().getFileName(coords, fieldNames) ); - if (log_) Info - << " Writing histogram of " << fieldName + Log << " Writing histogram of " << fieldName << " to " << graphFile.name() << endl; List yPtrs(1); @@ -118,18 +117,18 @@ bool Foam::functionObjects::histogram::execute(const bool postProcess) bool Foam::functionObjects::histogram::write(const bool postProcess) { - if (log_) Info<< type() << " " << name() << " output:" << nl; + Log << type() << " " << name() << " output:" << nl; const fvMesh& mesh = refCast(obr_); autoPtr fieldPtr; if (obr_.foundObject(fieldName_)) { - if (log_) Info<< " Looking up field " << fieldName_ << endl; + Log << " Looking up field " << fieldName_ << endl; } else { - if (log_) Info<< " Reading field " << fieldName_ << endl; + Log << " Reading field " << fieldName_ << endl; fieldPtr.reset ( new volScalarField diff --git a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C index 8360147cf2..0ecb7cee93 100644 --- a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C +++ b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C @@ -276,7 +276,7 @@ bool Foam::functionObjects::nearWallFields::read(const dictionary& dict) reverseFieldMap_.insert(sampleFldName, fldName); } - if (log_) Info << type() << " " << name() + Log << type() << " " << name() << ": Sampling " << fieldMap_.size() << " fields" << endl; // Do analysis @@ -300,7 +300,7 @@ bool Foam::functionObjects::nearWallFields::execute(const bool postProcess) && vtf_.empty() ) { - if (log_) Info<< type() << " " << name() + Log << type() << " " << name() << ": Creating " << fieldMap_.size() << " fields" << endl; createFields(vsf_); @@ -309,10 +309,10 @@ bool Foam::functionObjects::nearWallFields::execute(const bool postProcess) createFields(vSymmtf_); createFields(vtf_); - if (log_) Info<< endl; + Log << endl; } - if (log_) Info<< type() << " " << name() + Log << type() << " " << name() << " output:" << nl << " Sampling fields to " << time_.timeName() << endl; @@ -331,7 +331,7 @@ bool Foam::functionObjects::nearWallFields::write(const bool postProcess) { DebugInFunction << endl; - if (log_) Info<< " Writing sampled fields to " << time_.timeName() + Log << " Writing sampled fields to " << time_.timeName() << endl; forAll(vsf_, i) @@ -355,7 +355,7 @@ bool Foam::functionObjects::nearWallFields::write(const bool postProcess) vtf_[i].write(); } - if (log_) Info<< endl; + Log << endl; return true; } diff --git a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C index 64dc5575f7..e2ed65c70a 100644 --- a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C +++ b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C @@ -47,7 +47,7 @@ void Foam::functionObjects::nearWallFields::createFields if (obr_.found(sampleFldName)) { - if (log_) Info<< " a field " << sampleFldName + Log << " a field " << sampleFldName << " already exists on the mesh." << endl; } @@ -63,7 +63,7 @@ void Foam::functionObjects::nearWallFields::createFields sflds.set(sz, new VolFieldType(io, fld)); - if (log_) Info<< " created " << sflds[sz].name() + Log << " created " << sflds[sz].name() << " to sample " << fld.name() << endl; } } diff --git a/src/postProcessing/functionObjects/field/readFields/readFieldsTemplates.C b/src/postProcessing/functionObjects/field/readFields/readFieldsTemplates.C index 499f8676fa..238b995ee7 100644 --- a/src/postProcessing/functionObjects/field/readFields/readFieldsTemplates.C +++ b/src/postProcessing/functionObjects/field/readFields/readFieldsTemplates.C @@ -71,7 +71,7 @@ void Foam::functionObjects::readFields::loadField ) { // Store field locally - if (log_) Info<< " Reading " << fieldName << endl; + Log << " Reading " << fieldName << endl; label sz = vflds.size(); vflds.setSize(sz+1); @@ -84,7 +84,7 @@ void Foam::functionObjects::readFields::loadField ) { // Store field locally - if (log_) Info<< " Reading " << fieldName << endl; + Log << " Reading " << fieldName << endl; label sz = sflds.size(); sflds.setSize(sz+1); diff --git a/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C index 0e23bcc86a..6846c0c9b7 100644 --- a/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C +++ b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C @@ -208,7 +208,7 @@ bool Foam::functionObjects::forceCoeffs::write(const bool postProcess) << tab << Cm << tab << Cd << tab << Cl << tab << Clf << tab << Clr << endl; - if (log_) Info<< type() << " " << name() << " output:" << nl + Log << type() << " " << name() << " output:" << nl << " Cm = " << Cm << nl << " Cd = " << Cd << nl << " Cl = " << Cl << nl @@ -240,7 +240,7 @@ bool Foam::functionObjects::forceCoeffs::write(const bool postProcess) file(1) << endl; } - if (log_) Info<< endl; + Log << endl; } return true; diff --git a/src/postProcessing/functionObjects/forces/forces/forces.C b/src/postProcessing/functionObjects/forces/forces/forces.C index b81bb6ec14..a08915ca4e 100644 --- a/src/postProcessing/functionObjects/forces/forces/forces.C +++ b/src/postProcessing/functionObjects/forces/forces/forces.C @@ -393,8 +393,7 @@ void Foam::functionObjects::forces::applyBins void Foam::functionObjects::forces::writeForces() { - if (log_) Info - << type() << " " << name() << " output:" << nl + Log << type() << " " << name() << " output:" << nl << " sum of forces:" << nl << " pressure : " << sum(force_[0]) << nl << " viscous : " << sum(force_[1]) << nl @@ -612,7 +611,7 @@ bool Foam::functionObjects::forces::read(const dictionary& dict) initialised_ = false; - if (log_) Info<< type() << " " << name() << ":" << nl; + Log << type() << " " << name() << ":" << nl; directForceDensity_ = dict.lookupOrDefault("directForceDensity", false); @@ -653,11 +652,11 @@ bool Foam::functionObjects::forces::read(const dictionary& dict) dict.readIfPresent("porosity", porosity_); if (porosity_) { - if (log_) Info<< " Including porosity effects" << endl; + Log << " Including porosity effects" << endl; } else { - if (log_) Info<< " Not including porosity effects" << endl; + Log << " Not including porosity effects" << endl; } if (dict.found("binData")) @@ -908,7 +907,7 @@ bool Foam::functionObjects::forces::write(const bool postProcess) writeBins(); - if (log_) Info<< endl; + Log << endl; } return true; diff --git a/src/postProcessing/functionObjects/forces/wallShearStress/wallShearStress.C b/src/postProcessing/functionObjects/forces/wallShearStress/wallShearStress.C index e86266f20b..0fbc1003cb 100644 --- a/src/postProcessing/functionObjects/forces/wallShearStress/wallShearStress.C +++ b/src/postProcessing/functionObjects/forces/wallShearStress/wallShearStress.C @@ -88,7 +88,7 @@ void Foam::functionObjects::wallShearStress::calcShearStress << endl; } - if (log_) Info<< " min/max(" << pp.name() << ") = " + Log << " min/max(" << pp.name() << ") = " << minSsp << ", " << maxSsp << endl; } } @@ -222,7 +222,7 @@ bool Foam::functionObjects::wallShearStress::execute(const bool postProcess) mesh.lookupObject(type()) ); - if (log_) Info<< type() << " " << name() << " output:" << nl; + Log << type() << " " << name() << " output:" << nl; tmp Reff; @@ -260,7 +260,7 @@ bool Foam::functionObjects::wallShearStress::write(const bool postProcess) const volVectorField& wallShearStress = obr_.lookupObject(type()); - if (log_) Info<< type() << " " << name() << " output:" << nl + Log << type() << " " << name() << " output:" << nl << " writing field " << wallShearStress.name() << nl << endl; diff --git a/src/postProcessing/functionObjects/utilities/yPlus/yPlus.C b/src/postProcessing/functionObjects/utilities/yPlus/yPlus.C index d02936e1f4..18f38e7646 100644 --- a/src/postProcessing/functionObjects/utilities/yPlus/yPlus.C +++ b/src/postProcessing/functionObjects/utilities/yPlus/yPlus.C @@ -106,8 +106,7 @@ void Foam::functionObjects::yPlus::calcYPlus if (Pstream::master()) { - if (log_) Info - << " patch " << patch.name() + Log << " patch " << patch.name() << " y+ : min = " << minYplus << ", max = " << maxYplus << ", average = " << avgYplus << nl; @@ -137,8 +136,7 @@ void Foam::functionObjects::yPlus::calcYPlus if (Pstream::master()) { - if (log_) Info - << " patch " << patch.name() + Log << " patch " << patch.name() << " y+ : min = " << minYplus << ", max = " << maxYplus << ", average = " << avgYplus << nl; @@ -227,7 +225,7 @@ bool Foam::functionObjects::yPlus::execute(const bool postProcess) mesh.lookupObject(type()) ); - if (log_) Info<< type() << " " << name() << " output:" << nl; + Log << type() << " " << name() << " output:" << nl; if (mesh.foundObject(turbulenceModel::propertiesName)) { @@ -254,7 +252,7 @@ bool Foam::functionObjects::yPlus::write(const bool postProcess) const volScalarField& yPlus = obr_.lookupObject(type()); - if (log_) Info<< " writing field " << yPlus.name() << endl; + Log << " writing field " << yPlus.name() << endl; yPlus.write();