mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: snappyHexMesh: remove any left-over mesh data before topo change
This commit is contained in:
@ -1135,6 +1135,10 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::doRemoveCells
|
|||||||
meshMod
|
meshMod
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Remove any unnecessary fields
|
||||||
|
mesh_.clearOut();
|
||||||
|
mesh_.moving(false);
|
||||||
|
|
||||||
// Change the mesh (no inflation)
|
// Change the mesh (no inflation)
|
||||||
autoPtr<mapPolyMesh> mapPtr = meshMod.changeMesh(mesh_, false, true);
|
autoPtr<mapPolyMesh> mapPtr = meshMod.changeMesh(mesh_, false, true);
|
||||||
mapPolyMesh& map = *mapPtr;
|
mapPolyMesh& map = *mapPtr;
|
||||||
@ -1327,6 +1331,10 @@ Foam::label Foam::meshRefinement::splitFacesUndo
|
|||||||
// Insert the mesh changes
|
// Insert the mesh changes
|
||||||
doSplitFaces(splitFaces, splits, meshMod);
|
doSplitFaces(splitFaces, splits, meshMod);
|
||||||
|
|
||||||
|
// Remove any unnecessary fields
|
||||||
|
mesh_.clearOut();
|
||||||
|
mesh_.moving(false);
|
||||||
|
|
||||||
// Change the mesh (no inflation)
|
// Change the mesh (no inflation)
|
||||||
autoPtr<mapPolyMesh> mapPtr = meshMod.changeMesh(mesh_, false, true);
|
autoPtr<mapPolyMesh> mapPtr = meshMod.changeMesh(mesh_, false, true);
|
||||||
mapPolyMesh& map = *mapPtr;
|
mapPolyMesh& map = *mapPtr;
|
||||||
@ -1339,6 +1347,10 @@ Foam::label Foam::meshRefinement::splitFacesUndo
|
|||||||
{
|
{
|
||||||
mesh_.movePoints(map.preMotionPoints());
|
mesh_.movePoints(map.preMotionPoints());
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mesh_.clearOut();
|
||||||
|
}
|
||||||
|
|
||||||
// Reset the instance for if in overwrite mode
|
// Reset the instance for if in overwrite mode
|
||||||
mesh_.setInstance(timeName());
|
mesh_.setInstance(timeName());
|
||||||
@ -1550,6 +1562,10 @@ Foam::label Foam::meshRefinement::splitFacesUndo
|
|||||||
nSplit -= n;
|
nSplit -= n;
|
||||||
|
|
||||||
|
|
||||||
|
// Remove any unnecessary fields
|
||||||
|
mesh_.clearOut();
|
||||||
|
mesh_.moving(false);
|
||||||
|
|
||||||
// Change the mesh (no inflation)
|
// Change the mesh (no inflation)
|
||||||
autoPtr<mapPolyMesh> mapPtr = meshMod.changeMesh(mesh_, false, true);
|
autoPtr<mapPolyMesh> mapPtr = meshMod.changeMesh(mesh_, false, true);
|
||||||
mapPolyMesh& map = *mapPtr;
|
mapPolyMesh& map = *mapPtr;
|
||||||
@ -1562,6 +1578,10 @@ Foam::label Foam::meshRefinement::splitFacesUndo
|
|||||||
{
|
{
|
||||||
mesh_.movePoints(map.preMotionPoints());
|
mesh_.movePoints(map.preMotionPoints());
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mesh_.clearOut();
|
||||||
|
}
|
||||||
|
|
||||||
// Reset the instance for if in overwrite mode
|
// Reset the instance for if in overwrite mode
|
||||||
mesh_.setInstance(timeName());
|
mesh_.setInstance(timeName());
|
||||||
|
|||||||
@ -600,6 +600,10 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createBaffles
|
|||||||
autoPtr<mapPolyMesh> mapPtr;
|
autoPtr<mapPolyMesh> mapPtr;
|
||||||
if (returnReduce(nBaffles, sumOp<label>()))
|
if (returnReduce(nBaffles, sumOp<label>()))
|
||||||
{
|
{
|
||||||
|
// Remove any unnecessary fields
|
||||||
|
mesh_.clearOut();
|
||||||
|
mesh_.moving(false);
|
||||||
|
|
||||||
// Change the mesh (no inflation, parallel sync)
|
// Change the mesh (no inflation, parallel sync)
|
||||||
mapPtr = meshMod.changeMesh(mesh_, false, true);
|
mapPtr = meshMod.changeMesh(mesh_, false, true);
|
||||||
mapPolyMesh& map = *mapPtr;
|
mapPolyMesh& map = *mapPtr;
|
||||||
@ -1314,6 +1318,10 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::mergeBaffles
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Remove any unnecessary fields
|
||||||
|
mesh_.clearOut();
|
||||||
|
mesh_.moving(false);
|
||||||
|
|
||||||
// Change the mesh (no inflation)
|
// Change the mesh (no inflation)
|
||||||
mapPtr = meshMod.changeMesh(mesh_, false, true);
|
mapPtr = meshMod.changeMesh(mesh_, false, true);
|
||||||
mapPolyMesh& map = *mapPtr;
|
mapPolyMesh& map = *mapPtr;
|
||||||
@ -5346,6 +5354,10 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::dupNonManifoldPoints
|
|||||||
// Insert changes into meshMod
|
// Insert changes into meshMod
|
||||||
pointDuplicator.setRefinement(regionSide, meshMod);
|
pointDuplicator.setRefinement(regionSide, meshMod);
|
||||||
|
|
||||||
|
// Remove any unnecessary fields
|
||||||
|
mesh_.clearOut();
|
||||||
|
mesh_.moving(false);
|
||||||
|
|
||||||
// Change the mesh (no inflation, parallel sync)
|
// Change the mesh (no inflation, parallel sync)
|
||||||
mapPtr = meshMod.changeMesh(mesh_, false, true);
|
mapPtr = meshMod.changeMesh(mesh_, false, true);
|
||||||
mapPolyMesh& map = *mapPtr;
|
mapPolyMesh& map = *mapPtr;
|
||||||
@ -5421,6 +5433,10 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::mergePoints
|
|||||||
// Insert changes
|
// Insert changes
|
||||||
polyMeshAdder::mergePoints(mesh_, pointToMaster, meshMod);
|
polyMeshAdder::mergePoints(mesh_, pointToMaster, meshMod);
|
||||||
|
|
||||||
|
// Remove any unnecessary fields
|
||||||
|
mesh_.clearOut();
|
||||||
|
mesh_.moving(false);
|
||||||
|
|
||||||
// Change the mesh (no inflation, parallel sync)
|
// Change the mesh (no inflation, parallel sync)
|
||||||
mapPtr = meshMod.changeMesh(mesh_, false, true);
|
mapPtr = meshMod.changeMesh(mesh_, false, true);
|
||||||
mapPolyMesh& map = *mapPtr;
|
mapPolyMesh& map = *mapPtr;
|
||||||
@ -5988,6 +6004,10 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify
|
|||||||
meshMod
|
meshMod
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Remove any unnecessary fields
|
||||||
|
mesh_.clearOut();
|
||||||
|
mesh_.moving(false);
|
||||||
|
|
||||||
// Change the mesh (no inflation, parallel sync)
|
// Change the mesh (no inflation, parallel sync)
|
||||||
autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh_, false, true);
|
autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh_, false, true);
|
||||||
|
|
||||||
|
|||||||
@ -108,6 +108,10 @@ Foam::label Foam::meshRefinement::mergePatchFaces
|
|||||||
// unused points.
|
// unused points.
|
||||||
faceCombiner.setRefinement(mergeSets, meshMod);
|
faceCombiner.setRefinement(mergeSets, meshMod);
|
||||||
|
|
||||||
|
// Remove any unnecessary fields
|
||||||
|
mesh_.clearOut();
|
||||||
|
mesh_.moving(false);
|
||||||
|
|
||||||
// Change the mesh (no inflation)
|
// Change the mesh (no inflation)
|
||||||
autoPtr<mapPolyMesh> mapPtr = meshMod.changeMesh(mesh_, false, true);
|
autoPtr<mapPolyMesh> mapPtr = meshMod.changeMesh(mesh_, false, true);
|
||||||
mapPolyMesh& map = *mapPtr;
|
mapPolyMesh& map = *mapPtr;
|
||||||
@ -197,6 +201,10 @@ Foam::label Foam::meshRefinement::mergePatchFaces
|
|||||||
//
|
//
|
||||||
// pointRemover.setRefinement(pointCanBeDeleted, meshMod);
|
// pointRemover.setRefinement(pointCanBeDeleted, meshMod);
|
||||||
//
|
//
|
||||||
|
// // Remove any unnecessary fields
|
||||||
|
// mesh_.clearOut();
|
||||||
|
// mesh_.moving(false);
|
||||||
|
//
|
||||||
// // Change the mesh (no inflation)
|
// // Change the mesh (no inflation)
|
||||||
// map = meshMod.changeMesh(mesh_, false, true);
|
// map = meshMod.changeMesh(mesh_, false, true);
|
||||||
//
|
//
|
||||||
@ -359,6 +367,10 @@ Foam::label Foam::meshRefinement::mergePatchFacesUndo
|
|||||||
labelList(0) // cells to store
|
labelList(0) // cells to store
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Remove any unnecessary fields
|
||||||
|
mesh_.clearOut();
|
||||||
|
mesh_.moving(false);
|
||||||
|
|
||||||
// Change the mesh (no inflation)
|
// Change the mesh (no inflation)
|
||||||
autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh_, false, true);
|
autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh_, false, true);
|
||||||
|
|
||||||
@ -544,6 +556,10 @@ Foam::label Foam::meshRefinement::mergePatchFacesUndo
|
|||||||
restoredCells
|
restoredCells
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Remove any unnecessary fields
|
||||||
|
mesh_.clearOut();
|
||||||
|
mesh_.moving(false);
|
||||||
|
|
||||||
// Change the mesh (no inflation)
|
// Change the mesh (no inflation)
|
||||||
autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh_, false, true);
|
autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh_, false, true);
|
||||||
|
|
||||||
@ -629,6 +645,10 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::doRemovePoints
|
|||||||
|
|
||||||
pointRemover.setRefinement(pointCanBeDeleted, meshMod);
|
pointRemover.setRefinement(pointCanBeDeleted, meshMod);
|
||||||
|
|
||||||
|
// Remove any unnecessary fields
|
||||||
|
mesh_.clearOut();
|
||||||
|
mesh_.moving(false);
|
||||||
|
|
||||||
// Change the mesh (no inflation)
|
// Change the mesh (no inflation)
|
||||||
autoPtr<mapPolyMesh> mapPtr = meshMod.changeMesh(mesh_, false, true);
|
autoPtr<mapPolyMesh> mapPtr = meshMod.changeMesh(mesh_, false, true);
|
||||||
mapPolyMesh& map = *mapPtr;
|
mapPolyMesh& map = *mapPtr;
|
||||||
@ -702,6 +722,10 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::doRestorePoints
|
|||||||
meshMod
|
meshMod
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Remove any unnecessary fields
|
||||||
|
mesh_.clearOut();
|
||||||
|
mesh_.moving(false);
|
||||||
|
|
||||||
// Change the mesh (no inflation)
|
// Change the mesh (no inflation)
|
||||||
autoPtr<mapPolyMesh> mapPtr = meshMod.changeMesh(mesh_, false, true);
|
autoPtr<mapPolyMesh> mapPtr = meshMod.changeMesh(mesh_, false, true);
|
||||||
mapPolyMesh& map = *mapPtr;
|
mapPolyMesh& map = *mapPtr;
|
||||||
|
|||||||
@ -2352,6 +2352,10 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::refine
|
|||||||
// Play refinement commands into mesh changer.
|
// Play refinement commands into mesh changer.
|
||||||
meshCutter_.setRefinement(cellsToRefine, meshMod);
|
meshCutter_.setRefinement(cellsToRefine, meshMod);
|
||||||
|
|
||||||
|
// Remove any unnecessary fields
|
||||||
|
mesh_.clearOut();
|
||||||
|
mesh_.moving(false);
|
||||||
|
|
||||||
// Create mesh (no inflation), return map from old to new mesh.
|
// Create mesh (no inflation), return map from old to new mesh.
|
||||||
autoPtr<mapPolyMesh> mapPtr = meshMod.changeMesh(mesh_, false);
|
autoPtr<mapPolyMesh> mapPtr = meshMod.changeMesh(mesh_, false);
|
||||||
mapPolyMesh& map = *mapPtr;
|
mapPolyMesh& map = *mapPtr;
|
||||||
@ -2774,6 +2778,10 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::directionalRefine
|
|||||||
// Insert mesh refinement into polyTopoChange.
|
// Insert mesh refinement into polyTopoChange.
|
||||||
meshRefiner.setRefinement(cuts, meshMod);
|
meshRefiner.setRefinement(cuts, meshMod);
|
||||||
|
|
||||||
|
// Remove any unnecessary fields
|
||||||
|
mesh_.clearOut();
|
||||||
|
mesh_.moving(false);
|
||||||
|
|
||||||
autoPtr<mapPolyMesh> morphMap = meshMod.changeMesh(mesh_, false);
|
autoPtr<mapPolyMesh> morphMap = meshMod.changeMesh(mesh_, false);
|
||||||
|
|
||||||
// Update fields
|
// Update fields
|
||||||
|
|||||||
Reference in New Issue
Block a user