Skip to content
Snippets Groups Projects
Commit 0e8704de authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: solutionControl - control dictionary e.g. PIMPLE now optional. See #1002

parent ef394e9d
No related branches found
No related tags found
No related merge requests found
...@@ -39,7 +39,7 @@ void Foam::pimpleControl::read() ...@@ -39,7 +39,7 @@ void Foam::pimpleControl::read()
{ {
solutionControl::read(false); solutionControl::read(false);
const dictionary& pimpleDict = dict(); const dictionary pimpleDict(dict());
solveFlow_ = pimpleDict.lookupOrDefault("solveFlow", true); solveFlow_ = pimpleDict.lookupOrDefault("solveFlow", true);
nCorrPIMPLE_ = pimpleDict.lookupOrDefault<label>("nOuterCorrectors", 1); nCorrPIMPLE_ = pimpleDict.lookupOrDefault<label>("nOuterCorrectors", 1);
......
...@@ -37,7 +37,7 @@ namespace Foam ...@@ -37,7 +37,7 @@ namespace Foam
void Foam::solutionControl::read(const bool absTolOnly) void Foam::solutionControl::read(const bool absTolOnly)
{ {
const dictionary& solutionDict = this->dict(); const dictionary solutionDict(this->dict());
// Read solution controls // Read solution controls
nNonOrthCorr_ = nNonOrthCorr_ =
......
...@@ -203,7 +203,7 @@ public: ...@@ -203,7 +203,7 @@ public:
// Access // Access
//- Return the solution dictionary //- Return the solution dictionary
inline const dictionary& dict() const; inline const dictionary dict() const;
//- Current corrector loop index //- Current corrector loop index
inline label corr() const; inline label corr() const;
......
...@@ -25,9 +25,9 @@ License ...@@ -25,9 +25,9 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * 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_);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment