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
This commit is contained in:
mattijs
2022-05-20 17:35:04 +01:00
parent daca02dfd1
commit e7fbb7e557
3 changed files with 25 additions and 0 deletions

View File

@ -606,6 +606,10 @@ void Foam::meshRefinement::markFacesOnProblemCells
const_cast<Time&>(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<label>())

View File

@ -4086,6 +4086,9 @@ void Foam::snappyLayerDriver::addLayers
pp.movePoints(mesh.points());
// Unset any moving state
mesh.moving(false);
// Update patchDisp (since not all might have been honoured)
patchDisp = oldPatchPos - pp.localPoints();
}
@ -4390,6 +4393,9 @@ void Foam::snappyLayerDriver::addLayers
pp.movePoints(mesh.points());
medialAxisMoverPtr().movePoints(mesh.points());
// Unset any moving state
mesh.moving(false);
// Grow out region of non-extrusion
for (label i = 0; i < layerParams.nGrow(); i++)
{

View File

@ -2586,6 +2586,9 @@ Foam::label Foam::snappyRefineDriver::directionalSmooth
);
baseMesh.movePoints(baseMesh.points()+disp);
// Reset any moving state
baseMesh.moving(false);
if (debug&meshRefinement::MESH)
{
const_cast<Time&>(baseMesh.time())++;
@ -2745,6 +2748,9 @@ Foam::label Foam::snappyRefineDriver::directionalSmooth
);
baseMesh.movePoints(baseMesh.points()+dispSmooth);
// Reset any moving state
baseMesh.moving(false);
if (debug&meshRefinement::MESH)
{
const_cast<Time&>(baseMesh.time())++;