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_.setSize(names_.size());
}
createFiles();
}

View File

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

View File

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

View File

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

View File

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

View File

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