snappyHexMesh::meshRefinement: clear the mesh before mapping to avoid issues with mapping the mesh flux field

This commit is contained in:
Henry Weller
2019-06-08 14:37:43 +01:00
parent 926b6a25db
commit 6eb05f8b3d
2 changed files with 6 additions and 1 deletions

View File

@ -1625,6 +1625,9 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::meshRefinement::balance
}
Pout<< endl;
}
mesh_.clearOut();
// Do actual sending/receiving of mesh
map = distributor.distribute(distribution);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -412,6 +412,8 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createBaffles
}
}
mesh_.clearOut();
// Change the mesh (no inflation, parallel sync)
autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh_, false, true);