From 0e8704defee57bfd03f3afa7c8800787f205f897 Mon Sep 17 00:00:00 2001 From: Andrew Heather <> Date: Tue, 11 Sep 2018 11:25:22 +0100 Subject: [PATCH] ENH: solutionControl - control dictionary e.g. PIMPLE now optional. See #1002 --- .../general/solutionControl/pimpleControl/pimpleControl.C | 2 +- .../general/solutionControl/solutionControl/solutionControl.C | 2 +- .../general/solutionControl/solutionControl/solutionControl.H | 2 +- .../solutionControl/solutionControl/solutionControlI.H | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleControl.C b/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleControl.C index 0121cf325c8..2e08fc2a607 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleControl.C +++ b/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleControl.C @@ -39,7 +39,7 @@ void Foam::pimpleControl::read() { solutionControl::read(false); - const dictionary& pimpleDict = dict(); + const dictionary pimpleDict(dict()); solveFlow_ = pimpleDict.lookupOrDefault("solveFlow", true); nCorrPIMPLE_ = pimpleDict.lookupOrDefault<label>("nOuterCorrectors", 1); diff --git a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C index 5d50eb0dadd..93e809efe58 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C +++ b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C @@ -37,7 +37,7 @@ namespace Foam void Foam::solutionControl::read(const bool absTolOnly) { - const dictionary& solutionDict = this->dict(); + const dictionary solutionDict(this->dict()); // Read solution controls nNonOrthCorr_ = diff --git a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.H b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.H index 8e748c5a1a3..a21e98a1e0d 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.H +++ b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.H @@ -203,7 +203,7 @@ public: // Access //- Return the solution dictionary - inline const dictionary& dict() const; + inline const dictionary dict() const; //- Current corrector loop index inline label corr() const; diff --git a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControlI.H b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControlI.H index 91c3d1a84e5..c6dd265620f 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControlI.H +++ b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControlI.H @@ -25,9 +25,9 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -inline const Foam::dictionary& Foam::solutionControl::dict() const +inline const Foam::dictionary Foam::solutionControl::dict() const { - return mesh_.solutionDict().subDict(algorithmName_); + return mesh_.solutionDict().subOrEmptyDict(algorithmName_); } -- GitLab