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

This commit is contained in:
Henry Weller
2020-01-03 22:33:20 +00:00
parent e9df0c6302
commit 833cc87498

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-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -958,6 +958,8 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::mergeBaffles
}
}
mesh_.clearOut();
// Change the mesh (no inflation)
autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh_, false, true);
@ -2767,6 +2769,8 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::dupNonManifoldPoints
// Insert changes into meshMod
pointDuplicator.setRefinement(regionSide, meshMod);
mesh_.clearOut();
// Change the mesh (no inflation, parallel sync)
autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh_, false, true);
@ -3399,6 +3403,8 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify
}
}
mesh_.clearOut();
// Change the mesh (no inflation, parallel sync)
autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh_, false, true);