ENH: Triggering oldCellCentres calculation in Clouds

This commit is contained in:
sergio
2020-08-28 08:18:16 -07:00
committed by Andrew Heather
parent 9a39481062
commit 8427eccd00
2 changed files with 6 additions and 1 deletions

View File

@ -85,6 +85,7 @@ Foam::Cloud<ParticleType>::Cloud
geometryType_(cloud::geometryType::COORDINATES)
{
checkPatches();
polyMesh_.oldCellCentres();
// Ask for the tetBasePtIs to trigger all processors to build
// them, otherwise, if some processors have no particles then
@ -174,7 +175,7 @@ void Foam::Cloud<ParticleType>::move
// Initialise the stepFraction moved for the particles
forAllIters(*this, pIter)
{
pIter().stepFraction() = 0;
pIter().reset();
}
// List of lists of particles to be transferred for all of the
@ -360,6 +361,7 @@ void Foam::Cloud<ParticleType>::autoMap(const mapPolyMesh& mapper)
// them, otherwise, if some processors have no particles then
// there is a comms mismatch.
polyMesh_.tetBasePtIs();
polyMesh_.oldCellCentres();
const vectorField& positions = globalPositionsPtr_();

View File

@ -177,6 +177,9 @@ Foam::Cloud<ParticleType>::Cloud
{
checkPatches();
polyMesh_.tetBasePtIs();
polyMesh_.oldCellCentres();
initCloud(checkClass);
}