diff --git a/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleControl.C b/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleControl.C index 0121cf325c8046663ee68562b92d4adcba03ec2d..2e08fc2a6074e4afaa354f97623c6adb1ca0731a 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 5d50eb0dadd4d30474d9cf2a1be29495aeb98db3..93e809efe5803273c1b34fc2686eef247b894d22 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 8e748c5a1a38f0b61c93ad91501b56e1b4e84266..a21e98a1e0d681d4e70b01a90949e0a2f541a29c 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 91c3d1a84e5b39447dc7d69c85eed1c4cb21ef0f..c6dd265620f5b3522e7da928a35e30759fb7b158 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_); }