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-2023 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  // Protected Member Functions
67 
68  //- Read controls
69  virtual bool read();
70 
71 
72 public:
73 
74  // Static Data Members
75 
76  //- Run-time type information
77  TypeName("nonOrthogonalSolutionControl");
78 
79 
80  // Constructors
81 
82  //- Construct from a mesh and the name of the algorithm
84 
85 
86  //- Destructor
88 
89 
90  // Member Functions
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  //- Flag to indicate whether in final state
107  bool isFinal(const bool finalIter) const;
108 
109 
110  // Evolution
111 
112  //- Non-orthogonal corrector loop
113  bool correctNonOrthogonal(const bool finalIter = false);
114 };
115 
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 } // End namespace Foam
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 #endif
128 
129 // ************************************************************************* //
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:99
Non-orthogonal solution control class. Provides non-orthogonal-loop control methods.
bool correctNonOrthogonal(const bool finalIter=false)
Non-orthogonal corrector loop.
TypeName("nonOrthogonalSolutionControl")
Run-time type information.
bool anyNonOrthogonalIter() const
Flag to indicate any non-orthogonal iteration.
bool isFinal(const bool finalIter) const
Flag to indicate whether in final state.
nonOrthogonalSolutionControl(fvMesh &mesh, const word &algorithmName)
Construct from a mesh and the name of the algorithm.
bool firstNonOrthogonalIter() const
Flag to indicate the first non-orthogonal iteration.
label nCorrNonOrth() const
Maximum number of non-orthogonal correctors.
bool finalNonOrthogonalIter() const
Flag to indicate the last non-orthogonal iteration.
label nCorrNonOrth_
Maximum number of non-orthogonal correctors.
label corrNonOrth_
Current non-orthogonal corrector index.
Single-region-specific derivation of the solution control class.
const fvMesh & mesh() const
Return the mesh.
const word & algorithmName() const
Return the name of the algorithm.
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
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