mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: improvements to Time
- expose the names of write and stopAt controls for reuse elsewhere and provide a stopAtControls enum for 'unknown' - track the requested number of sub-cycles (was previously a bool)
This commit is contained in:
@ -49,18 +49,6 @@ namespace functionObjects
|
||||
}
|
||||
|
||||
|
||||
const Foam::Enum
|
||||
<
|
||||
Foam::Time::stopAtControls
|
||||
>
|
||||
Foam::functionObjects::abort::actionNames_
|
||||
{
|
||||
{ Time::stopAtControls::saNoWriteNow, "noWriteNow" },
|
||||
{ Time::stopAtControls::saWriteNow, "writeNow" },
|
||||
{ Time::stopAtControls::saNextWrite, "nextWrite" },
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
|
||||
|
||||
// file-scope
|
||||
@ -126,12 +114,6 @@ Foam::functionObjects::abort::abort
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::functionObjects::abort::~abort()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::functionObjects::abort::read(const dictionary& dict)
|
||||
@ -145,7 +127,7 @@ bool Foam::functionObjects::abort::read(const dictionary& dict)
|
||||
|
||||
const auto oldAction = action_;
|
||||
|
||||
action_ = actionNames_.lookupOrDefault
|
||||
action_ = Time::stopAtControlNames.lookupOrDefault
|
||||
(
|
||||
"action",
|
||||
dict,
|
||||
|
||||
@ -30,6 +30,7 @@ Group
|
||||
Description
|
||||
Watches for presence of the named file in the $FOAM_CASE directory
|
||||
and aborts the calculation if it is present.
|
||||
|
||||
The presence of the abort file is only checked on the master process.
|
||||
|
||||
Currently the following action types are supported:
|
||||
@ -73,9 +74,6 @@ class abort
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- A subset of Time stopAtControls
|
||||
static const Enum<Time::stopAtControls> actionNames_;
|
||||
|
||||
//- Reference to the Time
|
||||
const Time& time_;
|
||||
|
||||
@ -116,7 +114,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~abort();
|
||||
virtual ~abort() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
Reference in New Issue
Block a user