mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: postProcess - updated app to update on mesh change instead of full clear out
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user