ENH: Initialise mesh demand-driven data in cloud constructor

This commit is contained in:
andy
2011-03-08 12:51:10 +00:00
parent 4998fbb2ce
commit 8c09620771

View File

@ -49,7 +49,20 @@ Foam::cloud::cloud(const objectRegistry& obr, const word& cloudName)
IOobject::AUTO_WRITE
)
)
{}
{
if (isA<polyMesh>(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<const polyMesh&>(obr);
const_cast<polyMesh&>(mesh).nGeometricD();
}
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //