time-control function object does not respect underlying function object
When a function-object uses timeStart
, timeEnd
to control its activation, these values are used to define if execution or writing occurs, but can also mean that the underlying end()
function is never called.
This can be problematic if the end()
method is being used to free up resources.
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Link issues together to show that they're related. Learn more.
Activity
- Mark OLESEN mentioned in commit Community/catalyst@24f17124
mentioned in commit Community/catalyst@24f17124
- Developer
haven't tested yet, but what if the solver terminates/ a crash before finalize?
- Author Maintainer
With catalyst it should be okay since the adaptor is wrapped as an autoPtr and will result in a disconnect when that is destroyed.
- Author Maintainer
My concern was that it may be desirable to only run for a certain period and then end() the function object to free up cached meshes, disconnect from catalyst etc. One idea could be that the time control part of the function object remembers its state (not started, active, done) and triggers an end when it transitions from active to done. When it is done, I guess it could also delete itself from the list (don't know if this is useful or necessary). But this also raises the issue of what to do on startup if the simulation is already beyond the timeEnd. Maybe the function object needs to remove itself from the list before even creating the rest of the backend.
- Author Maintainer
One more item that we may wish to consider would be the ability to tag certain function objects as being runtime-only (ie, suppressed when using the -post-processing option). The Catalyst and ADIOS function objects come to mind as things that will likely only work properly during a simulation but not as postpro.
- Author Maintainer
Another point just raised by @Prashant - for a scalarTransport with a particular timeStart, it is initialized during construction. This means that it is being carried about during mesh motion etc, even before timeStart actually wants it.
- Mark OLESEN changed title from time-control function object does not underlying function object to time-control function object does respect not underlying function object
changed title from time-control function object does not underlying function object to time-control function object does respect not underlying function object
- Mark OLESEN changed title from time-control function object does respect not underlying function object to time-control function object does not respect underlying function object
changed title from time-control function object does respect not underlying function object to time-control function object does not respect underlying function object