diff --git a/src/OpenFOAM/fields/cloud/cloud.C b/src/OpenFOAM/fields/cloud/cloud.C index 40eb070bcd..2bf9a518a4 100644 --- a/src/OpenFOAM/fields/cloud/cloud.C +++ b/src/OpenFOAM/fields/cloud/cloud.C @@ -49,7 +49,20 @@ Foam::cloud::cloud(const objectRegistry& obr, const word& cloudName) IOobject::AUTO_WRITE ) ) -{} +{ + if (isA(obr)) + { + if (debug) + { + Pout<< "cloud: Initialising polyMesh nGeometricD" << endl; + } + + // initialise mesh dimensions - needed for parallel runs + // due to lazy evaluation of valid mesh dimensions + const polyMesh& mesh = dynamic_cast(obr); + const_cast(mesh).nGeometricD(); + } +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //