ENH: postProcess - update function objects on mesh change rather than clear
This commit is contained in:
parent
eb5b6fd7e4
commit
64ceecc4c9
@ -112,18 +112,31 @@ if (argList::postProcess(argc, argv))
|
|||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << endl;
|
Info<< "Time = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
if (mesh.readUpdate() != polyMesh::UNCHANGED)
|
switch (mesh.readUpdate())
|
||||||
{
|
{
|
||||||
// Update functionObjects if mesh changes
|
case polyMesh::POINTS_MOVED:
|
||||||
// Note clearing the dictionary to avoid merge warning
|
{
|
||||||
functionsDict.clear();
|
functionsPtr->movePoints(mesh);
|
||||||
functionsPtr = functionObjectList::New
|
break;
|
||||||
(
|
}
|
||||||
args,
|
case polyMesh::TOPO_CHANGE:
|
||||||
runTime,
|
case polyMesh::TOPO_PATCH_CHANGE:
|
||||||
functionsDict,
|
{
|
||||||
selectedFields
|
mapPolyMesh mpm(mesh);
|
||||||
);
|
functionsPtr->updateMesh(mpm);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case polyMesh::UNCHANGED:
|
||||||
|
{
|
||||||
|
// No additional work
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
FatalErrorIn(args.executable())
|
||||||
|
<< "Unhandled enumeration"
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FatalIOError.throwExceptions();
|
FatalIOError.throwExceptions();
|
||||||
|
Loading…
Reference in New Issue
Block a user