From e7fbb7e55749c5ebaf526d287c38282c1957f49d Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 20 May 2022 17:35:04 +0100 Subject: [PATCH] BUG: snappyHexMesh: unset moving flag. Fixes #2477 We want to use movePoints to update all the geometry but do not want to have a meshPhi --- .../meshRefinement/meshRefinementProblemCells.C | 13 +++++++++++++ .../snappyHexMeshDriver/snappyLayerDriver.C | 6 ++++++ .../snappyHexMeshDriver/snappyRefineDriver.C | 6 ++++++ 3 files changed, 25 insertions(+) diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C index fa541ba8a6..3581ac263c 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C @@ -606,6 +606,10 @@ void Foam::meshRefinement::markFacesOnProblemCells const_cast(mesh_.time())++; pointField oldPoints(mesh_.points()); mesh_.movePoints(newPoints); + + // Unset any moving state + mesh_.moving(false); + Pout<< "Writing newPoints mesh to time " << timeName() << endl; write @@ -615,6 +619,9 @@ void Foam::meshRefinement::markFacesOnProblemCells mesh_.time().path()/"newPoints" ); mesh_.movePoints(oldPoints); + + // Unset any moving state + mesh_.moving(false); } } @@ -1122,6 +1129,9 @@ void Foam::meshRefinement::markFacesOnProblemCellsGeometric ); mesh_.movePoints(newPoints); + + // Unset any moving state + mesh_.moving(false); } @@ -1259,6 +1269,9 @@ void Foam::meshRefinement::markFacesOnProblemCellsGeometric // Restore points. mesh_.movePoints(oldPoints); + // Unset any moving state + mesh_.moving(false); + Info<< "markFacesOnProblemCellsGeometric : marked " << returnReduce(nBaffleFaces, sumOp