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-2020 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 
92  // Access
93 
94  //- Maximum number of non-orthogonal correctors
95  inline label nCorrNonOrth() const;
96 
97  //- Flag to indicate any non-orthogonal iteration
98  inline bool anyNonOrthogonalIter() const;
99 
100  //- Flag to indicate the first non-orthogonal iteration
101  inline bool firstNonOrthogonalIter() const;
102 
103  //- Flag to indicate the last non-orthogonal iteration
104  inline bool finalNonOrthogonalIter() const;
105 
106 
107  // Evolution
108 
109  //- Non-orthogonal corrector loop
110  bool correctNonOrthogonal();
111 };
112 
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 } // End namespace Foam
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 #endif
125 
126 // ************************************************************************* //
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.
A class for handling words, derived from string.
Definition: word.H:59
label nCorrNonOrth_
Maximum number of non-orthogonal correctors.
const fvMesh & mesh() const
Return the mesh.
bool firstNonOrthogonalIter() const
Flag to indicate the first non-orthogonal iteration.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
bool anyNonOrthogonalIter() const
Flag to indicate any non-orthogonal iteration.
const word & algorithmName() const
Return the name of the algorithm.
label nCorrNonOrth() const
Maximum number of non-orthogonal correctors.
Non-orthogonal solution control class. Provides non-orthogonal-loop control methods.
label corrNonOrth_
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.