STYLE: use <case> instead of $FOAM_CASE expansion in more places

This commit is contained in:
Mark Olesen
2018-10-15 21:19:13 +02:00
parent c6520033c9
commit 5c8a1b746d
11 changed files with 56 additions and 56 deletions

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -99,11 +99,12 @@ Foam::functionObjects::abort::abort
:
functionObject(name),
time_(runTime),
abortFile_("$FOAM_CASE/" + name),
abortFile_(time_.globalPath()/name),
action_(Time::stopAtControls::saNextWrite),
triggered_(false)
{
abortFile_.expand();
abortFile_.clean();
read(dict);
// Cleanup old files from previous runs
@ -123,6 +124,12 @@ bool Foam::functionObjects::abort::read(const dictionary& dict)
if (dict.readIfPresent("file", abortFile_))
{
abortFile_.expand();
if (!abortFile_.isAbsolute())
{
abortFile_ = time_.globalPath()/abortFile_;
abortFile_.clean();
}
}
const auto oldAction = action_;

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2017-2018 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -28,7 +28,7 @@ Group
grpUtilitiesFunctionObjects
Description
Watches for presence of the named file in the $FOAM_CASE directory
Watches for presence of the named file in the case directory
and aborts the calculation if it is present.
The presence of the abort file is only checked on the master process.
@ -42,7 +42,7 @@ Description
\table
Property | Description | Required | Default value
type | Type name: abort | yes |
file | The abort filename | no | $FOAM_CASE/name
file | The abort filename | no | \<case\>/name
action | Abort action | no | nextWrite
\endtable