polyMeshMap: New mesh to mesh map for the new mapping update function mapMesh(const polyMeshMap&)
This new mapping structure is designed to support run-time mesh-to-mesh mapping to allow arbitrary changes to the mesh structure, for example during extreme motion requiring significant topology change including region disconnection etc.
This commit is contained in:
@ -162,7 +162,11 @@ void Foam::fv::VoFClouds::preUpdateMesh()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::VoFClouds::updateMesh(const polyTopoChangeMap&)
|
void Foam::fv::VoFClouds::topoChange(const polyTopoChangeMap&)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::fv::VoFClouds::mapMesh(const polyMeshMap& map)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -148,8 +148,11 @@ public:
|
|||||||
//- Prepare for mesh update
|
//- Prepare for mesh update
|
||||||
virtual void preUpdateMesh();
|
virtual void preUpdateMesh();
|
||||||
|
|
||||||
//- Update for mesh changes
|
//- Update topology using the given map
|
||||||
virtual void updateMesh(const polyTopoChangeMap&);
|
virtual void topoChange(const polyTopoChangeMap&);
|
||||||
|
|
||||||
|
//- Update from another mesh using the given map
|
||||||
|
virtual void mapMesh(const polyMeshMap&);
|
||||||
|
|
||||||
//- Redistribute or update using the given distribution map
|
//- Redistribute or update using the given distribution map
|
||||||
virtual void distribute(const polyDistributionMap&);
|
virtual void distribute(const polyDistributionMap&);
|
||||||
|
|||||||
@ -222,12 +222,18 @@ void Foam::fv::VoFSolidificationMeltingSource::correct()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::VoFSolidificationMeltingSource::updateMesh
|
void Foam::fv::VoFSolidificationMeltingSource::topoChange
|
||||||
(
|
(
|
||||||
const polyTopoChangeMap& map
|
const polyTopoChangeMap& map
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
set_.updateMesh(map);
|
set_.topoChange(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::fv::VoFSolidificationMeltingSource::mapMesh(const polyMeshMap& map)
|
||||||
|
{
|
||||||
|
set_.mapMesh(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -190,8 +190,11 @@ public:
|
|||||||
|
|
||||||
// Mesh motion
|
// Mesh motion
|
||||||
|
|
||||||
//- Update for mesh changes
|
//- Update topology using the given map
|
||||||
virtual void updateMesh(const polyTopoChangeMap&);
|
virtual void topoChange(const polyTopoChangeMap&);
|
||||||
|
|
||||||
|
//- Update from another mesh using the given map
|
||||||
|
virtual void mapMesh(const polyMeshMap&);
|
||||||
|
|
||||||
//- Redistribute or update using the given distribution map
|
//- Redistribute or update using the given distribution map
|
||||||
virtual void distribute(const polyDistributionMap&);
|
virtual void distribute(const polyDistributionMap&);
|
||||||
|
|||||||
@ -153,7 +153,13 @@ void Foam::fv::VoFSurfaceFilm::addSup
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::VoFSurfaceFilm::updateMesh(const polyTopoChangeMap&)
|
void Foam::fv::VoFSurfaceFilm::topoChange(const polyTopoChangeMap&)
|
||||||
|
{
|
||||||
|
NotImplemented;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::fv::VoFSurfaceFilm::mapMesh(const polyMeshMap& map)
|
||||||
{
|
{
|
||||||
NotImplemented;
|
NotImplemented;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -135,8 +135,11 @@ public:
|
|||||||
|
|
||||||
// Mesh changes
|
// Mesh changes
|
||||||
|
|
||||||
//- Update for mesh changes
|
//- Update topology using the given map
|
||||||
virtual void updateMesh(const polyTopoChangeMap&);
|
virtual void topoChange(const polyTopoChangeMap&);
|
||||||
|
|
||||||
|
//- Update from another mesh using the given map
|
||||||
|
virtual void mapMesh(const polyMeshMap&);
|
||||||
|
|
||||||
//- Redistribute or update using the given distribution map
|
//- Redistribute or update using the given distribution map
|
||||||
virtual void distribute(const polyDistributionMap&);
|
virtual void distribute(const polyDistributionMap&);
|
||||||
|
|||||||
@ -207,7 +207,11 @@ void Foam::fv::VoFTurbulenceDamping::addSup
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::VoFTurbulenceDamping::updateMesh(const polyTopoChangeMap&)
|
void Foam::fv::VoFTurbulenceDamping::topoChange(const polyTopoChangeMap&)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::fv::VoFTurbulenceDamping::mapMesh(const polyMeshMap& map)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -174,8 +174,11 @@ public:
|
|||||||
|
|
||||||
// Mesh changes
|
// Mesh changes
|
||||||
|
|
||||||
//- Update for mesh changes
|
//- Update topology using the given map
|
||||||
virtual void updateMesh(const polyTopoChangeMap&);
|
virtual void topoChange(const polyTopoChangeMap&);
|
||||||
|
|
||||||
|
//- Update from another mesh using the given map
|
||||||
|
virtual void mapMesh(const polyMeshMap&);
|
||||||
|
|
||||||
//- Redistribute or update using the given distribution map
|
//- Redistribute or update using the given distribution map
|
||||||
virtual void distribute(const polyDistributionMap&);
|
virtual void distribute(const polyDistributionMap&);
|
||||||
|
|||||||
@ -202,7 +202,11 @@ void Foam::fv::VoFTurbulenceDamping::addSup
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::VoFTurbulenceDamping::updateMesh(const polyTopoChangeMap&)
|
void Foam::fv::VoFTurbulenceDamping::topoChange(const polyTopoChangeMap&)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::fv::VoFTurbulenceDamping::mapMesh(const polyMeshMap& map)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -173,8 +173,11 @@ public:
|
|||||||
|
|
||||||
// Mesh changes
|
// Mesh changes
|
||||||
|
|
||||||
//- Update for mesh changes
|
//- Update topology using the given map
|
||||||
virtual void updateMesh(const polyTopoChangeMap&);
|
virtual void topoChange(const polyTopoChangeMap&);
|
||||||
|
|
||||||
|
//- Update from another mesh using the given map
|
||||||
|
virtual void mapMesh(const polyMeshMap&);
|
||||||
|
|
||||||
//- Redistribute or update using the given distribution map
|
//- Redistribute or update using the given distribution map
|
||||||
virtual void distribute(const polyDistributionMap&);
|
virtual void distribute(const polyDistributionMap&);
|
||||||
|
|||||||
@ -304,7 +304,11 @@ void Foam::fv::interfaceTurbulenceDamping::addSup
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::interfaceTurbulenceDamping::updateMesh(const polyTopoChangeMap&)
|
void Foam::fv::interfaceTurbulenceDamping::topoChange(const polyTopoChangeMap&)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::fv::interfaceTurbulenceDamping::mapMesh(const polyMeshMap& map)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -194,8 +194,11 @@ public:
|
|||||||
|
|
||||||
// Mesh changes
|
// Mesh changes
|
||||||
|
|
||||||
//- Update for mesh changes
|
//- Update topology using the given map
|
||||||
virtual void updateMesh(const polyTopoChangeMap&);
|
virtual void topoChange(const polyTopoChangeMap&);
|
||||||
|
|
||||||
|
//- Update from another mesh using the given map
|
||||||
|
virtual void mapMesh(const polyMeshMap&);
|
||||||
|
|
||||||
//- Redistribute or update using the given distribution map
|
//- Redistribute or update using the given distribution map
|
||||||
virtual void distribute(const polyDistributionMap&);
|
virtual void distribute(const polyDistributionMap&);
|
||||||
|
|||||||
@ -235,13 +235,17 @@ void Foam::fv::phaseTurbulenceStabilisation::addSup
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::phaseTurbulenceStabilisation::updateMesh
|
void Foam::fv::phaseTurbulenceStabilisation::topoChange
|
||||||
(
|
(
|
||||||
const polyTopoChangeMap&
|
const polyTopoChangeMap&
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::fv::phaseTurbulenceStabilisation::mapMesh(const polyMeshMap& map)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::phaseTurbulenceStabilisation::distribute
|
void Foam::fv::phaseTurbulenceStabilisation::distribute
|
||||||
(
|
(
|
||||||
const polyDistributionMap&
|
const polyDistributionMap&
|
||||||
|
|||||||
@ -164,8 +164,11 @@ public:
|
|||||||
|
|
||||||
// Mesh changes
|
// Mesh changes
|
||||||
|
|
||||||
//- Update for mesh changes
|
//- Update topology using the given map
|
||||||
virtual void updateMesh(const polyTopoChangeMap&);
|
virtual void topoChange(const polyTopoChangeMap&);
|
||||||
|
|
||||||
|
//- Update from another mesh using the given map
|
||||||
|
virtual void mapMesh(const polyMeshMap&);
|
||||||
|
|
||||||
//- Redistribute or update using the given distribution map
|
//- Redistribute or update using the given distribution map
|
||||||
virtual void distribute(const polyDistributionMap&);
|
virtual void distribute(const polyDistributionMap&);
|
||||||
|
|||||||
@ -200,7 +200,7 @@ int main(int argc, char *argv[])
|
|||||||
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, inflate);
|
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, inflate);
|
||||||
|
|
||||||
Info<< "Mapping fields" << nl << endl;
|
Info<< "Mapping fields" << nl << endl;
|
||||||
mesh.updateMesh(map);
|
mesh.topoChange(map);
|
||||||
|
|
||||||
// Move mesh (since morphing does not do this)
|
// Move mesh (since morphing does not do this)
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
@ -210,7 +210,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update numbering of cells/vertices.
|
// Update numbering of cells/vertices.
|
||||||
faceRemover.updateMesh(map);
|
faceRemover.topoChange(map);
|
||||||
|
|
||||||
|
|
||||||
Info<< "Writing fields" << nl << endl;
|
Info<< "Writing fields" << nl << endl;
|
||||||
|
|||||||
@ -277,7 +277,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Update fields
|
// Update fields
|
||||||
Info<< nl << "-- mapping mesh data" << endl;
|
Info<< nl << "-- mapping mesh data" << endl;
|
||||||
mesh.updateMesh(map);
|
mesh.topoChange(map);
|
||||||
|
|
||||||
// Inflate mesh
|
// Inflate mesh
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
@ -288,7 +288,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Update numbering of cells/vertices.
|
// Update numbering of cells/vertices.
|
||||||
Info<< nl << "-- mapping hexRef8 data" << endl;
|
Info<< nl << "-- mapping hexRef8 data" << endl;
|
||||||
meshCutter.updateMesh(map);
|
meshCutter.topoChange(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1075,7 +1075,7 @@ int main(int argc, char *argv[])
|
|||||||
meshMod.changeMesh(subsetter.subMesh(), false);
|
meshMod.changeMesh(subsetter.subMesh(), false);
|
||||||
|
|
||||||
// Update fields
|
// Update fields
|
||||||
subsetter.subMesh().updateMesh(map);
|
subsetter.subMesh().topoChange(map);
|
||||||
|
|
||||||
// Fix faces that get mapped to zero-sized patches (these don't get any
|
// Fix faces that get mapped to zero-sized patches (these don't get any
|
||||||
// value)
|
// value)
|
||||||
|
|||||||
@ -521,7 +521,7 @@ void subsetMesh
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update topology on cellRemover
|
// Update topology on cellRemover
|
||||||
cellRemover.updateMesh(map());
|
cellRemover.topoChange(map());
|
||||||
|
|
||||||
// Update refLevel for removed cells.
|
// Update refLevel for removed cells.
|
||||||
const labelList& cellMap = map().cellMap();
|
const labelList& cellMap = map().cellMap();
|
||||||
@ -547,7 +547,7 @@ void subsetMesh
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update cutCells for removed cells.
|
// Update cutCells for removed cells.
|
||||||
cutCells.updateMesh(map());
|
cutCells.topoChange(map());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -108,7 +108,7 @@ label mergePatchFaces
|
|||||||
map = meshMod.changeMesh(mesh, false, true);
|
map = meshMod.changeMesh(mesh, false, true);
|
||||||
|
|
||||||
// Update fields
|
// Update fields
|
||||||
mesh.updateMesh(map);
|
mesh.topoChange(map);
|
||||||
|
|
||||||
// Move mesh (since morphing does not do this)
|
// Move mesh (since morphing does not do this)
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
@ -264,7 +264,7 @@ label mergePatchFaces
|
|||||||
map = meshMod.changeMesh(mesh, false, true);
|
map = meshMod.changeMesh(mesh, false, true);
|
||||||
|
|
||||||
// Update fields
|
// Update fields
|
||||||
mesh.updateMesh(map);
|
mesh.topoChange(map);
|
||||||
|
|
||||||
// Move mesh (since morphing does not do this)
|
// Move mesh (since morphing does not do this)
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
@ -317,7 +317,7 @@ label mergeEdges(const scalar minCos, polyMesh& mesh)
|
|||||||
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false, true);
|
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false, true);
|
||||||
|
|
||||||
// Update fields
|
// Update fields
|
||||||
mesh.updateMesh(map);
|
mesh.topoChange(map);
|
||||||
|
|
||||||
// Move mesh (since morphing does not do this)
|
// Move mesh (since morphing does not do this)
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
|
|||||||
@ -461,7 +461,7 @@ void Foam::cellSplitter::setRefinement
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::cellSplitter::updateMesh(const polyTopoChangeMap& map)
|
void Foam::cellSplitter::topoChange(const polyTopoChangeMap& map)
|
||||||
{
|
{
|
||||||
// Create copy since we're deleting entries. Only if both cell and added
|
// Create copy since we're deleting entries. Only if both cell and added
|
||||||
// point get mapped do they get inserted.
|
// point get mapped do they get inserted.
|
||||||
|
|||||||
@ -123,7 +123,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Force recalculation of locally stored data on topological change
|
//- Force recalculation of locally stored data on topological change
|
||||||
void updateMesh(const polyTopoChangeMap&);
|
void topoChange(const polyTopoChangeMap&);
|
||||||
|
|
||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|||||||
@ -537,7 +537,7 @@ int main(int argc, char *argv[])
|
|||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.movePoints(map().preMotionPoints());
|
||||||
}
|
}
|
||||||
|
|
||||||
cutter.updateMesh(map());
|
cutter.topoChange(map());
|
||||||
|
|
||||||
if (!overwrite)
|
if (!overwrite)
|
||||||
{
|
{
|
||||||
@ -610,7 +610,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Not implemented yet:
|
// Not implemented yet:
|
||||||
// cutter.updateMesh(map());
|
// cutter.topoChange(map());
|
||||||
|
|
||||||
|
|
||||||
if (!overwrite)
|
if (!overwrite)
|
||||||
@ -654,7 +654,7 @@ int main(int argc, char *argv[])
|
|||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.movePoints(map().preMotionPoints());
|
||||||
}
|
}
|
||||||
|
|
||||||
cutter.updateMesh(map());
|
cutter.topoChange(map());
|
||||||
|
|
||||||
if (!overwrite)
|
if (!overwrite)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -145,10 +145,10 @@ int main(int argc, char *argv[])
|
|||||||
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
|
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
|
||||||
|
|
||||||
// Update fields
|
// Update fields
|
||||||
mesh.updateMesh(map);
|
mesh.topoChange(map);
|
||||||
|
|
||||||
// Update numbering of cells/vertices.
|
// Update numbering of cells/vertices.
|
||||||
meshCutter.updateMesh(map);
|
meshCutter.topoChange(map);
|
||||||
|
|
||||||
// Optionally inflate mesh
|
// Optionally inflate mesh
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
|
|||||||
@ -248,7 +248,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update stored labels on meshCutter.
|
// Update stored labels on meshCutter.
|
||||||
cutter.updateMesh(map());
|
cutter.topoChange(map());
|
||||||
|
|
||||||
Info<< "Finished refining" << endl;
|
Info<< "Finished refining" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -138,7 +138,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
|
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
|
||||||
|
|
||||||
mesh.updateMesh(map);
|
mesh.topoChange(map);
|
||||||
|
|
||||||
// Move mesh (since morphing does not do this)
|
// Move mesh (since morphing does not do this)
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
@ -147,7 +147,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update numbering of cells/vertices.
|
// Update numbering of cells/vertices.
|
||||||
faceRemover.updateMesh(map);
|
faceRemover.topoChange(map);
|
||||||
|
|
||||||
if (!overwrite)
|
if (!overwrite)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -693,10 +693,10 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update stored labels on meshCutter
|
// Update stored labels on meshCutter
|
||||||
cutter.updateMesh(map());
|
cutter.topoChange(map());
|
||||||
|
|
||||||
// Update cellSet
|
// Update cellSet
|
||||||
cellsToCut.updateMesh(map());
|
cellsToCut.topoChange(map());
|
||||||
|
|
||||||
Info<< "Remaining:" << cellsToCut.size() << endl;
|
Info<< "Remaining:" << cellsToCut.size() << endl;
|
||||||
|
|
||||||
|
|||||||
@ -424,7 +424,7 @@ int main(int argc, char *argv[])
|
|||||||
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
|
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
|
||||||
|
|
||||||
// Update fields
|
// Update fields
|
||||||
mesh.updateMesh(map);
|
mesh.topoChange(map);
|
||||||
|
|
||||||
// Move mesh (since morphing does not do this)
|
// Move mesh (since morphing does not do this)
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
@ -708,7 +708,7 @@ int main(int argc, char *argv[])
|
|||||||
mesh
|
mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
layerExtrude.updateMesh
|
layerExtrude.topoChange
|
||||||
(
|
(
|
||||||
map(),
|
map(),
|
||||||
identity(extrudePatch.size()),
|
identity(extrudePatch.size()),
|
||||||
@ -884,7 +884,7 @@ int main(int argc, char *argv[])
|
|||||||
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
|
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
|
||||||
|
|
||||||
// Update fields
|
// Update fields
|
||||||
mesh.updateMesh(map);
|
mesh.topoChange(map);
|
||||||
|
|
||||||
// Update stored data
|
// Update stored data
|
||||||
updateFaceLabels(map(), frontPatchFaces);
|
updateFaceLabels(map(), frontPatchFaces);
|
||||||
@ -1016,7 +1016,7 @@ int main(int argc, char *argv[])
|
|||||||
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
|
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
|
||||||
|
|
||||||
// Update fields
|
// Update fields
|
||||||
mesh.updateMesh(map);
|
mesh.topoChange(map);
|
||||||
|
|
||||||
// Update local data
|
// Update local data
|
||||||
updateCellSet(map(), addedCellsSet);
|
updateCellSet(map(), addedCellsSet);
|
||||||
|
|||||||
@ -2312,7 +2312,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
|
|
||||||
// Update numbering on extruder.
|
// Update numbering on extruder.
|
||||||
extruder.updateMesh(shellMap);
|
extruder.topoChange(shellMap);
|
||||||
|
|
||||||
|
|
||||||
// Calculate offsets from shell mesh back to original mesh
|
// Calculate offsets from shell mesh back to original mesh
|
||||||
@ -2659,7 +2659,7 @@ int main(int argc, char *argv[])
|
|||||||
addBafflesMap = meshMod.changeMesh(mesh, false);
|
addBafflesMap = meshMod.changeMesh(mesh, false);
|
||||||
|
|
||||||
// Update fields
|
// Update fields
|
||||||
mesh.updateMesh(addBafflesMap);
|
mesh.topoChange(addBafflesMap);
|
||||||
|
|
||||||
|
|
||||||
//XXXXXX
|
//XXXXXX
|
||||||
|
|||||||
@ -253,7 +253,7 @@ int main(int argc, char *argv[])
|
|||||||
// Create a mesh from topo changes.
|
// Create a mesh from topo changes.
|
||||||
autoPtr<polyTopoChangeMap> map = meshMod().changeMesh(mesh(), false);
|
autoPtr<polyTopoChangeMap> map = meshMod().changeMesh(mesh(), false);
|
||||||
|
|
||||||
mesh().updateMesh(map);
|
mesh().topoChange(map);
|
||||||
|
|
||||||
{
|
{
|
||||||
edgeCollapser collapser(mesh());
|
edgeCollapser collapser(mesh());
|
||||||
@ -304,7 +304,7 @@ int main(int argc, char *argv[])
|
|||||||
autoPtr<polyTopoChangeMap> map
|
autoPtr<polyTopoChangeMap> map
|
||||||
= meshModCollapse.changeMesh(mesh(), false);
|
= meshModCollapse.changeMesh(mesh(), false);
|
||||||
|
|
||||||
mesh().updateMesh(map);
|
mesh().topoChange(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!overwrite)
|
if (!overwrite)
|
||||||
|
|||||||
@ -119,7 +119,7 @@ public:
|
|||||||
void setRefinement(polyTopoChange&);
|
void setRefinement(polyTopoChange&);
|
||||||
|
|
||||||
//- Force recalculation of locally stored data on topological change
|
//- Force recalculation of locally stored data on topological change
|
||||||
void updateMesh(const polyTopoChangeMap&)
|
void topoChange(const polyTopoChangeMap&)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//- Force recalculation of locally stored data for mesh distribution
|
//- Force recalculation of locally stored data for mesh distribution
|
||||||
|
|||||||
@ -246,10 +246,10 @@ void Foam::backgroundMeshDecomposition::initialRefinement()
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Update fields
|
// Update fields
|
||||||
mesh_.updateMesh(map);
|
mesh_.topoChange(map);
|
||||||
|
|
||||||
// Update numbering of cells/vertices.
|
// Update numbering of cells/vertices.
|
||||||
meshCutter_.updateMesh(map);
|
meshCutter_.topoChange(map);
|
||||||
|
|
||||||
{
|
{
|
||||||
// Map volumeStatus
|
// Map volumeStatus
|
||||||
@ -355,11 +355,11 @@ void Foam::backgroundMeshDecomposition::initialRefinement()
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Update fields
|
// Update fields
|
||||||
mesh_.updateMesh(map);
|
mesh_.topoChange(map);
|
||||||
|
|
||||||
// Update numbering of cells/vertices.
|
// Update numbering of cells/vertices.
|
||||||
meshCutter_.updateMesh(map);
|
meshCutter_.topoChange(map);
|
||||||
cellRemover.updateMesh(map);
|
cellRemover.topoChange(map);
|
||||||
|
|
||||||
{
|
{
|
||||||
// Map volumeStatus
|
// Map volumeStatus
|
||||||
@ -947,10 +947,10 @@ Foam::backgroundMeshDecomposition::distribute
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Update fields
|
// Update fields
|
||||||
mesh_.updateMesh(map);
|
mesh_.topoChange(map);
|
||||||
|
|
||||||
// Update numbering of cells/vertices.
|
// Update numbering of cells/vertices.
|
||||||
meshCutter_.updateMesh(map);
|
meshCutter_.topoChange(map);
|
||||||
|
|
||||||
Info<< " Background mesh refined from "
|
Info<< " Background mesh refined from "
|
||||||
<< returnReduce(map().nOldCells(), sumOp<label>())
|
<< returnReduce(map().nOldCells(), sumOp<label>())
|
||||||
|
|||||||
@ -204,7 +204,7 @@ int main(int argc, char *argv[])
|
|||||||
autoPtr<polyTopoChangeMap> map =
|
autoPtr<polyTopoChangeMap> map =
|
||||||
meshMod.changeMesh(pMesh, false);
|
meshMod.changeMesh(pMesh, false);
|
||||||
|
|
||||||
pMesh.updateMesh(map);
|
pMesh.topoChange(map);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -799,7 +799,7 @@ int main(int argc, char *argv[])
|
|||||||
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
|
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
|
||||||
|
|
||||||
// Update fields
|
// Update fields
|
||||||
mesh.updateMesh(map);
|
mesh.topoChange(map);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -219,7 +219,7 @@ int main(int argc, char *argv[])
|
|||||||
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
|
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
|
||||||
|
|
||||||
// Update fields
|
// Update fields
|
||||||
mesh.updateMesh(map);
|
mesh.topoChange(map);
|
||||||
|
|
||||||
// Move mesh (since morphing does not do this)
|
// Move mesh (since morphing does not do this)
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
|
|||||||
@ -124,7 +124,7 @@ int main(int argc, char *argv[])
|
|||||||
labelList(0), // oldPatchNMeshPoints,
|
labelList(0), // oldPatchNMeshPoints,
|
||||||
autoPtr<scalarField>() // oldCellVolumesPtr
|
autoPtr<scalarField>() // oldCellVolumesPtr
|
||||||
);
|
);
|
||||||
refData.updateMesh(map);
|
refData.topoChange(map);
|
||||||
refData.write();
|
refData.write();
|
||||||
|
|
||||||
Info<< "End" << endl;
|
Info<< "End" << endl;
|
||||||
|
|||||||
@ -512,7 +512,7 @@ int main(int argc, char *argv[])
|
|||||||
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
|
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
|
||||||
|
|
||||||
// Update fields
|
// Update fields
|
||||||
mesh.updateMesh(map);
|
mesh.topoChange(map);
|
||||||
|
|
||||||
// Optionally inflate mesh
|
// Optionally inflate mesh
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
|
|||||||
@ -1003,7 +1003,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
|
|
||||||
// Update fields
|
// Update fields
|
||||||
mesh.updateMesh(map);
|
mesh.topoChange(map);
|
||||||
|
|
||||||
// Update proc maps
|
// Update proc maps
|
||||||
if
|
if
|
||||||
@ -1319,7 +1319,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
cellSet cs(*iter());
|
cellSet cs(*iter());
|
||||||
Info<< " " << cs.name() << endl;
|
Info<< " " << cs.name() << endl;
|
||||||
cs.updateMesh(map());
|
cs.topoChange(map());
|
||||||
cs.instance() = mesh.facesInstance();
|
cs.instance() = mesh.facesInstance();
|
||||||
cs.write();
|
cs.write();
|
||||||
}
|
}
|
||||||
@ -1335,7 +1335,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
faceSet fs(*iter());
|
faceSet fs(*iter());
|
||||||
Info<< " " << fs.name() << endl;
|
Info<< " " << fs.name() << endl;
|
||||||
fs.updateMesh(map());
|
fs.topoChange(map());
|
||||||
fs.instance() = mesh.facesInstance();
|
fs.instance() = mesh.facesInstance();
|
||||||
fs.write();
|
fs.write();
|
||||||
}
|
}
|
||||||
@ -1351,7 +1351,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
pointSet ps(*iter());
|
pointSet ps(*iter());
|
||||||
Info<< " " << ps.name() << endl;
|
Info<< " " << ps.name() << endl;
|
||||||
ps.updateMesh(map());
|
ps.topoChange(map());
|
||||||
ps.instance() = mesh.facesInstance();
|
ps.instance() = mesh.facesInstance();
|
||||||
ps.write();
|
ps.write();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -115,7 +115,7 @@ int main(int argc, char *argv[])
|
|||||||
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
|
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
|
||||||
|
|
||||||
// Update fields
|
// Update fields
|
||||||
mesh.updateMesh(map);
|
mesh.topoChange(map);
|
||||||
|
|
||||||
// Move mesh (since morphing does not do this)
|
// Move mesh (since morphing does not do this)
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
@ -131,7 +131,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Writing mesh to time " << runTime.timeName() << endl;
|
Info<< "Writing mesh to time " << runTime.timeName() << endl;
|
||||||
mesh.write();
|
mesh.write();
|
||||||
|
|
||||||
refData.updateMesh(map);
|
refData.topoChange(map);
|
||||||
refData.write();
|
refData.write();
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|||||||
@ -769,7 +769,7 @@ void createAndWriteRegion
|
|||||||
Info<< "Mapping fields" << endl;
|
Info<< "Mapping fields" << endl;
|
||||||
|
|
||||||
// Map existing fields
|
// Map existing fields
|
||||||
newMesh().updateMesh(map());
|
newMesh().topoChange(map());
|
||||||
|
|
||||||
// Add subsetted fields
|
// Add subsetted fields
|
||||||
subsetVolFields<volScalarField>
|
subsetVolFields<volScalarField>
|
||||||
|
|||||||
@ -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) 2011-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -168,7 +168,7 @@ int Foam::vtkPVFoam::setTime(int nRequest, const double requestTimes[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPVFoam::updateMeshPartsStatus()
|
void Foam::vtkPVFoam::topoChangePartsStatus()
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
@ -509,7 +509,7 @@ void Foam::vtkPVFoam::Update
|
|||||||
reader_->UpdateProgress(0.1);
|
reader_->UpdateProgress(0.1);
|
||||||
|
|
||||||
// Set up mesh parts selection(s)
|
// Set up mesh parts selection(s)
|
||||||
updateMeshPartsStatus();
|
topoChangePartsStatus();
|
||||||
|
|
||||||
reader_->UpdateProgress(0.15);
|
reader_->UpdateProgress(0.15);
|
||||||
|
|
||||||
|
|||||||
@ -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) 2011-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -340,7 +340,7 @@ class vtkPVFoam
|
|||||||
// Update information helper functions
|
// Update information helper functions
|
||||||
|
|
||||||
//- Update the mesh parts selected in the GUI
|
//- Update the mesh parts selected in the GUI
|
||||||
void updateMeshPartsStatus();
|
void topoChangePartsStatus();
|
||||||
|
|
||||||
//- Internal mesh info
|
//- Internal mesh info
|
||||||
void updateInfoInternalMesh(vtkDataArraySelection*);
|
void updateInfoInternalMesh(vtkDataArraySelection*);
|
||||||
|
|||||||
@ -179,9 +179,22 @@ void ${typeName}FvModel${SourceType}::addSup
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ${typeName}FvModel${SourceType}::updateMesh(const polyTopoChangeMap& map)
|
bool ${typeName}FvModel${SourceType}::movePoints()
|
||||||
{
|
{
|
||||||
set_.updateMesh(map);
|
set_.movePoints();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ${typeName}FvModel${SourceType}::topoChange(const polyTopoChangeMap& map)
|
||||||
|
{
|
||||||
|
set_.topoChange(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ${typeName}FvModel${SourceType}::mapMesh(const polyMeshMap& map)
|
||||||
|
{
|
||||||
|
set_.mapMesh(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -194,13 +207,6 @@ void ${typeName}FvModel${SourceType}::distribute
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool ${typeName}FvModel${SourceType}::movePoints()
|
|
||||||
{
|
|
||||||
set_.movePoints();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|||||||
@ -114,14 +114,17 @@ public:
|
|||||||
|
|
||||||
// Mesh motion
|
// Mesh motion
|
||||||
|
|
||||||
//- Update for mesh changes
|
//- Update for mesh motion
|
||||||
virtual void updateMesh(const polyTopoChangeMap&);
|
virtual bool movePoints();
|
||||||
|
|
||||||
|
//- Update topology using the given map
|
||||||
|
virtual void topoChange(const polyTopoChangeMap&);
|
||||||
|
|
||||||
|
//- Update from another mesh using the given map
|
||||||
|
virtual void mapMesh(const polyMeshMap&);
|
||||||
|
|
||||||
//- Redistribute or update using the given distribution map
|
//- Redistribute or update using the given distribution map
|
||||||
virtual void distribute(const polyDistributionMap&);
|
virtual void distribute(const polyDistributionMap&);
|
||||||
|
|
||||||
//- Update for mesh motion
|
|
||||||
virtual bool movePoints();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,7 +25,7 @@ License
|
|||||||
|
|
||||||
#include "smoothDelta.H"
|
#include "smoothDelta.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "FaceCellWave.H"
|
#include "FvFaceCellWave.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -43,47 +43,43 @@ namespace LESModels
|
|||||||
|
|
||||||
void Foam::LESModels::smoothDelta::setChangedFaces
|
void Foam::LESModels::smoothDelta::setChangedFaces
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const volScalarField& delta,
|
const volScalarField& delta,
|
||||||
DynamicList<label>& changedFaces,
|
DynamicList<labelPair>& changedFaces,
|
||||||
DynamicList<deltaData>& changedFacesInfo
|
DynamicList<deltaData>& changedFacesInfo
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
for (label facei = 0; facei < mesh.nInternalFaces(); facei++)
|
forAll(mesh.owner(), facei)
|
||||||
{
|
{
|
||||||
scalar ownDelta = delta[mesh.faceOwner()[facei]];
|
const scalar ownDelta = delta[mesh.owner()[facei]];
|
||||||
|
const scalar neiDelta = delta[mesh.neighbour()[facei]];
|
||||||
scalar neiDelta = delta[mesh.faceNeighbour()[facei]];
|
|
||||||
|
|
||||||
// Check if owner delta much larger than neighbour delta or vice versa
|
// Check if owner delta much larger than neighbour delta or vice versa
|
||||||
|
if (ownDelta > maxDeltaRatio_*neiDelta)
|
||||||
if (ownDelta > maxDeltaRatio_ * neiDelta)
|
|
||||||
{
|
{
|
||||||
changedFaces.append(facei);
|
changedFaces.append(labelPair(-1, facei));
|
||||||
changedFacesInfo.append(deltaData(ownDelta));
|
changedFacesInfo.append(deltaData(ownDelta));
|
||||||
}
|
}
|
||||||
else if (neiDelta > maxDeltaRatio_ * ownDelta)
|
else if (neiDelta > maxDeltaRatio_*ownDelta)
|
||||||
{
|
{
|
||||||
changedFaces.append(facei);
|
changedFaces.append(labelPair(-1, facei));
|
||||||
changedFacesInfo.append(deltaData(neiDelta));
|
changedFacesInfo.append(deltaData(neiDelta));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert all faces of coupled patches no matter what. Let FaceCellWave
|
// Insert all faces of coupled patches no matter what. Let FvFaceCellWave
|
||||||
// sort it out.
|
// sort it out.
|
||||||
forAll(mesh.boundaryMesh(), patchi)
|
forAll(mesh.boundary(), patchi)
|
||||||
{
|
{
|
||||||
const polyPatch& patch = mesh.boundaryMesh()[patchi];
|
const fvPatch& patch = mesh.boundary()[patchi];
|
||||||
|
|
||||||
if (patch.coupled())
|
if (patch.coupled())
|
||||||
{
|
{
|
||||||
forAll(patch, patchFacei)
|
forAll(patch, patchFacei)
|
||||||
{
|
{
|
||||||
label meshFacei = patch.start() + patchFacei;
|
const scalar ownDelta = delta[patch.faceCells()[patchFacei]];
|
||||||
|
|
||||||
scalar ownDelta = delta[mesh.faceOwner()[meshFacei]];
|
changedFaces.append(labelPair(patchi, patchFacei));
|
||||||
|
|
||||||
changedFaces.append(meshFacei);
|
|
||||||
changedFacesInfo.append(deltaData(ownDelta));
|
changedFacesInfo.append(deltaData(ownDelta));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -101,32 +97,40 @@ void Foam::LESModels::smoothDelta::calcDelta()
|
|||||||
const volScalarField& geometricDelta = geometricDelta_();
|
const volScalarField& geometricDelta = geometricDelta_();
|
||||||
|
|
||||||
// Fill changed faces with info
|
// Fill changed faces with info
|
||||||
DynamicList<label> changedFaces(mesh.nFaces()/100 + 100);
|
DynamicList<labelPair> changedFaces(mesh.nFaces()/100 + 100);
|
||||||
DynamicList<deltaData> changedFacesInfo(changedFaces.size());
|
DynamicList<deltaData> changedFacesInfo(changedFaces.size());
|
||||||
|
|
||||||
setChangedFaces(mesh, geometricDelta, changedFaces, changedFacesInfo);
|
setChangedFaces(mesh, geometricDelta, changedFaces, changedFacesInfo);
|
||||||
|
|
||||||
// Set initial field on cells.
|
// Set initial field on cells.
|
||||||
List<deltaData> cellDeltaData(mesh.nCells());
|
List<deltaData> cellDeltaData(mesh.nCells());
|
||||||
|
|
||||||
forAll(geometricDelta, celli)
|
forAll(geometricDelta, celli)
|
||||||
{
|
{
|
||||||
cellDeltaData[celli] = geometricDelta[celli];
|
cellDeltaData[celli] = geometricDelta[celli];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set initial field on faces.
|
// Set initial field on faces.
|
||||||
List<deltaData> faceDeltaData(mesh.nFaces());
|
List<deltaData> internalFaceDeltaData(mesh.nInternalFaces());
|
||||||
|
List<List<deltaData>> patchFaceDeltaData
|
||||||
|
(
|
||||||
|
FvFaceCellWave<deltaData>::template
|
||||||
|
sizesListList<List<List<deltaData>>>
|
||||||
|
(
|
||||||
|
FvFaceCellWave<deltaData>::template
|
||||||
|
listListSizes(mesh.boundary()),
|
||||||
|
deltaData()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
// Propagate information over whole domain.
|
// Propagate information over whole domain.
|
||||||
FaceCellWave<deltaData, scalar> deltaCalc
|
FvFaceCellWave<deltaData, scalar> deltaCalc
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
changedFaces,
|
changedFaces,
|
||||||
changedFacesInfo,
|
changedFacesInfo,
|
||||||
faceDeltaData,
|
internalFaceDeltaData,
|
||||||
|
patchFaceDeltaData,
|
||||||
cellDeltaData,
|
cellDeltaData,
|
||||||
mesh.globalData().nTotalCells()+1, // max iterations
|
mesh.globalData().nTotalCells() + 1, // max iterations
|
||||||
maxDeltaRatio_
|
maxDeltaRatio_
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -59,8 +59,12 @@ public:
|
|||||||
//- Public member class used by mesh-wave to propagate the delta-ratio
|
//- Public member class used by mesh-wave to propagate the delta-ratio
|
||||||
class deltaData
|
class deltaData
|
||||||
{
|
{
|
||||||
|
// Private Member Data
|
||||||
|
|
||||||
|
//-
|
||||||
scalar delta_;
|
scalar delta_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Update. Gets information from neighbouring face/cell and
|
//- Update. Gets information from neighbouring face/cell and
|
||||||
@ -90,13 +94,14 @@ public:
|
|||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
|
//-
|
||||||
scalar delta() const
|
scalar delta() const
|
||||||
{
|
{
|
||||||
return delta_;
|
return delta_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Needed by FaceCellWave
|
// Needed by FvFaceCellWave
|
||||||
|
|
||||||
//- Check whether origin has been changed at all or
|
//- Check whether origin has been changed at all or
|
||||||
// still contains original (invalid) value.
|
// still contains original (invalid) value.
|
||||||
@ -108,7 +113,7 @@ public:
|
|||||||
template<class TrackingData>
|
template<class TrackingData>
|
||||||
inline bool sameGeometry
|
inline bool sameGeometry
|
||||||
(
|
(
|
||||||
const polyMesh&,
|
const fvMesh&,
|
||||||
const deltaData&,
|
const deltaData&,
|
||||||
const scalar,
|
const scalar,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
@ -118,7 +123,7 @@ public:
|
|||||||
template<class TrackingData>
|
template<class TrackingData>
|
||||||
inline void transform
|
inline void transform
|
||||||
(
|
(
|
||||||
const polyPatch& patch,
|
const fvPatch& patch,
|
||||||
const label patchFacei,
|
const label patchFacei,
|
||||||
const transformer& transform,
|
const transformer& transform,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
@ -128,9 +133,9 @@ public:
|
|||||||
template<class TrackingData>
|
template<class TrackingData>
|
||||||
inline bool updateCell
|
inline bool updateCell
|
||||||
(
|
(
|
||||||
const polyMesh&,
|
const fvMesh&,
|
||||||
const label thisCelli,
|
const label thisCelli,
|
||||||
const label neighbourFacei,
|
const labelPair& neighbourPatchAndFacei,
|
||||||
const deltaData& neighbourInfo,
|
const deltaData& neighbourInfo,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
@ -140,8 +145,8 @@ public:
|
|||||||
template<class TrackingData>
|
template<class TrackingData>
|
||||||
inline bool updateFace
|
inline bool updateFace
|
||||||
(
|
(
|
||||||
const polyMesh&,
|
const fvMesh&,
|
||||||
const label thisFacei,
|
const labelPair& thisPatchAndFacei,
|
||||||
const label neighbourCelli,
|
const label neighbourCelli,
|
||||||
const deltaData& neighbourInfo,
|
const deltaData& neighbourInfo,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
@ -152,8 +157,8 @@ public:
|
|||||||
template<class TrackingData>
|
template<class TrackingData>
|
||||||
inline bool updateFace
|
inline bool updateFace
|
||||||
(
|
(
|
||||||
const polyMesh&,
|
const fvMesh&,
|
||||||
const label thisFacei,
|
const labelPair& thisPatchAndFacei,
|
||||||
const deltaData& neighbourInfo,
|
const deltaData& neighbourInfo,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
@ -165,18 +170,14 @@ public:
|
|||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|
||||||
// Needed for List IO
|
|
||||||
inline bool operator==(const deltaData&) const;
|
inline bool operator==(const deltaData&) const;
|
||||||
|
|
||||||
inline bool operator!=(const deltaData&) const;
|
inline bool operator!=(const deltaData&) const;
|
||||||
|
|
||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|
||||||
friend Ostream& operator<<
|
friend Ostream& operator<<(Ostream& os, const deltaData& wDist)
|
||||||
(
|
|
||||||
Ostream& os,
|
|
||||||
const deltaData& wDist
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
return os << wDist.delta_;
|
return os << wDist.delta_;
|
||||||
}
|
}
|
||||||
@ -201,24 +202,24 @@ private:
|
|||||||
// Calculate the delta values
|
// Calculate the delta values
|
||||||
void calcDelta();
|
void calcDelta();
|
||||||
|
|
||||||
//- Fill changedFaces (with face labels) and changedFacesInfo
|
//- Fill changedPatchAndFaces (with patch and face labels) and
|
||||||
// (with delta).
|
// changedFacesInfo (with delta).
|
||||||
// This is the initial set of faces from which to start the waves.
|
// This is the initial set of faces from which to start the waves.
|
||||||
// Since there might be lots of places with delta jumps we can follow
|
// Since there might be lots of places with delta jumps we can follow
|
||||||
// various strategies for this initial 'seed'.
|
// various strategies for this initial 'seed'.
|
||||||
// - start from single cell/face and let FaceCellWave pick up all
|
// - start from single cell/face and let FvFaceCellWave pick up all
|
||||||
// others from there. might be quite a few waves before everything
|
// others from there. might be quite a few waves before everything
|
||||||
// settles.
|
// settles.
|
||||||
// - start from all faces. Lots of initial transfers.
|
// - start from all faces. Lots of initial transfers.
|
||||||
// We do something in between:
|
// We do something in between:
|
||||||
// - start from all faces where there is a jump. Since we cannot easily
|
// - start from all faces where there is a jump. Since we cannot easily
|
||||||
// determine this across coupled patches (cyclic, processor)
|
// determine this across coupled patches (cyclic, processor)
|
||||||
// introduce all faces of these and let FaceCellWave sort it out.
|
// introduce all faces of these and let FvFaceCellWave sort it out.
|
||||||
void setChangedFaces
|
void setChangedFaces
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const volScalarField& delta,
|
const volScalarField& delta,
|
||||||
DynamicList<label>& changedFaces,
|
DynamicList<labelPair>& changedPatchAndFaces,
|
||||||
DynamicList<deltaData>& changedFacesInfo
|
DynamicList<deltaData>& changedFacesInfo
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,8 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "smoothDelta.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class TrackingData>
|
template<class TrackingData>
|
||||||
@ -53,7 +55,9 @@ inline bool Foam::LESModels::smoothDelta::deltaData::update
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Neighbour is not too big for me or change is too small
|
// Neighbour is not too big for me or change is too small
|
||||||
// Nothing changed.
|
// ...
|
||||||
|
|
||||||
|
// Nothing changed
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -88,7 +92,7 @@ inline bool Foam::LESModels::smoothDelta::deltaData::valid
|
|||||||
template<class TrackingData>
|
template<class TrackingData>
|
||||||
inline bool Foam::LESModels::smoothDelta::deltaData::sameGeometry
|
inline bool Foam::LESModels::smoothDelta::deltaData::sameGeometry
|
||||||
(
|
(
|
||||||
const polyMesh&,
|
const fvMesh&,
|
||||||
const deltaData&,
|
const deltaData&,
|
||||||
const scalar,
|
const scalar,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
@ -101,7 +105,7 @@ inline bool Foam::LESModels::smoothDelta::deltaData::sameGeometry
|
|||||||
template<class TrackingData>
|
template<class TrackingData>
|
||||||
inline void Foam::LESModels::smoothDelta::deltaData::transform
|
inline void Foam::LESModels::smoothDelta::deltaData::transform
|
||||||
(
|
(
|
||||||
const polyPatch& patch,
|
const fvPatch& patch,
|
||||||
const label patchFacei,
|
const label patchFacei,
|
||||||
const transformer& transform,
|
const transformer& transform,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
@ -112,9 +116,9 @@ inline void Foam::LESModels::smoothDelta::deltaData::transform
|
|||||||
template<class TrackingData>
|
template<class TrackingData>
|
||||||
inline bool Foam::LESModels::smoothDelta::deltaData::updateCell
|
inline bool Foam::LESModels::smoothDelta::deltaData::updateCell
|
||||||
(
|
(
|
||||||
const polyMesh&,
|
const fvMesh&,
|
||||||
const label,
|
|
||||||
const label,
|
const label,
|
||||||
|
const labelPair&,
|
||||||
const deltaData& neighbourWallInfo,
|
const deltaData& neighbourWallInfo,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
@ -128,8 +132,8 @@ inline bool Foam::LESModels::smoothDelta::deltaData::updateCell
|
|||||||
template<class TrackingData>
|
template<class TrackingData>
|
||||||
inline bool Foam::LESModels::smoothDelta::deltaData::updateFace
|
inline bool Foam::LESModels::smoothDelta::deltaData::updateFace
|
||||||
(
|
(
|
||||||
const polyMesh&,
|
const fvMesh&,
|
||||||
const label,
|
const labelPair&,
|
||||||
const label,
|
const label,
|
||||||
const deltaData& neighbourWallInfo,
|
const deltaData& neighbourWallInfo,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
@ -144,8 +148,8 @@ inline bool Foam::LESModels::smoothDelta::deltaData::updateFace
|
|||||||
template<class TrackingData>
|
template<class TrackingData>
|
||||||
inline bool Foam::LESModels::smoothDelta::deltaData::updateFace
|
inline bool Foam::LESModels::smoothDelta::deltaData::updateFace
|
||||||
(
|
(
|
||||||
const polyMesh&,
|
const fvMesh&,
|
||||||
const label,
|
const labelPair&,
|
||||||
const deltaData& neighbourWallInfo,
|
const deltaData& neighbourWallInfo,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
|
|||||||
@ -25,8 +25,8 @@ License
|
|||||||
|
|
||||||
#include "vanDriestDelta.H"
|
#include "vanDriestDelta.H"
|
||||||
#include "wallFvPatch.H"
|
#include "wallFvPatch.H"
|
||||||
#include "patchDistWave.H"
|
#include "fvPatchDistWave.H"
|
||||||
#include "wallPointYPlus.H"
|
#include "fvWallPointYPlus.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
@ -79,23 +79,21 @@ void Foam::LESModels::vanDriestDelta::calcDelta()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar cutOff = wallPointYPlus::yPlusCutOff;
|
scalar cutOff = fvWallPointYPlus::yPlusCutOff;
|
||||||
wallPointYPlus::yPlusCutOff = 500;
|
fvWallPointYPlus::yPlusCutOff = 500;
|
||||||
volScalarField y
|
volScalarField y
|
||||||
(
|
(
|
||||||
volScalarField::New("y", mesh, dimensionedScalar(dimLength, great))
|
volScalarField::New("y", mesh, dimensionedScalar(dimLength, great))
|
||||||
);
|
);
|
||||||
patchDistWave::wave<wallPointYPlus, fvPatchField>
|
fvPatchDistWave::wave<fvWallPointYPlus>
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
mesh.boundaryMesh().findPatchIDs<wallPolyPatch>(),
|
mesh.boundaryMesh().findPatchIDs<wallPolyPatch>(),
|
||||||
ystar.boundaryField(),
|
ystar.boundaryField(),
|
||||||
y.primitiveFieldRef(),
|
y,
|
||||||
y.boundaryFieldRef(),
|
ystar
|
||||||
ystar.primitiveFieldRef(),
|
|
||||||
ystar.boundaryFieldRef()
|
|
||||||
);
|
);
|
||||||
wallPointYPlus::yPlusCutOff = cutOff;
|
fvWallPointYPlus::yPlusCutOff = cutOff;
|
||||||
|
|
||||||
delta_ = min
|
delta_ = min
|
||||||
(
|
(
|
||||||
|
|||||||
@ -582,6 +582,9 @@ $(polyTopoChangeMap)/faceMapper/faceMapper.C
|
|||||||
$(polyTopoChangeMap)/cellMapper/cellMapper.C
|
$(polyTopoChangeMap)/cellMapper/cellMapper.C
|
||||||
$(polyTopoChangeMap)/mapAddedPolyMesh.C
|
$(polyTopoChangeMap)/mapAddedPolyMesh.C
|
||||||
|
|
||||||
|
polyMeshMap = $(polyMesh)/polyMeshMap
|
||||||
|
$(polyMeshMap)/polyMeshMap.C
|
||||||
|
|
||||||
polyDistributionMap = $(polyMesh)/polyDistributionMap
|
polyDistributionMap = $(polyMesh)/polyDistributionMap
|
||||||
$(polyDistributionMap)/distributionMap.C
|
$(polyDistributionMap)/distributionMap.C
|
||||||
$(polyDistributionMap)/distributionMapBase.C
|
$(polyDistributionMap)/distributionMapBase.C
|
||||||
|
|||||||
@ -128,17 +128,6 @@ bool Foam::IOOutputFilter<OutputFilter>::write(const bool write)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class OutputFilter>
|
|
||||||
void Foam::IOOutputFilter<OutputFilter>::updateMesh
|
|
||||||
(
|
|
||||||
const polyTopoChangeMap& map
|
|
||||||
)
|
|
||||||
{
|
|
||||||
read();
|
|
||||||
OutputFilter::updateMesh(map);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class OutputFilter>
|
template<class OutputFilter>
|
||||||
void Foam::IOOutputFilter<OutputFilter>::movePoints(const polyMesh& mesh)
|
void Foam::IOOutputFilter<OutputFilter>::movePoints(const polyMesh& mesh)
|
||||||
{
|
{
|
||||||
@ -147,4 +136,26 @@ void Foam::IOOutputFilter<OutputFilter>::movePoints(const polyMesh& mesh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class OutputFilter>
|
||||||
|
void Foam::IOOutputFilter<OutputFilter>::topoChange
|
||||||
|
(
|
||||||
|
const polyTopoChangeMap& map
|
||||||
|
)
|
||||||
|
{
|
||||||
|
read();
|
||||||
|
OutputFilter::topoChange(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class OutputFilter>
|
||||||
|
void Foam::IOOutputFilter<OutputFilter>::mapMesh
|
||||||
|
(
|
||||||
|
const polyMeshMap& map
|
||||||
|
)
|
||||||
|
{
|
||||||
|
read();
|
||||||
|
OutputFilter::mapMesh(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -51,6 +51,7 @@ namespace Foam
|
|||||||
|
|
||||||
// Forward declaration of classes
|
// Forward declaration of classes
|
||||||
class polyTopoChangeMap;
|
class polyTopoChangeMap;
|
||||||
|
class polyMeshMap;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class IOOutputFilter Declaration
|
Class IOOutputFilter Declaration
|
||||||
@ -125,12 +126,15 @@ public:
|
|||||||
//- Sample and write
|
//- Sample and write
|
||||||
virtual bool write(const bool write = true);
|
virtual bool write(const bool write = true);
|
||||||
|
|
||||||
//- Update for changes of mesh
|
//- Update topology using the given map
|
||||||
virtual void updateMesh(const polyTopoChangeMap& map);
|
|
||||||
|
|
||||||
//- Update for changes of mesh
|
|
||||||
virtual void movePoints(const polyMesh& mesh);
|
virtual void movePoints(const polyMesh& mesh);
|
||||||
|
|
||||||
|
//- Update topology using the given map
|
||||||
|
virtual void topoChange(const polyTopoChangeMap& map);
|
||||||
|
|
||||||
|
//- Update from another mesh using the given map
|
||||||
|
virtual void mapMesh(const polyMeshMap&);
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|
||||||
|
|||||||
@ -156,12 +156,16 @@ Foam::scalar Foam::functionObject::timeToNextWrite()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::functionObject::updateMesh(const polyTopoChangeMap&)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::functionObject::movePoints(const polyMesh&)
|
void Foam::functionObject::movePoints(const polyMesh&)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::functionObject::topoChange(const polyTopoChangeMap&)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::functionObject::mapMesh(const polyMeshMap&)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -133,6 +133,7 @@ namespace Foam
|
|||||||
class Time;
|
class Time;
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
class polyTopoChangeMap;
|
class polyTopoChangeMap;
|
||||||
|
class polyMeshMap;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class functionObject Declaration
|
Class functionObject Declaration
|
||||||
@ -238,12 +239,15 @@ public:
|
|||||||
// time. Returns the write time, or vGreat.
|
// time. Returns the write time, or vGreat.
|
||||||
virtual scalar timeToNextWrite();
|
virtual scalar timeToNextWrite();
|
||||||
|
|
||||||
//- Update for changes of mesh
|
//- Update topology using the given map
|
||||||
virtual void updateMesh(const polyTopoChangeMap& map);
|
|
||||||
|
|
||||||
//- Update for changes of mesh
|
|
||||||
virtual void movePoints(const polyMesh& mesh);
|
virtual void movePoints(const polyMesh& mesh);
|
||||||
|
|
||||||
|
//- Update topology using the given map
|
||||||
|
virtual void topoChange(const polyTopoChangeMap& map);
|
||||||
|
|
||||||
|
//- Update from another mesh using the given map
|
||||||
|
virtual void mapMesh(const polyMeshMap&);
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|
||||||
|
|||||||
@ -844,18 +844,6 @@ bool Foam::functionObjectList::read()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::functionObjectList::updateMesh(const polyTopoChangeMap& map)
|
|
||||||
{
|
|
||||||
if (execution_)
|
|
||||||
{
|
|
||||||
forAll(*this, oi)
|
|
||||||
{
|
|
||||||
operator[](oi).updateMesh(map);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::functionObjectList::movePoints(const polyMesh& mesh)
|
void Foam::functionObjectList::movePoints(const polyMesh& mesh)
|
||||||
{
|
{
|
||||||
if (execution_)
|
if (execution_)
|
||||||
@ -868,4 +856,28 @@ void Foam::functionObjectList::movePoints(const polyMesh& mesh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::functionObjectList::topoChange(const polyTopoChangeMap& map)
|
||||||
|
{
|
||||||
|
if (execution_)
|
||||||
|
{
|
||||||
|
forAll(*this, oi)
|
||||||
|
{
|
||||||
|
operator[](oi).topoChange(map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::functionObjectList::mapMesh(const polyMeshMap& map)
|
||||||
|
{
|
||||||
|
if (execution_)
|
||||||
|
{
|
||||||
|
forAll(*this, oi)
|
||||||
|
{
|
||||||
|
operator[](oi).mapMesh(map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -53,6 +53,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
class polyTopoChangeMap;
|
class polyTopoChangeMap;
|
||||||
|
class polyMeshMap;
|
||||||
class argList;
|
class argList;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
@ -154,7 +155,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
~functionObjectList();
|
virtual ~functionObjectList();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -272,11 +273,14 @@ public:
|
|||||||
//- Return the time to the next write
|
//- Return the time to the next write
|
||||||
scalar timeToNextWrite();
|
scalar timeToNextWrite();
|
||||||
|
|
||||||
//- Update for changes of mesh
|
//- Update topology using the given map
|
||||||
void updateMesh(const polyTopoChangeMap& map);
|
virtual void movePoints(const polyMesh& mesh);
|
||||||
|
|
||||||
//- Update for changes of mesh
|
//- Update topology using the given map
|
||||||
void movePoints(const polyMesh& mesh);
|
virtual void topoChange(const polyTopoChangeMap& map);
|
||||||
|
|
||||||
|
//- Update from another mesh using the given map
|
||||||
|
virtual void mapMesh(const polyMeshMap&);
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|||||||
@ -26,6 +26,7 @@ License
|
|||||||
#include "timeControlFunctionObject.H"
|
#include "timeControlFunctionObject.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "polyTopoChangeMap.H"
|
#include "polyTopoChangeMap.H"
|
||||||
|
#include "polyMeshMap.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
@ -197,18 +198,6 @@ bool Foam::functionObjects::timeControl::read(const dictionary& dict)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::functionObjects::timeControl::updateMesh
|
|
||||||
(
|
|
||||||
const polyTopoChangeMap& map
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (active())
|
|
||||||
{
|
|
||||||
foPtr_->updateMesh(map);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::functionObjects::timeControl::movePoints(const polyMesh& mesh)
|
void Foam::functionObjects::timeControl::movePoints(const polyMesh& mesh)
|
||||||
{
|
{
|
||||||
if (active())
|
if (active())
|
||||||
@ -218,4 +207,28 @@ void Foam::functionObjects::timeControl::movePoints(const polyMesh& mesh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::functionObjects::timeControl::topoChange
|
||||||
|
(
|
||||||
|
const polyTopoChangeMap& map
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (active())
|
||||||
|
{
|
||||||
|
foPtr_->topoChange(map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::functionObjects::timeControl::mapMesh
|
||||||
|
(
|
||||||
|
const polyMeshMap& map
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (active())
|
||||||
|
{
|
||||||
|
foPtr_->mapMesh(map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -162,12 +162,15 @@ public:
|
|||||||
//- Read and set the function object if its data have changed
|
//- Read and set the function object if its data have changed
|
||||||
virtual bool read(const dictionary&);
|
virtual bool read(const dictionary&);
|
||||||
|
|
||||||
//- Update for changes of mesh
|
//- Update topology using the given map
|
||||||
virtual void updateMesh(const polyTopoChangeMap& map);
|
|
||||||
|
|
||||||
//- Update for changes of mesh
|
|
||||||
virtual void movePoints(const polyMesh& mesh);
|
virtual void movePoints(const polyMesh& mesh);
|
||||||
|
|
||||||
|
//- Update topology using the given map
|
||||||
|
virtual void topoChange(const polyTopoChangeMap& map);
|
||||||
|
|
||||||
|
//- Update from another mesh using the given map
|
||||||
|
virtual void mapMesh(const polyMeshMap&);
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|
||||||
|
|||||||
@ -321,7 +321,7 @@ void Foam::meshObject::distribute
|
|||||||
|
|
||||||
|
|
||||||
template<class Mesh>
|
template<class Mesh>
|
||||||
void Foam::meshObject::updateMesh
|
void Foam::meshObject::topoChange
|
||||||
(
|
(
|
||||||
objectRegistry& obr,
|
objectRegistry& obr,
|
||||||
const polyTopoChangeMap& map
|
const polyTopoChangeMap& map
|
||||||
@ -334,7 +334,7 @@ void Foam::meshObject::updateMesh
|
|||||||
|
|
||||||
if (meshObject::debug)
|
if (meshObject::debug)
|
||||||
{
|
{
|
||||||
Pout<< "meshObject::updateMesh(objectRegistry&, "
|
Pout<< "meshObject::topoChange(objectRegistry&, "
|
||||||
"const polyTopoChangeMap& map) : updating " << Mesh::typeName
|
"const polyTopoChangeMap& map) : updating " << Mesh::typeName
|
||||||
<< " meshObjects for region " << obr.name() << endl;
|
<< " meshObjects for region " << obr.name() << endl;
|
||||||
}
|
}
|
||||||
@ -352,7 +352,53 @@ void Foam::meshObject::updateMesh
|
|||||||
{
|
{
|
||||||
Pout<< " Updating " << iter()->name() << endl;
|
Pout<< " Updating " << iter()->name() << endl;
|
||||||
}
|
}
|
||||||
dynamic_cast<UpdateableMeshObject<Mesh>*>(iter())->updateMesh(map);
|
dynamic_cast<UpdateableMeshObject<Mesh>*>(iter())->topoChange(map);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (meshObject::debug)
|
||||||
|
{
|
||||||
|
Pout<< " Destroying " << iter()->name() << endl;
|
||||||
|
}
|
||||||
|
obr.checkOut(*iter());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Mesh>
|
||||||
|
void Foam::meshObject::mapMesh
|
||||||
|
(
|
||||||
|
objectRegistry& obr,
|
||||||
|
const polyMeshMap& map
|
||||||
|
)
|
||||||
|
{
|
||||||
|
HashTable<GeometricMeshObject<Mesh>*> meshObjects
|
||||||
|
(
|
||||||
|
obr.lookupClass<GeometricMeshObject<Mesh>>()
|
||||||
|
);
|
||||||
|
|
||||||
|
if (meshObject::debug)
|
||||||
|
{
|
||||||
|
Pout<< "meshObject::mapMesh(objectRegistry&, "
|
||||||
|
"const polyMeshMap& map) : updating " << Mesh::typeName
|
||||||
|
<< " meshObjects for region " << obr.name() << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
forAllIter
|
||||||
|
(
|
||||||
|
typename HashTable<GeometricMeshObject<Mesh>*>,
|
||||||
|
meshObjects,
|
||||||
|
iter
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (isA<UpdateableMeshObject<Mesh>>(*iter()))
|
||||||
|
{
|
||||||
|
if (meshObject::debug)
|
||||||
|
{
|
||||||
|
Pout<< " Updating " << iter()->name() << endl;
|
||||||
|
}
|
||||||
|
dynamic_cast<UpdateableMeshObject<Mesh>*>(iter())->mapMesh(map);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -51,13 +51,13 @@ Description
|
|||||||
- TopologicalMeshObject: mesh object to be deleted on topology change
|
- TopologicalMeshObject: mesh object to be deleted on topology change
|
||||||
- GeometricMeshObject: mesh object to be deleted on geometry change
|
- GeometricMeshObject: mesh object to be deleted on geometry change
|
||||||
- MoveableMeshObject: mesh object to be updated in movePoints
|
- MoveableMeshObject: mesh object to be updated in movePoints
|
||||||
- UpdateableMeshObject: mesh object to be updated in updateMesh or
|
- UpdateableMeshObject: mesh object to be updated in topoChange or
|
||||||
movePoints
|
movePoints
|
||||||
- PatchMeshObject: mesh object to be additionally updated patch changes
|
- PatchMeshObject: mesh object to be additionally updated patch changes
|
||||||
|
|
||||||
Note
|
Note
|
||||||
movePoints must be provided for MeshObjects of type MoveableMeshObject
|
movePoints must be provided for MeshObjects of type MoveableMeshObject
|
||||||
and both movePoints and updateMesh functions must exist, provided for
|
and both movePoints and topoChange functions must exist, provided for
|
||||||
MeshObjects of type UpdateableMeshObject.
|
MeshObjects of type UpdateableMeshObject.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
@ -77,6 +77,7 @@ namespace Foam
|
|||||||
|
|
||||||
// Forward declarations
|
// Forward declarations
|
||||||
class polyTopoChangeMap;
|
class polyTopoChangeMap;
|
||||||
|
class polyMeshMap;
|
||||||
class polyDistributionMap;
|
class polyDistributionMap;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
@ -173,7 +174,10 @@ public:
|
|||||||
static void movePoints(objectRegistry&);
|
static void movePoints(objectRegistry&);
|
||||||
|
|
||||||
template<class Mesh>
|
template<class Mesh>
|
||||||
static void updateMesh(objectRegistry&, const polyTopoChangeMap&);
|
static void topoChange(objectRegistry&, const polyTopoChangeMap&);
|
||||||
|
|
||||||
|
template<class Mesh>
|
||||||
|
static void mapMesh(objectRegistry&, const polyMeshMap&);
|
||||||
|
|
||||||
template<class Mesh>
|
template<class Mesh>
|
||||||
static void distribute(objectRegistry&, const polyDistributionMap&);
|
static void distribute(objectRegistry&, const polyDistributionMap&);
|
||||||
@ -321,7 +325,9 @@ public:
|
|||||||
DistributeableMeshObject<Mesh>(typeName, io)
|
DistributeableMeshObject<Mesh>(typeName, io)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual void updateMesh(const polyTopoChangeMap& map) = 0;
|
virtual void topoChange(const polyTopoChangeMap& map) = 0;
|
||||||
|
|
||||||
|
virtual void mapMesh(const polyMeshMap& map) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -156,7 +156,7 @@ void Foam::pointBoundaryMesh::movePoints(const pointField& p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::pointBoundaryMesh::updateMesh()
|
void Foam::pointBoundaryMesh::topoChange()
|
||||||
{
|
{
|
||||||
PstreamBuffers pBufs(Pstream::defaultCommsType);
|
PstreamBuffers pBufs(Pstream::defaultCommsType);
|
||||||
|
|
||||||
@ -168,14 +168,14 @@ void Foam::pointBoundaryMesh::updateMesh()
|
|||||||
{
|
{
|
||||||
forAll(*this, patchi)
|
forAll(*this, patchi)
|
||||||
{
|
{
|
||||||
operator[](patchi).initUpdateMesh(pBufs);
|
operator[](patchi).initTopoChange(pBufs);
|
||||||
}
|
}
|
||||||
|
|
||||||
pBufs.finishedSends();
|
pBufs.finishedSends();
|
||||||
|
|
||||||
forAll(*this, patchi)
|
forAll(*this, patchi)
|
||||||
{
|
{
|
||||||
operator[](patchi).updateMesh(pBufs);
|
operator[](patchi).topoChange(pBufs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
|
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
|
||||||
@ -191,11 +191,11 @@ void Foam::pointBoundaryMesh::updateMesh()
|
|||||||
|
|
||||||
if (patchSchedule[patchEvali].init)
|
if (patchSchedule[patchEvali].init)
|
||||||
{
|
{
|
||||||
operator[](patchi).initUpdateMesh(pBufs);
|
operator[](patchi).initTopoChange(pBufs);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
operator[](patchi).updateMesh(pBufs);
|
operator[](patchi).topoChange(pBufs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -227,7 +227,7 @@ void Foam::pointBoundaryMesh::shuffle
|
|||||||
pointPatchList::shuffle(newToOld);
|
pointPatchList::shuffle(newToOld);
|
||||||
if (validBoundary)
|
if (validBoundary)
|
||||||
{
|
{
|
||||||
updateMesh();
|
topoChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -103,14 +103,14 @@ public:
|
|||||||
void movePoints(const pointField&);
|
void movePoints(const pointField&);
|
||||||
|
|
||||||
//- Correct pointBoundaryMesh after topology update
|
//- Correct pointBoundaryMesh after topology update
|
||||||
void updateMesh();
|
void topoChange();
|
||||||
|
|
||||||
//- Create pointBoundaryMesh from polyBoundaryMesh
|
//- Create pointBoundaryMesh from polyBoundaryMesh
|
||||||
void reset(const polyBoundaryMesh&);
|
void reset(const polyBoundaryMesh&);
|
||||||
|
|
||||||
//- Reorders patches. Ordering does not have to be done in
|
//- Reorders patches. Ordering does not have to be done in
|
||||||
// ascending or descending order. Reordering has to be unique.
|
// ascending or descending order. Reordering has to be unique.
|
||||||
// (is shuffle). If validBoundary calls updateMesh()
|
// (is shuffle). If validBoundary calls topoChange()
|
||||||
// after reordering to recalculate data (so call needs to be parallel
|
// after reordering to recalculate data (so call needs to be parallel
|
||||||
// sync in that case)
|
// sync in that case)
|
||||||
void shuffle(const labelUList& newToOld, const bool validBoundary);
|
void shuffle(const labelUList& newToOld, const bool validBoundary);
|
||||||
|
|||||||
@ -90,30 +90,6 @@ void Foam::pointMesh::reset(const bool validBoundary)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::pointMesh::updateMesh(const polyTopoChangeMap& map)
|
|
||||||
{
|
|
||||||
if (debug)
|
|
||||||
{
|
|
||||||
Pout<< "pointMesh::updateMesh(const polyTopoChangeMap&): "
|
|
||||||
<< "Updating for topology changes." << endl;
|
|
||||||
Pout<< endl;
|
|
||||||
}
|
|
||||||
boundary_.updateMesh();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::pointMesh::distribute(const polyDistributionMap& map)
|
|
||||||
{
|
|
||||||
if (debug)
|
|
||||||
{
|
|
||||||
Pout<< "pointMesh::distribute(const polyDistributionMap&): "
|
|
||||||
<< "Distribute." << endl;
|
|
||||||
Pout<< endl;
|
|
||||||
}
|
|
||||||
boundary_.updateMesh();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool Foam::pointMesh::movePoints()
|
bool Foam::pointMesh::movePoints()
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
@ -128,6 +104,42 @@ bool Foam::pointMesh::movePoints()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::pointMesh::topoChange(const polyTopoChangeMap& map)
|
||||||
|
{
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
Pout<< "pointMesh::topoChange(const polyTopoChangeMap&): "
|
||||||
|
<< "Topology change." << endl;
|
||||||
|
Pout<< endl;
|
||||||
|
}
|
||||||
|
boundary_.topoChange();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::pointMesh::mapMesh(const polyMeshMap& map)
|
||||||
|
{
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
Pout<< "pointMesh::mapMesh(const polyMeshMap&): "
|
||||||
|
<< "Mesh mapping." << endl;
|
||||||
|
Pout<< endl;
|
||||||
|
}
|
||||||
|
boundary_.topoChange();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::pointMesh::distribute(const polyDistributionMap& map)
|
||||||
|
{
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
Pout<< "pointMesh::distribute(const polyDistributionMap&): "
|
||||||
|
<< "Distribute." << endl;
|
||||||
|
Pout<< endl;
|
||||||
|
}
|
||||||
|
boundary_.topoChange();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::pointMesh::reorderPatches
|
void Foam::pointMesh::reorderPatches
|
||||||
(
|
(
|
||||||
const labelUList& newToOld,
|
const labelUList& newToOld,
|
||||||
|
|||||||
@ -118,15 +118,18 @@ public:
|
|||||||
|
|
||||||
// Mesh callbacks
|
// Mesh callbacks
|
||||||
|
|
||||||
|
//- Move points
|
||||||
|
virtual bool movePoints();
|
||||||
|
|
||||||
//- Update the mesh corresponding to given map
|
//- Update the mesh corresponding to given map
|
||||||
virtual void updateMesh(const polyTopoChangeMap&);
|
virtual void topoChange(const polyTopoChangeMap&);
|
||||||
|
|
||||||
|
//- Update from another mesh using the given map
|
||||||
|
virtual void mapMesh(const polyMeshMap&);
|
||||||
|
|
||||||
//- Redistribute or update using the given distribution map
|
//- Redistribute or update using the given distribution map
|
||||||
virtual void distribute(const polyDistributionMap&);
|
virtual void distribute(const polyDistributionMap&);
|
||||||
|
|
||||||
//- Move points
|
|
||||||
virtual bool movePoints();
|
|
||||||
|
|
||||||
//- Reordered/removed trailing patches. If validBoundary call is
|
//- Reordered/removed trailing patches. If validBoundary call is
|
||||||
// parallel synced and all add the same patch with same settings
|
// parallel synced and all add the same patch with same settings
|
||||||
virtual void reorderPatches
|
virtual void reorderPatches
|
||||||
|
|||||||
@ -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) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -77,10 +77,10 @@ protected:
|
|||||||
virtual void movePoints(PstreamBuffers&, const pointField&) = 0;
|
virtual void movePoints(PstreamBuffers&, const pointField&) = 0;
|
||||||
|
|
||||||
//- Initialise the update of the patch topology
|
//- Initialise the update of the patch topology
|
||||||
virtual void initUpdateMesh(PstreamBuffers&) = 0;
|
virtual void initTopoChange(PstreamBuffers&) = 0;
|
||||||
|
|
||||||
//- Update of the patch topology
|
//- Update of the patch topology
|
||||||
virtual void updateMesh(PstreamBuffers&) = 0;
|
virtual void topoChange(PstreamBuffers&) = 0;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -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) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -62,16 +62,16 @@ void Foam::cyclicPointPatch::movePoints(PstreamBuffers&, const pointField&)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
void Foam::cyclicPointPatch::initUpdateMesh(PstreamBuffers& pBufs)
|
void Foam::cyclicPointPatch::initTopoChange(PstreamBuffers& pBufs)
|
||||||
{
|
{
|
||||||
facePointPatch::initUpdateMesh(pBufs);
|
facePointPatch::initTopoChange(pBufs);
|
||||||
cyclicPointPatch::initCalcGeometry(pBufs);
|
cyclicPointPatch::initCalcGeometry(pBufs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::cyclicPointPatch::updateMesh(PstreamBuffers& pBufs)
|
void Foam::cyclicPointPatch::topoChange(PstreamBuffers& pBufs)
|
||||||
{
|
{
|
||||||
facePointPatch::updateMesh(pBufs);
|
facePointPatch::topoChange(pBufs);
|
||||||
cyclicPointPatch::calcGeometry(pBufs);
|
cyclicPointPatch::calcGeometry(pBufs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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) 2011-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -82,10 +82,10 @@ class cyclicPointPatch
|
|||||||
virtual void movePoints(PstreamBuffers&, const pointField&);
|
virtual void movePoints(PstreamBuffers&, const pointField&);
|
||||||
|
|
||||||
//- Initialise the update of the patch topology
|
//- Initialise the update of the patch topology
|
||||||
virtual void initUpdateMesh(PstreamBuffers&);
|
virtual void initTopoChange(PstreamBuffers&);
|
||||||
|
|
||||||
//- Update of the patch topology
|
//- Update of the patch topology
|
||||||
virtual void updateMesh(PstreamBuffers&);
|
virtual void topoChange(PstreamBuffers&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -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) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -88,16 +88,16 @@ void Foam::processorPointPatch::movePoints(PstreamBuffers&, const pointField&)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
void Foam::processorPointPatch::initUpdateMesh(PstreamBuffers& pBufs)
|
void Foam::processorPointPatch::initTopoChange(PstreamBuffers& pBufs)
|
||||||
{
|
{
|
||||||
facePointPatch::initUpdateMesh(pBufs);
|
facePointPatch::initTopoChange(pBufs);
|
||||||
processorPointPatch::initCalcGeometry(pBufs);
|
processorPointPatch::initCalcGeometry(pBufs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::processorPointPatch::updateMesh(PstreamBuffers& pBufs)
|
void Foam::processorPointPatch::topoChange(PstreamBuffers& pBufs)
|
||||||
{
|
{
|
||||||
facePointPatch::updateMesh(pBufs);
|
facePointPatch::topoChange(pBufs);
|
||||||
processorPointPatch::calcGeometry(pBufs);
|
processorPointPatch::calcGeometry(pBufs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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) 2011-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -81,10 +81,10 @@ class processorPointPatch
|
|||||||
virtual void movePoints(PstreamBuffers&, const pointField&);
|
virtual void movePoints(PstreamBuffers&, const pointField&);
|
||||||
|
|
||||||
//- Initialise the update of the patch topology
|
//- Initialise the update of the patch topology
|
||||||
virtual void initUpdateMesh(PstreamBuffers&);
|
virtual void initTopoChange(PstreamBuffers&);
|
||||||
|
|
||||||
//- Update of the patch topology
|
//- Update of the patch topology
|
||||||
virtual void updateMesh(PstreamBuffers&);
|
virtual void topoChange(PstreamBuffers&);
|
||||||
|
|
||||||
|
|
||||||
//- Disallow default bitwise copy construction
|
//- Disallow default bitwise copy construction
|
||||||
|
|||||||
@ -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) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -66,13 +66,13 @@ void facePointPatch::movePoints(PstreamBuffers&, const pointField&)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
void facePointPatch::initUpdateMesh(PstreamBuffers& pBufs)
|
void facePointPatch::initTopoChange(PstreamBuffers& pBufs)
|
||||||
{
|
{
|
||||||
facePointPatch::initCalcGeometry(pBufs);
|
facePointPatch::initCalcGeometry(pBufs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void facePointPatch::updateMesh(PstreamBuffers&)
|
void facePointPatch::topoChange(PstreamBuffers&)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -79,10 +79,10 @@ protected:
|
|||||||
virtual void movePoints(PstreamBuffers&, const pointField&);
|
virtual void movePoints(PstreamBuffers&, const pointField&);
|
||||||
|
|
||||||
//- Initialise the update of the patch topology
|
//- Initialise the update of the patch topology
|
||||||
virtual void initUpdateMesh(PstreamBuffers&);
|
virtual void initTopoChange(PstreamBuffers&);
|
||||||
|
|
||||||
//- Update of the patch topology
|
//- Update of the patch topology
|
||||||
virtual void updateMesh(PstreamBuffers&);
|
virtual void topoChange(PstreamBuffers&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -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) 2011-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -86,11 +86,11 @@ protected:
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
//- Initialise the update of the patch topology
|
//- Initialise the update of the patch topology
|
||||||
virtual void initUpdateMesh(PstreamBuffers&)
|
virtual void initTopoChange(PstreamBuffers&)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//- Update of the patch topology
|
//- Update of the patch topology
|
||||||
virtual void updateMesh(PstreamBuffers&)
|
virtual void topoChange(PstreamBuffers&)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1784,7 +1784,7 @@ Foam::globalMeshData::globalMeshData(const polyMesh& mesh)
|
|||||||
sharedEdgeLabelsPtr_(nullptr),
|
sharedEdgeLabelsPtr_(nullptr),
|
||||||
sharedEdgeAddrPtr_(nullptr)
|
sharedEdgeAddrPtr_(nullptr)
|
||||||
{
|
{
|
||||||
updateMesh();
|
topoChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2761,7 +2761,7 @@ void Foam::globalMeshData::movePoints(const pointField& newPoints)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::globalMeshData::updateMesh()
|
void Foam::globalMeshData::topoChange()
|
||||||
{
|
{
|
||||||
// Clear out old data
|
// Clear out old data
|
||||||
clearOut();
|
clearOut();
|
||||||
|
|||||||
@ -626,7 +626,7 @@ public:
|
|||||||
//- Change global mesh data given a topological change. Does a
|
//- Change global mesh data given a topological change. Does a
|
||||||
// full parallel analysis to determine shared points and
|
// full parallel analysis to determine shared points and
|
||||||
// boundaries.
|
// boundaries.
|
||||||
void updateMesh();
|
void topoChange();
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|||||||
@ -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) 2011-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -1056,7 +1056,7 @@ void Foam::polyBoundaryMesh::movePoints(const pointField& p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::polyBoundaryMesh::updateMesh()
|
void Foam::polyBoundaryMesh::topoChange()
|
||||||
{
|
{
|
||||||
nbrEdgesPtr_.clear();
|
nbrEdgesPtr_.clear();
|
||||||
patchIDPtr_.clear();
|
patchIDPtr_.clear();
|
||||||
@ -1072,14 +1072,14 @@ void Foam::polyBoundaryMesh::updateMesh()
|
|||||||
{
|
{
|
||||||
forAll(*this, patchi)
|
forAll(*this, patchi)
|
||||||
{
|
{
|
||||||
operator[](patchi).initUpdateMesh(pBufs);
|
operator[](patchi).initTopoChange(pBufs);
|
||||||
}
|
}
|
||||||
|
|
||||||
pBufs.finishedSends();
|
pBufs.finishedSends();
|
||||||
|
|
||||||
forAll(*this, patchi)
|
forAll(*this, patchi)
|
||||||
{
|
{
|
||||||
operator[](patchi).updateMesh(pBufs);
|
operator[](patchi).topoChange(pBufs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
|
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
|
||||||
@ -1095,11 +1095,11 @@ void Foam::polyBoundaryMesh::updateMesh()
|
|||||||
|
|
||||||
if (patchSchedule[patchEvali].init)
|
if (patchSchedule[patchEvali].init)
|
||||||
{
|
{
|
||||||
operator[](patchi).initUpdateMesh(pBufs);
|
operator[](patchi).initTopoChange(pBufs);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
operator[](patchi).updateMesh(pBufs);
|
operator[](patchi).topoChange(pBufs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1123,7 +1123,7 @@ void Foam::polyBoundaryMesh::renamePatches
|
|||||||
|
|
||||||
if (validBoundary)
|
if (validBoundary)
|
||||||
{
|
{
|
||||||
updateMesh();
|
topoChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1149,7 +1149,7 @@ void Foam::polyBoundaryMesh::reorderPatches
|
|||||||
|
|
||||||
if (validBoundary)
|
if (validBoundary)
|
||||||
{
|
{
|
||||||
updateMesh();
|
topoChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -219,16 +219,16 @@ public:
|
|||||||
void movePoints(const pointField&);
|
void movePoints(const pointField&);
|
||||||
|
|
||||||
//- Correct polyBoundaryMesh after topology update
|
//- Correct polyBoundaryMesh after topology update
|
||||||
void updateMesh();
|
void topoChange();
|
||||||
|
|
||||||
//- Rename the patches. If validBoundary is set this calls updateMesh()
|
//- Rename the patches. If validBoundary is set this calls topoChange()
|
||||||
// after reordering to recalculate data (so the call needs to be
|
// after reordering to recalculate data (so the call needs to be
|
||||||
// parallel synchronised).
|
// parallel synchronised).
|
||||||
void renamePatches(const wordUList& newNames, const bool validBoundary);
|
void renamePatches(const wordUList& newNames, const bool validBoundary);
|
||||||
|
|
||||||
//- Reorders the patches. Ordering does not have to be done in
|
//- Reorders the patches. Ordering does not have to be done in
|
||||||
// ascending or descending order. Reordering has to be unique (is a
|
// ascending or descending order. Reordering has to be unique (is a
|
||||||
// shuffle). If validBoundary is set this calls updateMesh() after
|
// shuffle). If validBoundary is set this calls topoChange() after
|
||||||
// reordering to recalculate data (so the call needs to be parallel
|
// reordering to recalculate data (so the call needs to be parallel
|
||||||
// synchronised).
|
// synchronised).
|
||||||
void reorderPatches
|
void reorderPatches
|
||||||
|
|||||||
@ -551,19 +551,12 @@ public:
|
|||||||
// storage (local data first, then non-local data)
|
// storage (local data first, then non-local data)
|
||||||
void printLayout(Ostream& os) const;
|
void printLayout(Ostream& os) const;
|
||||||
|
|
||||||
//- Correct for topo change.
|
|
||||||
void updateMesh(const polyTopoChangeMap&)
|
|
||||||
{
|
|
||||||
notImplemented
|
|
||||||
(
|
|
||||||
"distributionMap::updateMesh(const polyTopoChangeMap&)"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|
||||||
void operator=(const distributionMap&);
|
void operator=(const distributionMap&);
|
||||||
|
|
||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|
||||||
//- Read dictionary from Istream
|
//- Read dictionary from Istream
|
||||||
@ -571,7 +564,6 @@ public:
|
|||||||
|
|
||||||
//- Write dictionary to Ostream
|
//- Write dictionary to Ostream
|
||||||
friend Ostream& operator<<(Ostream&, const distributionMap&);
|
friend Ostream& operator<<(Ostream&, const distributionMap&);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -81,11 +81,9 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
class polyTopoChangeMap;
|
|
||||||
class globalIndex;
|
class globalIndex;
|
||||||
class PstreamBuffers;
|
class PstreamBuffers;
|
||||||
|
|
||||||
|
|
||||||
// Forward declaration of friend functions and operators
|
// Forward declaration of friend functions and operators
|
||||||
|
|
||||||
class distributionMapBase;
|
class distributionMapBase;
|
||||||
@ -455,12 +453,6 @@ public:
|
|||||||
// storage (local data first, then non-local data)
|
// storage (local data first, then non-local data)
|
||||||
void printLayout(Ostream& os) const;
|
void printLayout(Ostream& os) const;
|
||||||
|
|
||||||
//- Correct for topo change.
|
|
||||||
void updateMesh(const polyTopoChangeMap&)
|
|
||||||
{
|
|
||||||
NotImplemented;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|
||||||
|
|||||||
@ -42,8 +42,6 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
class polyTopoChangeMap;
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class lagrangianDistributionMap Declaration
|
Class lagrangianDistributionMap Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -102,12 +100,6 @@ public:
|
|||||||
{
|
{
|
||||||
particleMap_.distribute(lst);
|
particleMap_.distribute(lst);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Correct for topo change.
|
|
||||||
void updateMesh(const polyTopoChangeMap&)
|
|
||||||
{
|
|
||||||
NotImplemented;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -48,10 +48,8 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
class polyTopoChangeMap;
|
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
|
|
||||||
|
|
||||||
// Forward declaration of friend functions and operators
|
// Forward declaration of friend functions and operators
|
||||||
|
|
||||||
class polyDistributionMap;
|
class polyDistributionMap;
|
||||||
@ -277,13 +275,6 @@ public:
|
|||||||
void distributePatchIndices(labelList& patchIDs) const;
|
void distributePatchIndices(labelList& patchIDs) const;
|
||||||
|
|
||||||
|
|
||||||
//- Correct for topo change.
|
|
||||||
void updateMesh(const polyTopoChangeMap&)
|
|
||||||
{
|
|
||||||
NotImplemented;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|
||||||
void operator=(const polyDistributionMap&);
|
void operator=(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) 2011-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -321,7 +321,7 @@ Foam::polyMesh::polyMesh(const IOobject& io)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculate topology for the patches (processor-processor comms etc.)
|
// Calculate topology for the patches (processor-processor comms etc.)
|
||||||
boundary_.updateMesh();
|
boundary_.topoChange();
|
||||||
|
|
||||||
// Calculate the geometry for the patches (transformation tensors etc.)
|
// Calculate the geometry for the patches (transformation tensors etc.)
|
||||||
boundary_.calcGeometry();
|
boundary_.calcGeometry();
|
||||||
@ -750,7 +750,7 @@ void Foam::polyMesh::resetPrimitives
|
|||||||
// processor-processor comms.
|
// processor-processor comms.
|
||||||
|
|
||||||
// Calculate topology for the patches (processor-processor comms etc.)
|
// Calculate topology for the patches (processor-processor comms etc.)
|
||||||
boundary_.updateMesh();
|
boundary_.topoChange();
|
||||||
|
|
||||||
// Calculate the geometry for the patches (transformation tensors etc.)
|
// Calculate the geometry for the patches (transformation tensors etc.)
|
||||||
boundary_.calcGeometry();
|
boundary_.calcGeometry();
|
||||||
@ -939,7 +939,7 @@ void Foam::polyMesh::addPatches
|
|||||||
if (validBoundary)
|
if (validBoundary)
|
||||||
{
|
{
|
||||||
// Calculate topology for the patches (processor-processor comms etc.)
|
// Calculate topology for the patches (processor-processor comms etc.)
|
||||||
boundary_.updateMesh();
|
boundary_.topoChange();
|
||||||
|
|
||||||
// Calculate the geometry for the patches (transformation tensors etc.)
|
// Calculate the geometry for the patches (transformation tensors etc.)
|
||||||
boundary_.calcGeometry();
|
boundary_.calcGeometry();
|
||||||
@ -1119,7 +1119,7 @@ void Foam::polyMesh::addPatch
|
|||||||
|
|
||||||
if (validBoundary)
|
if (validBoundary)
|
||||||
{
|
{
|
||||||
boundary_.updateMesh();
|
boundary_.topoChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Warn mesh objects
|
// Warn mesh objects
|
||||||
|
|||||||
@ -64,6 +64,7 @@ namespace Foam
|
|||||||
// Forward declaration of classes
|
// Forward declaration of classes
|
||||||
class globalMeshData;
|
class globalMeshData;
|
||||||
class polyTopoChangeMap;
|
class polyTopoChangeMap;
|
||||||
|
class polyMeshMap;
|
||||||
class polyDistributionMap;
|
class polyDistributionMap;
|
||||||
class polyMeshTetDecomposition;
|
class polyMeshTetDecomposition;
|
||||||
class treeDataCell;
|
class treeDataCell;
|
||||||
@ -606,8 +607,11 @@ public:
|
|||||||
// time directories
|
// time directories
|
||||||
virtual readUpdateState readUpdate();
|
virtual readUpdateState readUpdate();
|
||||||
|
|
||||||
//- Update the mesh topology from the given map
|
//- Update topology using the given map
|
||||||
virtual void updateMesh(const polyTopoChangeMap&);
|
virtual void topoChange(const polyTopoChangeMap&);
|
||||||
|
|
||||||
|
//- Update from another mesh using the given map
|
||||||
|
virtual void mapMesh(const polyMeshMap&);
|
||||||
|
|
||||||
//- Redistribute or update using the given distribution map
|
//- Redistribute or update using the given distribution map
|
||||||
virtual void distribute(const polyDistributionMap& map);
|
virtual void distribute(const polyDistributionMap& map);
|
||||||
|
|||||||
@ -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) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -84,7 +84,7 @@ void Foam::polyMesh::clearAddressing(const bool isMeshUpdate)
|
|||||||
|
|
||||||
if (isMeshUpdate)
|
if (isMeshUpdate)
|
||||||
{
|
{
|
||||||
// Part of a mesh update. Keep meshObjects that have an updateMesh
|
// Part of a mesh update. Keep meshObjects that have an topoChange
|
||||||
// callback
|
// callback
|
||||||
meshObject::clearUpto
|
meshObject::clearUpto
|
||||||
<
|
<
|
||||||
|
|||||||
@ -660,7 +660,7 @@ Foam::polyMesh::polyMesh
|
|||||||
if (syncPar)
|
if (syncPar)
|
||||||
{
|
{
|
||||||
// Calculate topology for the patches (processor-processor comms etc.)
|
// Calculate topology for the patches (processor-processor comms etc.)
|
||||||
boundary_.updateMesh();
|
boundary_.topoChange();
|
||||||
|
|
||||||
// Calculate the geometry for the patches (transformation tensors etc.)
|
// Calculate the geometry for the patches (transformation tensors etc.)
|
||||||
boundary_.calcGeometry();
|
boundary_.calcGeometry();
|
||||||
@ -941,7 +941,7 @@ Foam::polyMesh::polyMesh
|
|||||||
if (syncPar)
|
if (syncPar)
|
||||||
{
|
{
|
||||||
// Calculate topology for the patches (processor-processor comms etc.)
|
// Calculate topology for the patches (processor-processor comms etc.)
|
||||||
boundary_.updateMesh();
|
boundary_.topoChange();
|
||||||
|
|
||||||
// Calculate the geometry for the patches (transformation tensors etc.)
|
// Calculate the geometry for the patches (transformation tensors etc.)
|
||||||
boundary_.calcGeometry();
|
boundary_.calcGeometry();
|
||||||
|
|||||||
@ -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) 2011-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -264,7 +264,7 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
|
|||||||
// data.
|
// data.
|
||||||
|
|
||||||
// Calculate topology for the patches (processor-processor comms etc.)
|
// Calculate topology for the patches (processor-processor comms etc.)
|
||||||
boundary_.updateMesh();
|
boundary_.topoChange();
|
||||||
|
|
||||||
// Calculate the geometry for the patches (transformation tensors etc.)
|
// Calculate the geometry for the patches (transformation tensors etc.)
|
||||||
boundary_.calcGeometry();
|
boundary_.calcGeometry();
|
||||||
|
|||||||
34
src/OpenFOAM/meshes/polyMesh/polyMeshMap/polyMeshMap.C
Normal file
34
src/OpenFOAM/meshes/polyMesh/polyMeshMap/polyMeshMap.C
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "polyMeshMap.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::polyMeshMap::polyMeshMap()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
77
src/OpenFOAM/meshes/polyMesh/polyMeshMap/polyMeshMap.H
Normal file
77
src/OpenFOAM/meshes/polyMesh/polyMeshMap/polyMeshMap.H
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::polyMeshMap
|
||||||
|
|
||||||
|
Description
|
||||||
|
Class containing mesh-to-mesh mapping information.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
polyMeshMap.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef polyMeshMap_H
|
||||||
|
#define polyMeshMap_H
|
||||||
|
|
||||||
|
#include "polyMesh.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
class polyMesh;
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class polyMeshMap Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class polyMeshMap
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct null
|
||||||
|
polyMeshMap();
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construction
|
||||||
|
polyMeshMap(const polyMeshMap&) = delete;
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -36,7 +36,7 @@ Description
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::polyMesh::updateMesh(const polyTopoChangeMap& map)
|
void Foam::polyMesh::topoChange(const polyTopoChangeMap& map)
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
@ -46,7 +46,7 @@ void Foam::polyMesh::updateMesh(const polyTopoChangeMap& map)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update boundaryMesh (note that patches themselves already ok)
|
// Update boundaryMesh (note that patches themselves already ok)
|
||||||
boundary_.updateMesh();
|
boundary_.topoChange();
|
||||||
|
|
||||||
// Update zones
|
// Update zones
|
||||||
pointZones_.clearAddressing();
|
pointZones_.clearAddressing();
|
||||||
@ -62,7 +62,7 @@ void Foam::polyMesh::updateMesh(const polyTopoChangeMap& map)
|
|||||||
// Update parallel data
|
// Update parallel data
|
||||||
if (globalMeshDataPtr_.valid())
|
if (globalMeshDataPtr_.valid())
|
||||||
{
|
{
|
||||||
globalMeshDataPtr_->updateMesh();
|
globalMeshDataPtr_->topoChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
setInstance(time().timeName());
|
setInstance(time().timeName());
|
||||||
@ -116,14 +116,21 @@ void Foam::polyMesh::updateMesh(const polyTopoChangeMap& map)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
meshObject::updateMesh<polyMesh>(*this, map);
|
meshObject::topoChange<polyMesh>(*this, map);
|
||||||
meshObject::updateMesh<pointMesh>(*this, map);
|
meshObject::topoChange<pointMesh>(*this, map);
|
||||||
|
|
||||||
// Reset valid directions (could change by faces put into empty patches)
|
// Reset valid directions (could change by faces put into empty patches)
|
||||||
geometricD_ = Zero;
|
geometricD_ = Zero;
|
||||||
solutionD_ = Zero;
|
solutionD_ = Zero;
|
||||||
|
|
||||||
const_cast<Time&>(time()).functionObjects().updateMesh(map);
|
const_cast<Time&>(time()).functionObjects().topoChange(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::polyMesh::mapMesh(const polyMeshMap& map)
|
||||||
|
{
|
||||||
|
meshObject::mapMesh<polyMesh>(*this, map);
|
||||||
|
meshObject::mapMesh<pointMesh>(*this, map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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) 2011-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -148,10 +148,10 @@ protected:
|
|||||||
virtual void movePoints(PstreamBuffers&, const pointField&) = 0;
|
virtual void movePoints(PstreamBuffers&, const pointField&) = 0;
|
||||||
|
|
||||||
//- Initialise the update of the patch topology
|
//- Initialise the update of the patch topology
|
||||||
virtual void initUpdateMesh(PstreamBuffers&) = 0;
|
virtual void initTopoChange(PstreamBuffers&) = 0;
|
||||||
|
|
||||||
//- Update of the patch topology
|
//- Update of the patch topology
|
||||||
virtual void updateMesh(PstreamBuffers&) = 0;
|
virtual void topoChange(PstreamBuffers&) = 0;
|
||||||
|
|
||||||
//- Write a patch in OBJ format
|
//- Write a patch in OBJ format
|
||||||
static void writeOBJ
|
static void writeOBJ
|
||||||
|
|||||||
@ -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) 2011-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -103,15 +103,15 @@ void Foam::cyclicPolyPatch::movePoints
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::cyclicPolyPatch::initUpdateMesh(PstreamBuffers& pBufs)
|
void Foam::cyclicPolyPatch::initTopoChange(PstreamBuffers& pBufs)
|
||||||
{
|
{
|
||||||
polyPatch::initUpdateMesh(pBufs);
|
polyPatch::initTopoChange(pBufs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::cyclicPolyPatch::updateMesh(PstreamBuffers& pBufs)
|
void Foam::cyclicPolyPatch::topoChange(PstreamBuffers& pBufs)
|
||||||
{
|
{
|
||||||
polyPatch::updateMesh(pBufs);
|
polyPatch::topoChange(pBufs);
|
||||||
deleteDemandDrivenData(coupledPointsPtr_);
|
deleteDemandDrivenData(coupledPointsPtr_);
|
||||||
deleteDemandDrivenData(coupledEdgesPtr_);
|
deleteDemandDrivenData(coupledEdgesPtr_);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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) 2011-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -132,10 +132,10 @@ protected:
|
|||||||
virtual void movePoints(PstreamBuffers&, const pointField&);
|
virtual void movePoints(PstreamBuffers&, const pointField&);
|
||||||
|
|
||||||
//- Initialise the update of the patch topology
|
//- Initialise the update of the patch topology
|
||||||
virtual void initUpdateMesh(PstreamBuffers&);
|
virtual void initTopoChange(PstreamBuffers&);
|
||||||
|
|
||||||
//- Update of the patch topology
|
//- Update of the patch topology
|
||||||
virtual void updateMesh(PstreamBuffers&);
|
virtual void topoChange(PstreamBuffers&);
|
||||||
|
|
||||||
//- Reset the patch name
|
//- Reset the patch name
|
||||||
virtual void rename(const wordList& newNames);
|
virtual void rename(const wordList& newNames);
|
||||||
|
|||||||
@ -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) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -318,9 +318,9 @@ void Foam::processorPolyPatch::movePoints
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::processorPolyPatch::initUpdateMesh(PstreamBuffers& pBufs)
|
void Foam::processorPolyPatch::initTopoChange(PstreamBuffers& pBufs)
|
||||||
{
|
{
|
||||||
polyPatch::initUpdateMesh(pBufs);
|
polyPatch::initTopoChange(pBufs);
|
||||||
|
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
{
|
{
|
||||||
@ -365,10 +365,10 @@ void Foam::processorPolyPatch::initUpdateMesh(PstreamBuffers& pBufs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::processorPolyPatch::updateMesh(PstreamBuffers& pBufs)
|
void Foam::processorPolyPatch::topoChange(PstreamBuffers& pBufs)
|
||||||
{
|
{
|
||||||
// For completeness
|
// For completeness
|
||||||
polyPatch::updateMesh(pBufs);
|
polyPatch::topoChange(pBufs);
|
||||||
|
|
||||||
nbrPointsPtr_.clear();
|
nbrPointsPtr_.clear();
|
||||||
nbrEdgesPtr_.clear();
|
nbrEdgesPtr_.clear();
|
||||||
|
|||||||
@ -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) 2011-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -112,10 +112,10 @@ protected:
|
|||||||
void movePoints(PstreamBuffers&, const pointField&);
|
void movePoints(PstreamBuffers&, const pointField&);
|
||||||
|
|
||||||
//- Initialise the update of the patch topology
|
//- Initialise the update of the patch topology
|
||||||
virtual void initUpdateMesh(PstreamBuffers&);
|
virtual void initTopoChange(PstreamBuffers&);
|
||||||
|
|
||||||
//- Update of the patch topology
|
//- Update of the patch topology
|
||||||
virtual void updateMesh(PstreamBuffers&);
|
virtual void topoChange(PstreamBuffers&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -238,16 +238,16 @@ void Foam::processorCyclicPolyPatch::movePoints
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::processorCyclicPolyPatch::initUpdateMesh(PstreamBuffers& pBufs)
|
void Foam::processorCyclicPolyPatch::initTopoChange(PstreamBuffers& pBufs)
|
||||||
{
|
{
|
||||||
processorPolyPatch::initUpdateMesh(pBufs);
|
processorPolyPatch::initTopoChange(pBufs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::processorCyclicPolyPatch::updateMesh(PstreamBuffers& pBufs)
|
void Foam::processorCyclicPolyPatch::topoChange(PstreamBuffers& pBufs)
|
||||||
{
|
{
|
||||||
referPatchID_ = -1;
|
referPatchID_ = -1;
|
||||||
processorPolyPatch::updateMesh(pBufs);
|
processorPolyPatch::topoChange(pBufs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -98,10 +98,10 @@ protected:
|
|||||||
void movePoints(PstreamBuffers&, const pointField&);
|
void movePoints(PstreamBuffers&, const pointField&);
|
||||||
|
|
||||||
//- Initialise the update of the patch topology
|
//- Initialise the update of the patch topology
|
||||||
virtual void initUpdateMesh(PstreamBuffers&);
|
virtual void initTopoChange(PstreamBuffers&);
|
||||||
|
|
||||||
//- Update of the patch topology
|
//- Update of the patch topology
|
||||||
virtual void updateMesh(PstreamBuffers&);
|
virtual void topoChange(PstreamBuffers&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -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) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -60,7 +60,7 @@ void Foam::polyPatch::movePoints(PstreamBuffers&, const pointField& p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::polyPatch::updateMesh(PstreamBuffers&)
|
void Foam::polyPatch::topoChange(PstreamBuffers&)
|
||||||
{
|
{
|
||||||
primitivePatch::clearGeom();
|
primitivePatch::clearGeom();
|
||||||
clearAddressing();
|
clearAddressing();
|
||||||
|
|||||||
@ -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) 2011-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -113,11 +113,11 @@ protected:
|
|||||||
virtual void movePoints(PstreamBuffers&, const pointField& p);
|
virtual void movePoints(PstreamBuffers&, const pointField& p);
|
||||||
|
|
||||||
//- Initialise the update of the patch topology
|
//- Initialise the update of the patch topology
|
||||||
virtual void initUpdateMesh(PstreamBuffers&)
|
virtual void initTopoChange(PstreamBuffers&)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//- Update of the patch topology
|
//- Update of the patch topology
|
||||||
virtual void updateMesh(PstreamBuffers&);
|
virtual void topoChange(PstreamBuffers&);
|
||||||
|
|
||||||
//- Clear geometry
|
//- Clear geometry
|
||||||
virtual void clearGeom();
|
virtual void clearGeom();
|
||||||
|
|||||||
@ -227,7 +227,7 @@ public:
|
|||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
|
|
||||||
void updateMesh(const polyTopoChangeMap&)
|
void topoChange(const polyTopoChangeMap&)
|
||||||
{
|
{
|
||||||
NotImplemented;
|
NotImplemented;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,6 +30,7 @@ License
|
|||||||
#include "primitiveMesh.H"
|
#include "primitiveMesh.H"
|
||||||
#include "demandDrivenData.H"
|
#include "demandDrivenData.H"
|
||||||
#include "polyTopoChangeMap.H"
|
#include "polyTopoChangeMap.H"
|
||||||
|
#include "polyMeshMap.H"
|
||||||
#include "syncTools.H"
|
#include "syncTools.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
@ -386,7 +387,7 @@ void Foam::faceZone::resetAddressing
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::faceZone::updateMesh(const polyTopoChangeMap& map)
|
void Foam::faceZone::topoChange(const polyTopoChangeMap& map)
|
||||||
{
|
{
|
||||||
clearAddressing();
|
clearAddressing();
|
||||||
|
|
||||||
@ -416,6 +417,12 @@ void Foam::faceZone::updateMesh(const polyTopoChangeMap& map)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::faceZone::mapMesh(const polyMeshMap&)
|
||||||
|
{
|
||||||
|
NotImplemented;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::faceZone::checkDefinition(const bool report) const
|
bool Foam::faceZone::checkDefinition(const bool report) const
|
||||||
{
|
{
|
||||||
return zone::checkDefinition(meshZones().mesh().faces().size(), report);
|
return zone::checkDefinition(meshZones().mesh().faces().size(), report);
|
||||||
|
|||||||
@ -51,6 +51,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
class polyTopoChangeMap;
|
class polyTopoChangeMap;
|
||||||
|
class polyMeshMap;
|
||||||
|
|
||||||
// Forward declaration of friend functions and operators
|
// Forward declaration of friend functions and operators
|
||||||
|
|
||||||
@ -290,8 +291,11 @@ public:
|
|||||||
//- Correct patch after moving points
|
//- Correct patch after moving points
|
||||||
virtual void movePoints(const pointField&);
|
virtual void movePoints(const pointField&);
|
||||||
|
|
||||||
//- Update for changes in topology
|
//- Update topology using the given map
|
||||||
virtual void updateMesh(const polyTopoChangeMap&);
|
virtual void topoChange(const polyTopoChangeMap&);
|
||||||
|
|
||||||
|
//- Update from another mesh using the given map
|
||||||
|
virtual void mapMesh(const polyMeshMap&);
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
virtual void write(Ostream&) const;
|
virtual void write(Ostream&) const;
|
||||||
|
|||||||
@ -435,7 +435,7 @@ void Foam::attachDetach::setRefinement(polyTopoChange& ref) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::attachDetach::updateMesh(const polyTopoChangeMap&)
|
void Foam::attachDetach::topoChange(const polyTopoChangeMap&)
|
||||||
{
|
{
|
||||||
// Mesh has changed topologically. Update local topological data
|
// Mesh has changed topologically. Update local topological data
|
||||||
const polyMesh& mesh = topoChanger().mesh();
|
const polyMesh& mesh = topoChanger().mesh();
|
||||||
|
|||||||
@ -214,7 +214,7 @@ public:
|
|||||||
virtual void modifyMotionPoints(pointField& motionPoints) const;
|
virtual void modifyMotionPoints(pointField& motionPoints) const;
|
||||||
|
|
||||||
//- Force recalculation of locally stored data on topological change
|
//- Force recalculation of locally stored data on topological change
|
||||||
virtual void updateMesh(const polyTopoChangeMap&);
|
virtual void topoChange(const polyTopoChangeMap&);
|
||||||
|
|
||||||
//- Get reference to trigger times
|
//- Get reference to trigger times
|
||||||
const scalarField& triggerTimes() const
|
const scalarField& triggerTimes() const
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user