polyDistributionMap: renamed from polyMeshDistributionMap for consistency with polyTopoChangeMap

This commit is contained in:
Henry Weller
2022-03-31 23:44:47 +01:00
parent 3ace8f434b
commit 6047f27aac
210 changed files with 328 additions and 6070 deletions

View File

@ -513,18 +513,18 @@ void subsetMesh
const Time& runTime = mesh.time();
autoPtr<polyTopoChangeMap> morphMap = meshMod.changeMesh(mesh, false);
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
if (morphMap().hasMotionPoints())
if (map().hasMotionPoints())
{
mesh.movePoints(morphMap().preMotionPoints());
mesh.movePoints(map().preMotionPoints());
}
// Update topology on cellRemover
cellRemover.updateMesh(morphMap());
cellRemover.updateMesh(map());
// Update refLevel for removed cells.
const labelList& cellMap = morphMap().cellMap();
const labelList& cellMap = map().cellMap();
labelList newRefLevel(cellMap.size());
@ -547,7 +547,7 @@ void subsetMesh
}
// Update cutCells for removed cells.
cutCells.updateMesh(morphMap());
cutCells.updateMesh(map());
}

View File

@ -461,7 +461,7 @@ void Foam::cellSplitter::setRefinement
}
void Foam::cellSplitter::updateMesh(const polyTopoChangeMap& morphMap)
void Foam::cellSplitter::updateMesh(const polyTopoChangeMap& map)
{
// Create copy since we're deleting entries. Only if both cell and added
// point get mapped do they get inserted.
@ -471,11 +471,11 @@ void Foam::cellSplitter::updateMesh(const polyTopoChangeMap& morphMap)
{
label oldCelli = iter.key();
label newCelli = morphMap.reverseCellMap()[oldCelli];
label newCelli = map.reverseCellMap()[oldCelli];
label oldPointi = iter();
label newPointi = morphMap.reversePointMap()[oldPointi];
label newPointi = map.reversePointMap()[oldPointi];
if (newCelli >= 0 && newPointi >= 0)
{

View File

@ -530,14 +530,14 @@ int main(int argc, char *argv[])
cutter.setRefinement(cellToPyrCentre, meshMod);
// Do changes
autoPtr<polyTopoChangeMap> morphMap = meshMod.changeMesh(mesh, false);
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
if (morphMap().hasMotionPoints())
if (map().hasMotionPoints())
{
mesh.movePoints(morphMap().preMotionPoints());
mesh.movePoints(map().preMotionPoints());
}
cutter.updateMesh(morphMap());
cutter.updateMesh(map());
if (!overwrite)
{
@ -602,15 +602,15 @@ int main(int argc, char *argv[])
cutter.setRefinement(allPointInfo, meshMod);
// Do changes
autoPtr<polyTopoChangeMap> morphMap = meshMod.changeMesh(mesh, false);
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
if (morphMap().hasMotionPoints())
if (map().hasMotionPoints())
{
mesh.movePoints(morphMap().preMotionPoints());
mesh.movePoints(map().preMotionPoints());
}
// Not implemented yet:
// cutter.updateMesh(morphMap());
// cutter.updateMesh(map());
if (!overwrite)
@ -647,14 +647,14 @@ int main(int argc, char *argv[])
);
// Do changes
autoPtr<polyTopoChangeMap> morphMap = meshMod.changeMesh(mesh, false);
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
if (morphMap().hasMotionPoints())
if (map().hasMotionPoints())
{
mesh.movePoints(morphMap().preMotionPoints());
mesh.movePoints(map().preMotionPoints());
}
cutter.updateMesh(morphMap());
cutter.updateMesh(map());
if (!overwrite)
{

View File

@ -240,15 +240,15 @@ int main(int argc, char *argv[])
runTime++;
}
autoPtr<polyTopoChangeMap> morphMap = meshMod.changeMesh(mesh, false);
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
if (morphMap().hasMotionPoints())
if (map().hasMotionPoints())
{
mesh.movePoints(morphMap().preMotionPoints());
mesh.movePoints(map().preMotionPoints());
}
// Update stored labels on meshCutter.
cutter.updateMesh(morphMap());
cutter.updateMesh(map());
Info<< "Finished refining" << endl;

View File

@ -136,18 +136,18 @@ int main(int argc, char *argv[])
meshMod
);
autoPtr<polyTopoChangeMap> morphMap = meshMod.changeMesh(mesh, false);
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
mesh.updateMesh(morphMap);
mesh.updateMesh(map);
// Move mesh (since morphing does not do this)
if (morphMap().hasMotionPoints())
if (map().hasMotionPoints())
{
mesh.movePoints(morphMap().preMotionPoints());
mesh.movePoints(map().preMotionPoints());
}
// Update numbering of cells/vertices.
faceRemover.updateMesh(morphMap);
faceRemover.updateMesh(map);
if (!overwrite)
{

View File

@ -685,18 +685,18 @@ int main(int argc, char *argv[])
runTime++;
}
autoPtr<polyTopoChangeMap> morphMap = meshMod.changeMesh(mesh, false);
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, false);
if (morphMap().hasMotionPoints())
if (map().hasMotionPoints())
{
mesh.movePoints(morphMap().preMotionPoints());
mesh.movePoints(map().preMotionPoints());
}
// Update stored labels on meshCutter
cutter.updateMesh(morphMap());
cutter.updateMesh(map());
// Update cellSet
cellsToCut.updateMesh(morphMap());
cellsToCut.updateMesh(map());
Info<< "Remaining:" << cellsToCut.size() << endl;