From cad94eb90e4f15a4f61c0ece13911cc560f9f6c2 Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 3 Feb 2014 18:05:09 +0000 Subject: [PATCH] fvSolution: fields and equations entries in relaxationFactors are now individually optional --- src/OpenFOAM/matrices/solution/solution.C | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/OpenFOAM/matrices/solution/solution.C b/src/OpenFOAM/matrices/solution/solution.C index ace5564e97..f3251d3c50 100644 --- a/src/OpenFOAM/matrices/solution/solution.C +++ b/src/OpenFOAM/matrices/solution/solution.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ License namespace Foam { -defineDebugSwitchWithName(solution, "solution", 0); + defineDebugSwitchWithName(solution, "solution", 0); } // List of sub-dictionaries to rewrite @@ -60,10 +60,17 @@ void Foam::solution::read(const dictionary& dict) if (dict.found("relaxationFactors")) { const dictionary& relaxDict(dict.subDict("relaxationFactors")); - if (relaxDict.found("fields")) + if (relaxDict.found("fields") || relaxDict.found("equations")) { - fieldRelaxDict_ = relaxDict.subDict("fields"); - eqnRelaxDict_ = relaxDict.subDict("equations"); + if (relaxDict.found("fields")) + { + fieldRelaxDict_ = relaxDict.subDict("fields"); + } + + if (relaxDict.found("equations")) + { + eqnRelaxDict_ = relaxDict.subDict("equations"); + } } else {