solutionControlI.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2015 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
29 
30 inline Foam::label Foam::solutionControl::corr() const
31 {
32  return corr_;
33 }
34 
35 
36 inline Foam::label Foam::solutionControl::corrNonOrtho() const
37 {
38  return corrNonOrtho_;
39 }
40 
41 
42 inline Foam::label Foam::solutionControl::nNonOrthCorr() const
43 {
44  return nNonOrthCorr_;
45 }
46 
47 
49 {
50  return corrNonOrtho_ == nNonOrthCorr_ + 1;
51 }
52 
53 
55 {
56  return momentumPredictor_;
57 }
58 
59 
61 {
62  return transonic_;
63 }
64 
65 
67 {
68  return consistent_;
69 }
70 
71 
73 {
74  return frozenFlow_;
75 }
76 
77 
79 {
80  setFirstIterFlag();
81 
82  ++corrNonOrtho_;
83 
84  if (debug)
85  {
86  Info<< algorithmName_ << " correctNonOrthogonal: corrNonOrtho = "
87  << corrNonOrtho_ << endl;
88  }
89 
90  if (corrNonOrtho_ <= nNonOrthCorr_ + 1)
91  {
92  return true;
93  }
94 
95  corrNonOrtho_ = 0;
96 
97  setFirstIterFlag();
98 
99  return false;
100 }
101 
102 
103 // ************************************************************************* //
Foam::expressions::patchExpr::debug
int debug
Static debugging option.
Foam::solutionControl::transonic
bool transonic() const
Flag to indicate to solve using transonic algorithm.
Definition: solutionControlI.H:60
Foam::solutionControl::consistent
bool consistent() const
Flag to indicate to relax pressure using the.
Definition: solutionControlI.H:66
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:369
Foam::solutionControl::corr_
label corr_
Current corrector loop index.
Definition: solutionControl.H:116
Foam::solutionControl::corr
label corr() const
Current corrector loop index.
Definition: solutionControlI.H:30
Foam::Info
messageStream Info
Information stream (stdout output on master, null elsewhere)
Foam::solutionControl::correctNonOrthogonal
bool correctNonOrthogonal()
Non-orthogonal corrector loop.
Definition: solutionControlI.H:78
Foam::solutionControl::finalNonOrthogonalIter
bool finalNonOrthogonalIter() const
Helper function to identify final non-orthogonal iteration.
Definition: solutionControlI.H:48
Foam::solutionControl::nNonOrthCorr
label nNonOrthCorr() const
Maximum number of non-orthogonal correctors.
Definition: solutionControlI.H:42
Foam::solutionControl::momentumPredictor
bool momentumPredictor() const
Flag to indicate to solve for momentum.
Definition: solutionControlI.H:54
Foam::solutionControl::corrNonOrtho
label corrNonOrtho() const
Current non-orthogonal corrector index.
Definition: solutionControlI.H:36
Foam::solutionControl::frozenFlow
bool frozenFlow() const
Flag to indicate that the flow system of equations should not.
Definition: solutionControlI.H:72