STYLE: use 'cloudObjects' instead of 'sprayObjects'

This commit is contained in:
Mark Olesen
2018-07-30 13:15:38 +02:00
parent dd775c6e68
commit ff26b96a80
8 changed files with 113 additions and 107 deletions

View File

@ -37,7 +37,19 @@ if (timeDirs.size() && !noLagrangian)
// Clouds require "coordinates".
// The "positions" are for v1706 and lower.
if (cloudObjs.found("coordinates") || cloudObjs.found("positions"))
// - detect and remove since these are treated specially
bool isCloud = false;
if (cloudObjs.erase("coordinates"))
{
isCloud = true;
}
if (cloudObjs.erase("positions"))
{
isCloud = true;
}
if (isCloud)
{
// Save the cloud fields on a per cloud basis
auto& fieldsPerCloud = cloudFields(cloudName);
@ -53,13 +65,6 @@ if (timeDirs.size() && !noLagrangian)
}
}
// Prune out geometry again since it gets treated specially
forAllIters(cloudFields, cloudIter)
{
cloudIter().erase("coordinates");
cloudIter().erase("positions");
}
if (Pstream::parRun())
{
Pstream::mapCombineGather(cloudFields, HashTableOps::plusEqOp<word>());