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 
60 inline bool Foam::solutionControl::transonic() const
61 {
62  return transonic_;
63 }
64 
65 
66 inline bool Foam::solutionControl::consistent() const
67 {
68  return consistent_;
69 }
70 
71 
72 inline bool Foam::solutionControl::frozenFlow() const
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 // ************************************************************************* //
bool consistent() const
Flag to indicate to relax pressure using the.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:531
bool correctNonOrthogonal()
Non-orthogonal corrector loop.
bool momentumPredictor() const
Flag to indicate to solve for momentum.
bool finalNonOrthogonalIter() const
Helper function to identify final non-orthogonal iteration.
label nNonOrthCorr() const
Maximum number of non-orthogonal correctors.
int debug
Static debugging option.
label corr_
Current corrector loop index.
label corr() const
Current corrector loop index.
messageStream Info
Information stream (stdout output on master, null elsewhere)
bool transonic() const
Flag to indicate to solve using transonic algorithm.
label corrNonOrtho() const
Current non-orthogonal corrector index.
bool frozenFlow() const
Flag to indicate that the flow system of equations should not.