38 namespace functionObjects
67 > Foam::functionObjects::abort::actionTypeNames_;
72 void Foam::functionObjects::abort::removeFile()
const 74 bool hasAbort =
isFile(abortFile_);
96 abortFile_(
"$FOAM_CASE/" + name),
97 action_(actionType::nextWrite)
117 if (dict.
found(
"action"))
119 action_ = actionTypeNames_.read(dict.
lookup(
"action"));
123 action_ = actionType::nextWrite;
137 bool hasAbort =
isFile(abortFile_);
144 case actionType::noWriteNow :
148 Info<<
"USER REQUESTED ABORT (timeIndex=" 150 <<
"): stop without writing data" 156 case actionType::writeNow :
160 Info<<
"USER REQUESTED ABORT (timeIndex=" 162 <<
"): stop+write data" 168 case actionType::nextWrite :
172 Info<<
"USER REQUESTED ABORT (timeIndex=" 174 <<
"): stop after next data write" bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
Inter-processor communication reduction functions.
A list of keyword definitions, which are a keyword followed by any number of values (e...
bool isFile(const fileName &, const bool checkVariants=true, const bool followLink=true)
Does the name exist as a file in the file system?
set endTime to stop immediately w/ writing
addToRunTimeSelectionTable(functionObject, Qdot, dictionary)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool master(const label communicator=0)
Am I the master process.
virtual bool end()
Execute at the final time-loop, used for cleanup.
Abstract base-class for Time/database function objects.
Initialise the NamedEnum HashTable from the static list of names.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Macros for easy insertion into run-time selection tables.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
bool read(const char *, int32_t &)
virtual bool execute()
Execute, check existence of abort file and take action.
A class for handling words, derived from string.
virtual bool read(const dictionary &)
Read the dictionary settings.
set endTime to stop immediately w/o writing
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
errorManip< error > abort(error &err)
virtual ~abort()
Destructor.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
defineTypeNameAndDebug(Qdot, 0)
actionType
Enumeration defining the type of action.
bool rm(const fileName &)
Remove a file, returning true if successful otherwise false.
virtual bool write()
Execute, check existence of abort file and take action.
stop the next time data are written
abort(const word &name, const Time &runTime, const dictionary &)
Construct from Time and dictionary.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.