fvMesh: Moved functionObject mesh change updates from polyMesh -> fvMesh
Many functionObjects operate on fvMesh objects, in particular vol and surface fields and they cannot be updated in polyMesh as they depend on fvMesh data which is updated after polyMesh.
This commit is contained in:
@ -1335,8 +1335,6 @@ void Foam::polyMesh::setPoints(const pointField& newPoints)
|
||||
|
||||
meshObject::movePoints<polyMesh>(*this);
|
||||
meshObject::movePoints<pointMesh>(*this);
|
||||
|
||||
const_cast<Time&>(time()).functionObjects().movePoints(*this);
|
||||
}
|
||||
|
||||
|
||||
@ -1415,9 +1413,6 @@ Foam::tmp<Foam::scalarField> Foam::polyMesh::movePoints
|
||||
meshObject::movePoints<polyMesh>(*this);
|
||||
meshObject::movePoints<pointMesh>(*this);
|
||||
|
||||
const_cast<Time&>(time()).functionObjects().movePoints(*this);
|
||||
|
||||
|
||||
if (debug && moveError)
|
||||
{
|
||||
// Write mesh to ease debugging. Note we want to avoid calling
|
||||
|
||||
@ -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&>(time()).functionObjects().topoChange(map);
|
||||
}
|
||||
|
||||
|
||||
@ -131,8 +129,6 @@ void Foam::polyMesh::mapMesh(const polyMeshMap& map)
|
||||
{
|
||||
meshObject::mapMesh<polyMesh>(*this, map);
|
||||
meshObject::mapMesh<pointMesh>(*this, map);
|
||||
|
||||
const_cast<Time&>(time()).functionObjects().mapMesh(map);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1021,6 +1021,8 @@ void Foam::fvMesh::setPoints(const pointField& p)
|
||||
|
||||
meshObject::movePoints<fvMesh>(*this);
|
||||
meshObject::movePoints<lduMesh>(*this);
|
||||
|
||||
const_cast<Time&>(time()).functionObjects().movePoints(*this);
|
||||
}
|
||||
|
||||
|
||||
@ -1104,6 +1106,8 @@ Foam::tmp<Foam::scalarField> Foam::fvMesh::movePoints(const pointField& p)
|
||||
meshObject::movePoints<fvMesh>(*this);
|
||||
meshObject::movePoints<lduMesh>(*this);
|
||||
|
||||
const_cast<Time&>(time()).functionObjects().movePoints(*this);
|
||||
|
||||
return tsweptVols;
|
||||
}
|
||||
|
||||
@ -1202,6 +1206,8 @@ void Foam::fvMesh::topoChange(const polyTopoChangeMap& map)
|
||||
meshObject::topoChange<fvMesh>(*this, map);
|
||||
meshObject::topoChange<lduMesh>(*this, map);
|
||||
|
||||
const_cast<Time&>(time()).functionObjects().topoChange(map);
|
||||
|
||||
if (topoChanger_.valid())
|
||||
{
|
||||
topoChanger_->topoChange(map);
|
||||
@ -1236,6 +1242,8 @@ void Foam::fvMesh::mapMesh(const polyMeshMap& map)
|
||||
meshObject::mapMesh<fvMesh>(*this, map);
|
||||
meshObject::mapMesh<lduMesh>(*this, map);
|
||||
|
||||
const_cast<Time&>(time()).functionObjects().mapMesh(map);
|
||||
|
||||
topoChanger_->mapMesh(map);
|
||||
distributor_->mapMesh(map);
|
||||
mover_->mapMesh(map);
|
||||
|
||||
@ -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_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user