mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use 'cloudObjects' instead of 'sprayObjects'
This commit is contained in:
@ -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>());
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2017-2018 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -55,17 +55,19 @@ vtkSmartPointer<vtkPolyData> Foam::vtkPVFoam::lagrangianVTKMesh
|
||||
}
|
||||
|
||||
|
||||
// the region name is already in the mesh db
|
||||
IOobjectList sprayObjs
|
||||
// The region name is already in the mesh db
|
||||
IOobjectList cloudObjects
|
||||
(
|
||||
mesh,
|
||||
mesh.time().timeName(),
|
||||
cloud::prefix/cloudName
|
||||
);
|
||||
|
||||
IOobject* positionsPtr = sprayObjs.lookup(word("positions"));
|
||||
IOobject* coordinatesPtr = sprayObjs.lookup(word("coordinates"));
|
||||
if (positionsPtr || coordinatesPtr)
|
||||
if
|
||||
(
|
||||
cloudObjects.found("positions")
|
||||
|| cloudObjects.found("coordinates")
|
||||
)
|
||||
{
|
||||
Cloud<passiveParticle> parcels(mesh, cloudName, false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user