mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: parallel blocking writing surface noise output (fixes #2663)
- old logic (v2206 and earlier) always disabled writing on non-master, but other parts of the code were more recently updated to use lazy evaluation of surface data (with parallel communication) - now retain full write/no-write logic identically on all ranks. Take care of master/non-master at the final output stage.
This commit is contained in:
@ -157,30 +157,28 @@ namespace Foam
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::noiseModel::readWriteOption
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Get bool option (eg, read/write) and provide Info feedback
|
||||
static void readWriteOption
|
||||
(
|
||||
const dictionary& dict,
|
||||
const word& lookup,
|
||||
bool& option
|
||||
) const
|
||||
)
|
||||
{
|
||||
dict.readIfPresent(lookup, option);
|
||||
|
||||
// Only writing on the master process
|
||||
option = option && Pstream::master();
|
||||
|
||||
if (option)
|
||||
{
|
||||
Info<< " " << lookup << ": " << "yes" << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< " " << lookup << ": " << "no" << endl;
|
||||
}
|
||||
Info<< " " << lookup << ": " << (option ? "yes" : "no") << endl;
|
||||
}
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||
|
||||
Foam::scalar Foam::noiseModel::checkUniformTimeStep
|
||||
(
|
||||
@ -255,7 +253,7 @@ void Foam::noiseModel::writeFileHeader
|
||||
Ostream& os,
|
||||
const string& x,
|
||||
const string& y,
|
||||
const List<Tuple2<string, token>>& headerValues
|
||||
const UList<Tuple2<string, token>>& headerValues
|
||||
) const
|
||||
{
|
||||
writeHeader(os, x + " vs " + y);
|
||||
|
||||
Reference in New Issue
Block a user