mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-14 04:53:26 -06:00
The state that is passed to the simulator object is directly accessible without any encapsulation towards the client. After the notification callback was introduced, this allows the client to observe the state in the middle of a simulation. However, it may be that the simulator has some internal state which is not reflected in the state object because there is a cost associated by flushing it into the TwophaseState format. The notification is called back on every timestep, not just the ones that will do reporting. It may even be that reporting is done dynamically and is not known at the time of setup. (It is more like a condition variable). Consequently, flushing the state in every timestep is a bad idea. This patch sets up a new method sync() which it is expected that the notification will call if it needs the state for reporting purposes. Currently it is a no-op. It just establishes a protocol that other, compatible implementations can also use. |
||
---|---|---|
.. | ||
SimulatorCompressibleTwophase.cpp | ||
SimulatorCompressibleTwophase.hpp | ||
SimulatorIncompTwophase.cpp | ||
SimulatorIncompTwophase.hpp |