Commit 105f09b6 authored by mattijs's avatar mattijs
Browse files

meshPhi writing

parent 704afbf9
......@@ -152,6 +152,11 @@ Foam::label Foam::autoLayerDriver::mergePatchFacesUndo
{
mesh.movePoints(map().preMotionPoints());
}
else
{
// Delete mesh volumes.
mesh.clearOut();
}
faceCombiner.updateMesh(map);
......@@ -301,6 +306,11 @@ Foam::label Foam::autoLayerDriver::mergePatchFacesUndo
{
mesh.movePoints(map().preMotionPoints());
}
else
{
// Delete mesh volumes.
mesh.clearOut();
}
faceCombiner.updateMesh(map);
......@@ -363,6 +373,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::autoLayerDriver::doRemovePoints
{
mesh.movePoints(map().preMotionPoints());
}
else
{
// Delete mesh volumes.
mesh.clearOut();
}
pointRemover.updateMesh(map);
meshRefiner_.updateMesh(map, labelList(0));
......@@ -411,6 +426,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::autoLayerDriver::doRestorePoints
{
mesh.movePoints(map().preMotionPoints());
}
else
{
// Delete mesh volumes.
mesh.clearOut();
}
pointRemover.updateMesh(map);
meshRefiner_.updateMesh(map, labelList(0));
......@@ -2782,6 +2802,10 @@ void Foam::autoLayerDriver::addLayers
const_cast<Time&>(mesh.time())++;
Info<< "Writing shrunk mesh to " << mesh.time().timeName() << endl;
// See comment in autoSnapDriver why we should not remove meshPhi
// using mesh.clearPout().
mesh.write();
}
......@@ -2970,6 +2994,11 @@ void Foam::autoLayerDriver::addLayers
{
mesh.movePoints(map().preMotionPoints());
}
else
{
// Delete mesh volumes.
mesh.clearOut();
}
meshRefiner_.updateMesh(map, labelList(0));
......
......@@ -930,6 +930,7 @@ void Foam::autoSnapDriver::preSmoothPatch
const_cast<Time&>(mesh.time())++;
Pout<< "Writing patch smoothed mesh to time " << mesh.time().timeName()
<< endl;
mesh.write();
}
......@@ -1220,6 +1221,11 @@ void Foam::autoSnapDriver::smoothDisplacement
const_cast<Time&>(mesh.time())++;
Pout<< "Writing smoothed mesh to time " << mesh.time().timeName()
<< endl;
// Moving mesh creates meshPhi. Can be cleared out by a mesh.clearOut
// but this will also delete all pointMesh but not pointFields which
// gives an illegal situation.
mesh.write();
Pout<< "Writing displacement field ..." << endl;
......
......@@ -458,6 +458,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createBaffles
{
mesh_.movePoints(map().preMotionPoints());
}
else
{
// Delete mesh volumes.
mesh_.clearOut();
}
//- Redo the intersections on the newly create baffle faces. Note that
// this changes also the cell centre positions.
......@@ -1448,6 +1453,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::mergeBaffles
{
mesh_.movePoints(map().preMotionPoints());
}
else
{
// Delete mesh volumes.
mesh_.clearOut();
}
// Update intersections. Recalculate intersections on merged faces since
// this seems to give problems? Note: should not be nessecary since
......@@ -2405,6 +2415,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::dupNonManifoldPoints()
{
mesh_.movePoints(map().preMotionPoints());
}
else
{
// Delete mesh volumes.
mesh_.clearOut();
}
// Update intersections. Is mapping only (no faces created, positions stay
// same) so no need to recalculate intersections.
......@@ -2828,6 +2843,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify
{
mesh_.movePoints(map().preMotionPoints());
}
else
{
// Delete mesh volumes.
mesh_.clearOut();
}
return map;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment