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
......@@ -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);
......
......@@ -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_ =
......
......@@ -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;
......
......@@ -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_);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment