41 int Foam::sigWriteNow::signal_
75 is >> sigWriteNow::signal_;
81 os << sigWriteNow::signal_;
92 void Foam::sigWriteNow::sigHandler(
int)
96 Info<<
"sigWriteNow :" 97 <<
" setting up write at end of the next iteration" <<
nl <<
endl;
136 Info<<
"sigWriteNow :" 137 <<
" Enabling writing upon signal " << signal_ <<
nl;
virtual void writeData(Foam::Ostream &os) const
Write.
Abstract base class for registered object with I/O. Used in debug symbol registration.
static void setHandler(const char *what, int sigNum, void(*handler)(int))
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
~sigWriteNow()
Destructor.
addwriteNowSignalToOpt(const addwriteNowSignalToOpt &)=delete
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static void resetHandler(const char *what, int sigNum)
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
virtual ~addwriteNowSignalToOpt()=default
sigWriteNow() noexcept=default
Default construct.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
File-local code for setting/resetting signal handlers.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
int optimisationSwitch(const char *name, const int deflt=0)
Lookup optimisation switch or add default value.
int debug
Static debugging option.
OBJstream os(runTime.globalPath()/outputName)
void operator=(const addwriteNowSignalToOpt &)=delete
void writeOnce()
Write the objects once (one shot) and continue the run.
messageStream Info
Information stream (stdout output on master, null elsewhere)
addwriteNowSignalToOpt addwriteNowSignalToOpt_("writeNowSignal")
void addOptimisationObject(const char *name, simpleRegIOobject *obj)
Register optimisation switch read/write object.
static Foam::Time * runTimePtr_
virtual void readData(Foam::Istream &is)
Read.
static void set(bool verbose=false)
Set/reset signal handler.