From 5f7b62c5e4d4eedbb8b18f216e09bce9d3f40f61 Mon Sep 17 00:00:00 2001 From: Andrew Heather <> Date: Wed, 17 Apr 2019 09:11:39 +0100 Subject: [PATCH] ENH: solutionControl - made dict() function virtual --- .../solutionControl/solutionControl/solutionControl.C | 8 ++++++++ .../solutionControl/solutionControl/solutionControl.H | 2 +- .../solutionControl/solutionControl/solutionControlI.H | 6 ------ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C index 9fb80a7dc8..cc1a9331a6 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C +++ b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C @@ -279,4 +279,12 @@ Foam::solutionControl::solutionControl(fvMesh& mesh, const word& algorithmName) {} +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +const Foam::dictionary Foam::solutionControl::dict() const +{ + return mesh_.solutionDict().subOrEmptyDict(algorithmName_); +} + + // ************************************************************************* // diff --git a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.H b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.H index edadb71717..47eed5423c 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.H +++ b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.H @@ -205,7 +205,7 @@ public: // Access //- Return the solution dictionary - inline const dictionary dict() const; + virtual 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 4d8b640a7a..73c0bf99c5 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControlI.H +++ b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControlI.H @@ -27,12 +27,6 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -inline const Foam::dictionary Foam::solutionControl::dict() const -{ - return mesh_.solutionDict().subOrEmptyDict(algorithmName_); -} - - inline Foam::label Foam::solutionControl::corr() const { return corr_;