diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C index 2424630c75..ac506bde4f 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C @@ -1335,8 +1335,6 @@ void Foam::polyMesh::setPoints(const pointField& newPoints) meshObject::movePoints(*this); meshObject::movePoints(*this); - - const_cast(time()).functionObjects().movePoints(*this); } @@ -1415,9 +1413,6 @@ Foam::tmp Foam::polyMesh::movePoints meshObject::movePoints(*this); meshObject::movePoints(*this); - const_cast(time()).functionObjects().movePoints(*this); - - if (debug && moveError) { // Write mesh to ease debugging. Note we want to avoid calling diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C b/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C index b5125336b8..0afb71f7e5 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C @@ -122,8 +122,6 @@ void Foam::polyMesh::topoChange(const polyTopoChangeMap& map) // Reset valid directions (could change by faces put into empty patches) geometricD_ = Zero; solutionD_ = Zero; - - const_cast(time()).functionObjects().topoChange(map); } @@ -131,8 +129,6 @@ void Foam::polyMesh::mapMesh(const polyMeshMap& map) { meshObject::mapMesh(*this, map); meshObject::mapMesh(*this, map); - - const_cast(time()).functionObjects().mapMesh(map); } diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C index cb667371dd..30c536b272 100644 --- a/src/finiteVolume/fvMesh/fvMesh.C +++ b/src/finiteVolume/fvMesh/fvMesh.C @@ -1021,6 +1021,8 @@ void Foam::fvMesh::setPoints(const pointField& p) meshObject::movePoints(*this); meshObject::movePoints(*this); + + const_cast(time()).functionObjects().movePoints(*this); } @@ -1104,6 +1106,8 @@ Foam::tmp Foam::fvMesh::movePoints(const pointField& p) meshObject::movePoints(*this); meshObject::movePoints(*this); + const_cast(time()).functionObjects().movePoints(*this); + return tsweptVols; } @@ -1202,6 +1206,8 @@ void Foam::fvMesh::topoChange(const polyTopoChangeMap& map) meshObject::topoChange(*this, map); meshObject::topoChange(*this, map); + const_cast(time()).functionObjects().topoChange(map); + if (topoChanger_.valid()) { topoChanger_->topoChange(map); @@ -1236,6 +1242,8 @@ void Foam::fvMesh::mapMesh(const polyMeshMap& map) meshObject::mapMesh(*this, map); meshObject::mapMesh(*this, map); + const_cast(time()).functionObjects().mapMesh(map); + topoChanger_->mapMesh(map); distributor_->mapMesh(map); mover_->mapMesh(map); diff --git a/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C b/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C index ac5d4e58e6..efc824304e 100644 --- a/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C +++ b/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C @@ -836,7 +836,7 @@ void Foam::functionObjects::fieldValues::surfaceFieldValue::movePoints if (&mesh == &mesh_) { // It may be necessary to reset if the mesh moves - // initialise(dict_); + initialise(dict_); } }