Wrapper around another termination condition that allows the user to terminate the main loop manually. More...
#include <kill_switch.hpp>


Public Member Functions | |
| KillSwitch (const string &fname, TerminationCondition &tc) | |
| Class constructor. More... | |
| bool | operator() (const hdsim &sim) |
| Returns true if the simulation should continue, false otherwise. More... | |
Public Member Functions inherited from TerminationCondition | |
| virtual | ~TerminationCondition (void) |
| Virtual destructor. | |
Wrapper around another termination condition that allows the user to terminate the main loop manually.
Definition at line 12 of file kill_switch.hpp.
| KillSwitch::KillSwitch | ( | const string & | fname, |
| TerminationCondition & | tc | ||
| ) |
Class constructor.
| fname | Kill switch file. When the program first starts, a file with this name will be created and the value 0 be written to it. If, at some point, the value in this file will be different from 0, then the main loop should stop. |
| tc | Original termination condition |
Definition at line 8 of file kill_switch.cpp.
|
virtual |
Returns true if the simulation should continue, false otherwise.
| sim | Hydrodynamic simulation |
Implements TerminationCondition.
Definition at line 17 of file kill_switch.cpp.
1.8.13