diff --git a/src/finiteVolume/cfdTools/general/coupling/externalFileCoupler.C b/src/finiteVolume/cfdTools/general/coupling/externalFileCoupler.C index 5ac87200e7..5d4b3375ca 100644 --- a/src/finiteVolume/cfdTools/general/coupling/externalFileCoupler.C +++ b/src/finiteVolume/cfdTools/general/coupling/externalFileCoupler.C @@ -94,7 +94,7 @@ Foam::externalFileCoupler::externalFileCoupler() : runState_(NONE), commsDir_("/comms"), - statusEnd_("done"), + statusDone_("done"), waitInterval_(1u), timeOut_(100u), slaveFirst_(false), @@ -109,7 +109,7 @@ Foam::externalFileCoupler::externalFileCoupler(const fileName& commsDir) : runState_(NONE), commsDir_(commsDir), - statusEnd_("done"), + statusDone_("done"), waitInterval_(1u), timeOut_(100u), slaveFirst_(false), @@ -157,7 +157,7 @@ bool Foam::externalFileCoupler::readDict(const dictionary& dict) dict.readEntry("commsDir", commsDir_); commsDir_.expand(); commsDir_.clean(); - statusEnd_ = dict.lookupOrDefault("shutdown", "done"); + statusDone_ = dict.lookupOrDefault("statusDone", "done"); slaveFirst_ = dict.lookupOrDefault("initByExternal", false); Info<< type() << ": initialize" << nl @@ -360,10 +360,10 @@ void Foam::externalFileCoupler::shutdown() const { if (Pstream::master() && runState_ == MASTER && Foam::isDir(commsDir_)) { - Log << type() << ": lock file status=" << statusEnd_ << endl; + Log << type() << ": lock file status=" << statusDone_ << endl; std::ofstream os(lockFile()); - os << "status=" << statusEnd_ << nl; + os << "status=" << statusDone_ << nl; } runState_ = DONE; // Avoid re-triggering in destructor diff --git a/src/finiteVolume/cfdTools/general/coupling/externalFileCoupler.H b/src/finiteVolume/cfdTools/general/coupling/externalFileCoupler.H index a242cdb953..ac7421725c 100644 --- a/src/finiteVolume/cfdTools/general/coupling/externalFileCoupler.H +++ b/src/finiteVolume/cfdTools/general/coupling/externalFileCoupler.H @@ -8,7 +8,7 @@ License This file is part of OpenFOAM. - OpenFOAM is free software: you can redistribute it and/or modify i + OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. @@ -54,7 +54,7 @@ Description waitInterval 1; timeOut 100; initByExternal no; - shutdown done; + statusDone done; } \endverbatim @@ -129,7 +129,7 @@ private: fileName commsDir_; //- Value for "status=..." on termination - word statusEnd_; + word statusDone_; //- Interval time between checking for return data [s] unsigned waitInterval_; @@ -283,6 +283,7 @@ public: //- Generate \c status=done in lock (only when run-state = master) + // The exact text can be specified via the statusDone keyword void shutdown() const; //- Remove files written by OpenFOAM diff --git a/src/functionObjects/field/externalCoupled/externalCoupled.H b/src/functionObjects/field/externalCoupled/externalCoupled.H index 98d4d0ef58..f646adc45c 100644 --- a/src/functionObjects/field/externalCoupled/externalCoupled.H +++ b/src/functionObjects/field/externalCoupled/externalCoupled.H @@ -88,7 +88,7 @@ Usage log yes; commsDir "/comms"; initByExternal yes; - shutdown done; // Any arbitrary status=... value + statusDone done; // Any arbitrary status=... value regions { @@ -129,7 +129,7 @@ Usage commsDir | Communication directory | yes | waitInterval | wait interval in (s) | no | 1 timeOut | timeout in (s) | no | 100*waitInterval - shutdown | Lockfile status=... on termination | no | done + statusDone | Lockfile status=... on termination | no | done initByExternal | Initialization values supplied by external app | yes calcFrequency | Calculation frequency | no | 1 regions | The regions to couple | yes |