fvMeshStitcher: Standardise mesh change hooks
This commit is contained in:
@ -1329,6 +1329,11 @@ void Foam::fvMesh::topoChange(const polyTopoChangeMap& map)
|
|||||||
|
|
||||||
const_cast<Time&>(time()).functionObjects().topoChange(map);
|
const_cast<Time&>(time()).functionObjects().topoChange(map);
|
||||||
|
|
||||||
|
if (stitcher_.valid())
|
||||||
|
{
|
||||||
|
stitcher_->topoChange(map);
|
||||||
|
}
|
||||||
|
|
||||||
if (topoChanger_.valid())
|
if (topoChanger_.valid())
|
||||||
{
|
{
|
||||||
topoChanger_->topoChange(map);
|
topoChanger_->topoChange(map);
|
||||||
@ -1365,6 +1370,7 @@ void Foam::fvMesh::mapMesh(const polyMeshMap& map)
|
|||||||
|
|
||||||
const_cast<Time&>(time()).functionObjects().mapMesh(map);
|
const_cast<Time&>(time()).functionObjects().mapMesh(map);
|
||||||
|
|
||||||
|
stitcher_->mapMesh(map);
|
||||||
topoChanger_->mapMesh(map);
|
topoChanger_->mapMesh(map);
|
||||||
distributor_->mapMesh(map);
|
distributor_->mapMesh(map);
|
||||||
mover_->mapMesh(map);
|
mover_->mapMesh(map);
|
||||||
@ -1390,6 +1396,7 @@ void Foam::fvMesh::distribute(const polyDistributionMap& map)
|
|||||||
|
|
||||||
const_cast<Time&>(time()).functionObjects().distribute(map);
|
const_cast<Time&>(time()).functionObjects().distribute(map);
|
||||||
|
|
||||||
|
stitcher_->distribute(map);
|
||||||
topoChanger_->distribute(map);
|
topoChanger_->distribute(map);
|
||||||
distributor_->distribute(map);
|
distributor_->distribute(map);
|
||||||
mover_->distribute(map);
|
mover_->distribute(map);
|
||||||
@ -1714,6 +1721,11 @@ bool Foam::fvMesh::writeObject
|
|||||||
ok = ok && V0Ptr_->write(write);
|
ok = ok && V0Ptr_->write(write);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (stitcher_.valid())
|
||||||
|
{
|
||||||
|
stitcher_->write(write);
|
||||||
|
}
|
||||||
|
|
||||||
if (topoChanger_.valid())
|
if (topoChanger_.valid())
|
||||||
{
|
{
|
||||||
topoChanger_->write(write);
|
topoChanger_->write(write);
|
||||||
|
|||||||
@ -1185,14 +1185,6 @@ bool Foam::fvMeshStitcher::stitches() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fvMeshStitcher::updateMesh(const polyTopoChangeMap&)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::fvMeshStitcher::movePoints()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
bool Foam::fvMeshStitcher::disconnect
|
bool Foam::fvMeshStitcher::disconnect
|
||||||
(
|
(
|
||||||
const bool changing,
|
const bool changing,
|
||||||
@ -1596,4 +1588,16 @@ void Foam::fvMeshStitcher::reconnect(const bool geometric) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::fvMeshStitcher::topoChange(const polyTopoChangeMap&)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::fvMeshStitcher::mapMesh(const polyMeshMap&)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::fvMeshStitcher::distribute(const polyDistributionMap&)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -375,21 +375,15 @@ public:
|
|||||||
//- Does this stitcher do anything?
|
//- Does this stitcher do anything?
|
||||||
bool stitches() const;
|
bool stitches() const;
|
||||||
|
|
||||||
//- Update local data for topology changes
|
|
||||||
virtual void updateMesh(const polyTopoChangeMap&);
|
|
||||||
|
|
||||||
//- Update local data for mesh motion
|
|
||||||
virtual void movePoints();
|
|
||||||
|
|
||||||
//- Disconnect the mesh by removing faces from the nonConformalCyclics
|
//- Disconnect the mesh by removing faces from the nonConformalCyclics
|
||||||
virtual bool disconnect
|
bool disconnect
|
||||||
(
|
(
|
||||||
const bool changing,
|
const bool changing,
|
||||||
const bool geometric
|
const bool geometric
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Connect the mesh by adding faces into the nonConformalCyclics
|
//- Connect the mesh by adding faces into the nonConformalCyclics
|
||||||
virtual bool connect
|
bool connect
|
||||||
(
|
(
|
||||||
const bool changing,
|
const bool changing,
|
||||||
const bool geometric,
|
const bool geometric,
|
||||||
@ -400,7 +394,16 @@ public:
|
|||||||
// in whether or not the connection is "geometric".
|
// in whether or not the connection is "geometric".
|
||||||
void reconnect(const bool geometric) const;
|
void reconnect(const bool geometric) const;
|
||||||
|
|
||||||
//- Write the mover state
|
//- Update corresponding to the given map
|
||||||
|
virtual void topoChange(const polyTopoChangeMap&);
|
||||||
|
|
||||||
|
//- Update from another mesh using the given map
|
||||||
|
virtual void mapMesh(const polyMeshMap&);
|
||||||
|
|
||||||
|
//- Update corresponding to the given distribution map
|
||||||
|
virtual void distribute(const polyDistributionMap&);
|
||||||
|
|
||||||
|
//- Write the stitcher state
|
||||||
virtual bool write(const bool write = true) const
|
virtual bool write(const bool write = true) const
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user