mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
@ -148,6 +148,11 @@ Foam::binModel::binModel
|
||||
|
||||
bool Foam::binModel::read(const dictionary& dict)
|
||||
{
|
||||
if (!functionObjects::writeFile::read(dict))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
patchSet_ = mesh_.boundaryMesh().patchSet(dict.get<wordRes>("patches"));
|
||||
fieldNames_ = dict.get<wordHashSet>("fields").sortedToc();
|
||||
|
||||
|
||||
@ -104,7 +104,7 @@ bool Foam::binModels::singleDirectionUniformBin::processField
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Pstream::master() && !writtenHeader_)
|
||||
if (writeToFile() && !writtenHeader_)
|
||||
{
|
||||
writeFileHeader<Type>(filePtrs_[fieldi]);
|
||||
}
|
||||
@ -183,7 +183,12 @@ bool Foam::binModels::singleDirectionUniformBin::processField
|
||||
}
|
||||
}
|
||||
|
||||
if (Pstream::master())
|
||||
for (auto& binList : data)
|
||||
{
|
||||
reduce(binList, sumOp<List<Type>>());
|
||||
}
|
||||
|
||||
if (writeToFile())
|
||||
{
|
||||
writeBinnedData(data, filePtrs_[fieldi]);
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ bool Foam::binModels::uniformBin::processField(const label fieldi)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Pstream::master() && !writtenHeader_)
|
||||
if (writeToFile() && !writtenHeader_)
|
||||
{
|
||||
writeFileHeader<Type>(filePtrs_[fieldi]);
|
||||
}
|
||||
@ -166,7 +166,12 @@ bool Foam::binModels::uniformBin::processField(const label fieldi)
|
||||
}
|
||||
}
|
||||
|
||||
if (Pstream::master())
|
||||
for (auto& binList : data)
|
||||
{
|
||||
reduce(binList, sumOp<List<Type>>());
|
||||
}
|
||||
|
||||
if (writeToFile())
|
||||
{
|
||||
writeBinnedData(data, filePtrs_[fieldi]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user