BUG: Corrected logFiles usage for parallel running; doc updates. Fixes #366

This commit is contained in:
Andrew Heather
2016-12-23 10:30:29 +00:00
parent 13395c17f4
commit 58b6fae81a
6 changed files with 28 additions and 24 deletions

View File

@ -59,6 +59,8 @@ void Foam::functionObjects::logFiles::resetNames(const wordList& names)
filePtrs_.clear(); filePtrs_.clear();
filePtrs_.setSize(names_.size()); filePtrs_.setSize(names_.size());
} }
createFiles();
} }

View File

@ -56,7 +56,7 @@ Usage
See also See also
Foam::functionObject Foam::functionObject
Foam::functionObjects::fvMeshFunctionObject Foam::functionObjects::fvMeshFunctionObject
Foam::functionObjects::writeFiles Foam::functionObjects::writeFile
Foam::functionObjects::timeControl Foam::functionObjects::timeControl
SourceFiles SourceFiles
@ -68,7 +68,7 @@ SourceFiles
#define functionObjects_wallHeatFlux_H #define functionObjects_wallHeatFlux_H
#include "fvMeshFunctionObject.H" #include "fvMeshFunctionObject.H"
#include "logFiles.H" #include "writeFile.H"
#include "volFieldsFwd.H" #include "volFieldsFwd.H"
#include "HashSet.H" #include "HashSet.H"

View File

@ -69,8 +69,7 @@ Usage
See also See also
Foam::functionObject Foam::functionObject
Foam::functionObjects::fvMeshFunctionObject Foam::functionObjects::fvMeshFunctionObject
Foam::functionObjects::logFiles Foam::functionObjects::writeFile
Foam::functionObjects::pressureTools
Foam::functionObjects::timeControl Foam::functionObjects::timeControl
SourceFiles SourceFiles
@ -82,7 +81,7 @@ SourceFiles
#define functionObjects_wallShearStress_H #define functionObjects_wallShearStress_H
#include "fvMeshFunctionObject.H" #include "fvMeshFunctionObject.H"
#include "logFiles.H" #include "writeFile.H"
#include "volFieldsFwd.H" #include "volFieldsFwd.H"
#include "HashSet.H" #include "HashSet.H"

View File

@ -88,24 +88,27 @@ Foam::functionObjects::cloudInfo::~cloudInfo()
bool Foam::functionObjects::cloudInfo::read(const dictionary& dict) bool Foam::functionObjects::cloudInfo::read(const dictionary& dict)
{ {
regionFunctionObject::read(dict); if (regionFunctionObject::read(dict) && logFiles::read(dict))
logFiles::resetNames(dict.lookup("clouds"));
Info<< type() << " " << name() << ": ";
if (names().size())
{ {
Info<< "applying to clouds:" << nl; logFiles::resetNames(dict.lookup("clouds"));
forAll(names(), i)
Info<< type() << " " << name() << ": ";
if (writeToFile() && names().size())
{ {
Info<< " " << names()[i] << nl; Info<< "applying to clouds:" << nl;
writeFileHeader(file(i)); forAll(names(), i)
{
Info<< " " << names()[i] << nl;
writeFileHeader(file(i));
}
Info<< endl;
} }
Info<< endl; else
} {
else Info<< "no clouds to be processed" << nl << endl;
{ }
Info<< "no clouds to be processed" << nl << endl;
return true;
} }
return true; return true;
@ -143,7 +146,7 @@ bool Foam::functionObjects::cloudInfo::write()
<< " D32 diameter : " << D32 << nl << " D32 diameter : " << D32 << nl
<< endl; << endl;
if (Pstream::master() && writeToFile()) if (writeToFile())
{ {
writeTime(file(i)); writeTime(file(i));
file(i) file(i)

View File

@ -49,7 +49,7 @@ Usage
See also See also
Foam::functionObject Foam::functionObject
Foam::functionObjects::fvMeshFunctionObject Foam::functionObjects::fvMeshFunctionObject
Foam::functionObjects::writeFiles Foam::functionObjects::writeFile
Foam::functionObjects::timeControl Foam::functionObjects::timeControl
SourceFiles SourceFiles
@ -61,7 +61,7 @@ SourceFiles
#define functionObjects_residuals_H #define functionObjects_residuals_H
#include "fvMeshFunctionObject.H" #include "fvMeshFunctionObject.H"
#include "logFiles.H" #include "writeFile.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -34,7 +34,7 @@ Description
See also See also
Foam::functionObjects::fvMeshFunctionObject Foam::functionObjects::fvMeshFunctionObject
Foam::functionObjects::volRegion Foam::functionObjects::volRegion
Foam::functionObjects::logFiles Foam::functionObjects::writeFile
SourceFiles SourceFiles
specieReactionRates.C specieReactionRates.C