diff --git a/src/finiteVolume/cfdTools/general/solutionControl/pisoControl/pisoControl.C b/src/finiteVolume/cfdTools/general/solutionControl/pisoControl/pisoControl.C index 49c670b010..eaff075899 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/pisoControl/pisoControl.C +++ b/src/finiteVolume/cfdTools/general/solutionControl/pisoControl/pisoControl.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,7 +38,9 @@ namespace Foam Foam::pisoControl::pisoControl(fvMesh& mesh, const word& dictName) : pimpleControl(mesh, dictName) -{} +{ + // mesh_.data::add("finalIteration", true); +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/cfdTools/general/solutionControl/pisoControl/pisoControl.H b/src/finiteVolume/cfdTools/general/solutionControl/pisoControl/pisoControl.H index 3d412e7406..9b5a85de74 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/pisoControl/pisoControl.H +++ b/src/finiteVolume/cfdTools/general/solutionControl/pisoControl/pisoControl.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -72,9 +72,21 @@ public: //- Destructor virtual ~pisoControl(); + + + // Member Functions + + // Solution control + + //- Return true if in the final inner (PISO) iteration + inline bool finalInnerIter() const; }; +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "pisoControlI.H" + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/finiteVolume/cfdTools/general/solutionControl/pisoControl/pisoControlI.H b/src/finiteVolume/cfdTools/general/solutionControl/pisoControl/pisoControlI.H new file mode 100644 index 0000000000..d973e5a15a --- /dev/null +++ b/src/finiteVolume/cfdTools/general/solutionControl/pisoControl/pisoControlI.H @@ -0,0 +1,36 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +inline bool Foam::pisoControl::finalInnerIter() const +{ + return + corrPISO_ == nCorrPISO_ + && corrNonOrtho_ == nNonOrthCorr_ + 1; +} + + +// ************************************************************************* //