Commit 24f17124 authored by Mark Olesen's avatar Mark Olesen

ENH: provide extra log feedback when catalyst function objects end.

- Note that stopping the catalyst function object via a `timeEnd` value
  does not actually call the corresponding end() method.

  See: Development/OpenFOAM-plus#791
parent f0b118cf
......@@ -276,6 +276,19 @@ bool Foam::functionObjects::catalystFaMesh::write()
}
bool Foam::functionObjects::catalystFaMesh::end()
{
// Only here for extra feedback
if (log && adaptor_.valid())
{
Info<< type() << ": Disconnecting ParaView Catalyst..." << nl;
}
adaptor_.clear();
return true;
}
void Foam::functionObjects::catalystFaMesh::updateMesh(const mapPolyMesh&)
{
updateState(polyMesh::TOPO_CHANGE);
......
......@@ -167,6 +167,9 @@ public:
//- Write - does nothing
virtual bool write();
//- On end - provide feedback about disconnecting from catatyst.
virtual bool end();
//- Update for changes of mesh
virtual void updateMesh(const mapPolyMesh& mpm);
......
......@@ -205,4 +205,17 @@ bool Foam::functionObjects::catalystCloud::write()
}
bool Foam::functionObjects::catalystCloud::end()
{
// Only here for extra feedback
if (log && adaptor_.valid())
{
Info<< type() << ": Disconnecting ParaView Catalyst..." << nl;
}
adaptor_.clear();
return true;
}
// ************************************************************************* //
......@@ -160,6 +160,8 @@ public:
//- Write - does nothing
virtual bool write();
//- On end - provide feedback about disconnecting from catatyst.
virtual bool end();
};
......
......@@ -343,6 +343,19 @@ bool Foam::functionObjects::catalystFvMesh::write()
}
bool Foam::functionObjects::catalystFvMesh::end()
{
// Only here for extra feedback
if (log && adaptor_.valid())
{
Info<< type() << ": Disconnecting ParaView Catalyst..." << nl;
}
adaptor_.clear();
return true;
}
void Foam::functionObjects::catalystFvMesh::updateMesh(const mapPolyMesh&)
{
updateState(polyMesh::TOPO_CHANGE);
......
......@@ -171,6 +171,9 @@ public:
//- Write - does nothing
virtual bool write();
//- On end - provide feedback about disconnecting from catatyst.
virtual bool end();
//- Update for changes of mesh
virtual void updateMesh(const mapPolyMesh& mpm);
......
......@@ -21,7 +21,10 @@ functions
// Calculate a few iterations before starting processing
timeStart 0.05;
// timeEnd 0.40
// For testing: force endTime of catalyst and simulation
// timeEnd 0.1;
// "/endTime" 0.15;
}
}
......
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