mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: (un)refinement: combine topochange+motion. Fixes #2492
Explicitly unset the mesh.moving flag whilst doing the topo change.
This commit is contained in:
@ -458,6 +458,12 @@ Foam::dynamicRefineFvMesh::refine
|
|||||||
|
|
||||||
// Create mesh (with inflation), return map from old to new mesh.
|
// Create mesh (with inflation), return map from old to new mesh.
|
||||||
//autoPtr<mapPolyMesh> map = meshMod.changeMesh(*this, true);
|
//autoPtr<mapPolyMesh> map = meshMod.changeMesh(*this, true);
|
||||||
|
|
||||||
|
// Clear moving flag. This is currently required since geometry calculation
|
||||||
|
// might get triggered when doing processor patches.
|
||||||
|
// (TBD: should be in changeMesh if no inflation?)
|
||||||
|
moving(false);
|
||||||
|
// Create mesh (no inflation), return map from old to new mesh.
|
||||||
autoPtr<mapPolyMesh> map = meshMod.changeMesh(*this, false);
|
autoPtr<mapPolyMesh> map = meshMod.changeMesh(*this, false);
|
||||||
|
|
||||||
Info<< "Refined from "
|
Info<< "Refined from "
|
||||||
@ -575,6 +581,12 @@ Foam::dynamicRefineFvMesh::unrefine
|
|||||||
|
|
||||||
// Change mesh and generate map.
|
// Change mesh and generate map.
|
||||||
//autoPtr<mapPolyMesh> map = meshMod.changeMesh(*this, true);
|
//autoPtr<mapPolyMesh> map = meshMod.changeMesh(*this, true);
|
||||||
|
|
||||||
|
// Clear moving flag. This is currently required since geometry calculation
|
||||||
|
// might get triggered when doing processor patches.
|
||||||
|
// (TBD: should be in changeMesh if no inflation?)
|
||||||
|
moving(false);
|
||||||
|
// Create mesh (no inflation), return map from old to new mesh.
|
||||||
autoPtr<mapPolyMesh> map = meshMod.changeMesh(*this, false);
|
autoPtr<mapPolyMesh> map = meshMod.changeMesh(*this, false);
|
||||||
|
|
||||||
Info<< "Unrefined from "
|
Info<< "Unrefined from "
|
||||||
@ -1475,6 +1487,7 @@ bool Foam::dynamicRefineFvMesh::updateTopology()
|
|||||||
bool Foam::dynamicRefineFvMesh::update()
|
bool Foam::dynamicRefineFvMesh::update()
|
||||||
{
|
{
|
||||||
bool hasChanged = updateTopology();
|
bool hasChanged = updateTopology();
|
||||||
|
// Do any mesh motion (resets mesh.moving() if it does any mesh motion)
|
||||||
hasChanged = dynamicMotionSolverListFvMesh::update() && hasChanged;
|
hasChanged = dynamicMotionSolverListFvMesh::update() && hasChanged;
|
||||||
|
|
||||||
return hasChanged;
|
return hasChanged;
|
||||||
|
|||||||
@ -10,4 +10,7 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
runApplication decomposePar
|
runApplication decomposePar
|
||||||
runParallel $(getApplication)
|
runParallel $(getApplication)
|
||||||
|
|
||||||
|
runApplication reconstructParMesh
|
||||||
|
runApplication reconstructPar
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user