Watches for presence of the named file in the $FOAM_CASE directory and aborts the calculation if it is present. More...
Public Types | |
enum | actionType { noWriteNow, writeNow, nextWrite } |
Enumeration defining the type of action. More... | |
Public Member Functions | |
TypeName ("abort") | |
Runtime type information. More... | |
abortCalculation (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFilesUnused=false) | |
Construct for given objectRegistry and dictionary. More... | |
virtual | ~abortCalculation () |
Destructor. More... | |
virtual const word & | name () const |
Return name of the abort file. More... | |
virtual void | read (const dictionary &) |
Read the dictionary settings. More... | |
virtual void | execute () |
Execute, check existence of abort file and take action. More... | |
virtual void | end () |
Execute at the final time-loop, used for cleanup. More... | |
virtual void | timeSet () |
Called when time was set at the end of the Time::operator++. More... | |
virtual void | write () |
Execute, check existence of abort file and take action. More... | |
virtual void | updateMesh (const mapPolyMesh &) |
Update for changes of mesh - does nothing. More... | |
virtual void | movePoints (const polyMesh &) |
Update for changes of mesh - does nothing. More... | |
Private Member Functions | |
void | removeFile () const |
Remove abort file. More... | |
abortCalculation (const abortCalculation &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const abortCalculation &) |
Disallow default bitwise assignment. More... | |
Private Attributes | |
word | name_ |
Name of the abort file unless otherwise specified. More... | |
const objectRegistry & | obr_ |
fileName | abortFile_ |
The fully-qualified name of the abort file. More... | |
actionType | action_ |
The type of action. More... | |
Static Private Attributes | |
static const NamedEnum< actionType, 3 > | actionTypeNames_ |
Action type names. More... | |
Watches for presence of the named file in the $FOAM_CASE directory and aborts the calculation if it is present.
Currently the following action types are supported:
Definition at line 64 of file abortCalculation.H.
enum actionType |
Enumeration defining the type of action.
Enumerator | |
---|---|
noWriteNow | stop immediately without writing data |
writeNow | write data and stop immediately |
nextWrite | stop the next time data are written |
Definition at line 71 of file abortCalculation.H.
|
private |
Disallow default bitwise copy construct.
abortCalculation | ( | const word & | name, |
const objectRegistry & | obr, | ||
const dictionary & | dict, | ||
const bool | loadFromFilesUnused = false |
||
) |
Construct for given objectRegistry and dictionary.
Definition at line 81 of file abortCalculation.C.
References dict, and Foam::read().
|
virtual |
Destructor.
Definition at line 103 of file abortCalculation.C.
|
private |
Remove abort file.
Definition at line 65 of file abortCalculation.C.
References abortCalculation::abortFile_, Foam::isFile(), UPstream::master(), Foam::reduce(), and Foam::rm().
|
private |
Disallow default bitwise assignment.
TypeName | ( | "abort" | ) |
Runtime type information.
|
inlinevirtual |
Return name of the abort file.
Definition at line 134 of file abortCalculation.H.
References abortCalculation::name_.
|
virtual |
Read the dictionary settings.
Definition at line 109 of file abortCalculation.C.
References dict, dictionary::found(), dictionary::lookup(), and dictionary::readIfPresent().
|
virtual |
Execute, check existence of abort file and take action.
Definition at line 127 of file abortCalculation.C.
References Foam::endl(), Foam::Info, Foam::isFile(), Foam::reduce(), Time::saNextWrite, Time::saNoWriteNow, and Time::saWriteNow.
|
virtual |
Execute at the final time-loop, used for cleanup.
Definition at line 176 of file abortCalculation.C.
|
virtual |
Called when time was set at the end of the Time::operator++.
Definition at line 182 of file abortCalculation.C.
|
virtual |
Execute, check existence of abort file and take action.
Definition at line 188 of file abortCalculation.C.
|
inlinevirtual |
Update for changes of mesh - does nothing.
Definition at line 155 of file abortCalculation.H.
|
inlinevirtual |
Update for changes of mesh - does nothing.
Definition at line 159 of file abortCalculation.H.
|
private |
Name of the abort file unless otherwise specified.
Definition at line 83 of file abortCalculation.H.
Referenced by abortCalculation::name().
|
private |
Definition at line 85 of file abortCalculation.H.
|
private |
The fully-qualified name of the abort file.
Definition at line 88 of file abortCalculation.H.
Referenced by abortCalculation::removeFile().
|
staticprivate |
Action type names.
Definition at line 91 of file abortCalculation.H.
|
private |
The type of action.
Definition at line 94 of file abortCalculation.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.