nonOrthogonalSolutionControl.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::nonOrthogonalSolutionControl
26 
27 Description
28  Non-orthogonal solution control class. Provides non-orthogonal-loop control
29  methods.
30 
31 SourceFiles
32  nonOrthogonalControlI.H
33  nonOrthogonalSolutionControl.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef nonOrthogonalSolutionControl_H
38 #define nonOrthogonalSolutionControl_H
39 
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class nonOrthogonalSolutionControl Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
54 {
55 protected:
56 
57  // Protected data
58 
59  //- Maximum number of non-orthogonal correctors
61 
62  //- Current non-orthogonal corrector index
64 
65 
66 public:
67 
68  // Static Data Members
69 
70  //- Run-time type information
71  TypeName("nonOrthogonalSolutionControl");
72 
73 
74  // Constructors
75 
76  //- Construct from a mesh and the name of the algorithm
78 
79 
80  //- Destructor
82 
83 
84  // Member Functions
85 
86  // IO
87 
88  //- Read controls
89  virtual bool read();
90 
91  // Access
92 
93  //- Maximum number of non-orthogonal correctors
94  inline label nNonOrthCorr() const;
95 
96  //- Flag to indicate the first non-orthogonal iteration
97  inline bool firstNonOrthogonalIter() const;
98 
99  //- Flag to indicate the last non-orthogonal iteration
100  inline bool finalNonOrthogonalIter() const;
101 
102  // Evolution
103 
104  //- Non-orthogonal corrector loop
105  bool correctNonOrthogonal();
106 };
107 
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 } // End namespace Foam
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 #endif
120 
121 // ************************************************************************* //
bool finalNonOrthogonalIter() const
Flag to indicate the last non-orthogonal iteration.
Single-region-specific derivation of the solution control class.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
bool correctNonOrthogonal()
Non-orthogonal corrector loop.
label nNonOrthCorr_
Maximum number of non-orthogonal correctors.
A class for handling words, derived from string.
Definition: word.H:59
const fvMesh & mesh() const
Return the mesh.
label nNonOrthCorr() const
Maximum number of non-orthogonal correctors.
bool firstNonOrthogonalIter() const
Flag to indicate the first non-orthogonal iteration.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
const word & algorithmName() const
Return the name of the algorithm.
Non-orthogonal solution control class. Provides non-orthogonal-loop control methods.
label nonOrthCorr_
Current non-orthogonal corrector index.
TypeName("nonOrthogonalSolutionControl")
Run-time type information.
nonOrthogonalSolutionControl(fvMesh &mesh, const word &algorithmName)
Construct from a mesh and the name of the algorithm.
Namespace for OpenFOAM.