Unstruct2D  1.0
Solution of 2-D Euler- and Navier-Stokes Equations on Unstructured Triangular Grids
 All Classes Files Functions Variables Typedefs Enumerations Macros
solver.h
Go to the documentation of this file.
1 //*****************************************************************************
6 //
7 // (c) J. Blazek, CFD Consulting & Analysis, www.cfd-ca.de
8 // Created February 15, 2014
9 // Last modification: July 5, 2014
10 //
11 //=============================================================================
12 //
13 // This program is free software; you can redistribute it and/or
14 // modify it under the terms of the GNU General Public License
15 // as published by the Free Software Foundation; either version 2
16 // of the License, or (at your option) any later version.
17 //
18 // This program is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program; if not, write to the Free Software
25 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 //
27 //*****************************************************************************
28 
29 #ifndef SOLVER_H_INCLUDED
30 #define SOLVER_H_INCLUDED
31 
32 #include <string>
33 #include "defs.h"
34 #include "bndConds.h"
35 #include "fluidProps.h"
36 #include "geometry.h"
37 #include "output.h"
38 #include "precond.h"
39 #include "spaceDiscr.h"
40 #include "timeDiscr.h"
41 
46 class Solver
47 {
48 public:
49 
57  bool restUse;
58  int maxIter,
59  outStep,
60  iter;
64  std::string fnameRsti,
65  fnameRsto;
67  // functions
68 
69  Solver();
70  void InitConstants();
71  void InitSolution();
72  void ReadSolution();
73  void WriteSolution();
74  void Convergence( Output &output );
75 
78  bool Converged()
79  { if (iter>=maxIter || drho<=convTol) return true;
80  return false; }
81 
82 private:
83 
84  REAL drho,
85  drho1,
86  cl,
87  cd,
88  cm,
89  mflow,
90  mfratio;
92  // functions
93 
94  void Forces();
95  void MassFlow();
96 
97  Solver( const Solver &solver ); // override default copy constructor
98  Solver & operator = (const Solver &solver); // and assignment operator
99 };
100 
101 #endif // SOLVER_H_INCLUDED
TimeDiscr timeDiscr
Definition: solver.h:54
void InitConstants()
Definition: initConstants.cpp:34
Definition: spaceDiscr.h:42
Definition: fluidProps.h:39
int outStep
Definition: solver.h:58
FluidProps fluidProps
Definition: solver.h:51
void ReadSolution()
Definition: readSolution.cpp:43
std::string fnameRsto
Definition: solver.h:64
void WriteSolution()
Definition: writeSolution.cpp:43
int iter
Definition: solver.h:58
Geometry geometry
Definition: solver.h:52
Definition: bndConds.h:42
Definition: output.h:45
void Convergence(Output &output)
Definition: convergence.cpp:38
int maxIter
Definition: solver.h:58
REAL convTol
Definition: solver.h:61
Definition: solver.h:46
Definition: geometry.h:41
bool restUse
Definition: solver.h:57
BndConds bndConds
Definition: solver.h:50
Definition: precond.h:40
SpaceDiscr spaceDiscr
Definition: solver.h:53
Precond precond
Definition: solver.h:55
Solver()
Definition: solver.cpp:33
std::string fnameRsti
Definition: solver.h:64
void InitSolution()
Definition: initSolution.cpp:35
double REAL
Definition: defs.h:58
Definition: timeDiscr.h:43
bool Converged()
Definition: solver.h:78