Commit 7aa83ea9 authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: postProcess - updated app to update on mesh change instead of full clear out

parent fdf8d10a
......@@ -43,6 +43,7 @@ Description
#include "pointFields.H"
#include "uniformDimensionedFields.H"
#include "fileFieldSelection.H"
#include "mapPolyMesh.H"
using namespace Foam;
......@@ -201,18 +202,31 @@ int main(int argc, char *argv[])
Info<< "Time = " << runTime.timeName() << endl;
if (mesh.readUpdate() != polyMesh::UNCHANGED)
switch (mesh.readUpdate())
{
// Update functionObjectList if mesh changes
// Note clearing the dictionary to avoid merge warning
functionsDict.clear();
functionsPtr = functionObjectList::New
(
args,
runTime,
functionsDict,
fieldFilters
);
case polyMesh::POINTS_MOVED:
{
functionsPtr->movePoints(mesh);
break;
}
case polyMesh::TOPO_CHANGE:
case polyMesh::TOPO_PATCH_CHANGE:
{
mapPolyMesh mpm(mesh);
functionsPtr->updateMesh(mpm);
break;
}
case polyMesh::UNCHANGED:
{
// No additional work
break;
}
default:
{
FatalErrorIn(args.executable())
<< "Unhandled enumeration"
<< abort(FatalError);
}
}
fields.resetFieldFilters(fieldFilters);
......
Markdown is supported
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