Unstruct2D  1.0
Solution of 2-D Euler- and Navier-Stokes Equations on Unstructured Triangular Grids
 All Classes Files Functions Variables Typedefs Enumerations Macros
timeDiscr.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 8, 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 TIMEDISCR_H_INCLUDED
30 #define TIMEDISCR_H_INCLUDED
31 
32 #include "defs.h"
33 #include "bndConds.h"
34 #include "fluidProps.h"
35 #include "geometry.h"
36 #include "precond.h"
37 #include "spaceDiscr.h"
38 
43 class TimeDiscr
44 {
45 public:
46 
47  // variables
48 
51  int nIterIrs,
52  nrk;
53  bool dissipOn[5];
55  epsIrs,
56  ark[5],
57  betrk[5];
59  // functions
60 
61  TimeDiscr();
62  ~TimeDiscr();
63  void AllocateMemory( int nNodes );
64  void DensityChange( const Geometry &geometry, const FluidProps &fluidProps,
65  REAL &drho, REAL &drmax, int &idrmax ) const;
66  void Irsmoo( const Geometry &geometry, SpaceDiscr &spaceDiscr );
67  void Solve( const Geometry &geometry, FluidProps &fluidProps, BndConds &bndConds,
68  SpaceDiscr &spaceDiscr, const Precond &precond );
69  void TimeStep( const Geometry &geometry, const FluidProps &fluidProps,
70  const Precond &precond, int order );
71 
72 private:
73 
74  CONSVARS *cvOld;
75  REAL *tstep;
77  // temporary storage required for implicit residual smoothing (to avoid repeated alloc./dealloc.)
78  CONSVARS *rhsOld,
79  *rhsIter;
80  int *nContr;
82  // functions
83 
84  TimeDiscr( const TimeDiscr &timeDiscr ); // override default copy constructor
85  TimeDiscr & operator = (const TimeDiscr &timeDiscr); // and assignment operator
86 };
87 
88 #endif // TIMEDISCR_H_INCLUDED
Definition: spaceDiscr.h:42
Definition: fluidProps.h:39
~TimeDiscr()
Definition: timeDiscr.cpp:64
REAL cfl
Definition: timeDiscr.h:54
REAL betrk[5]
Definition: timeDiscr.h:54
int nrk
Definition: timeDiscr.h:51
TimeDiscr()
Definition: timeDiscr.cpp:35
void DensityChange(const Geometry &geometry, const FluidProps &fluidProps, REAL &drho, REAL &drmax, int &idrmax) const
Definition: densityChange.cpp:39
Definition: bndConds.h:42
bool dissipOn[5]
Definition: timeDiscr.h:53
REAL epsIrs
Definition: timeDiscr.h:54
Definition: geometry.h:41
void TimeStep(const Geometry &geometry, const FluidProps &fluidProps, const Precond &precond, int order)
Definition: timeStep.cpp:38
Definition: precond.h:40
void Irsmoo(const Geometry &geometry, SpaceDiscr &spaceDiscr)
Definition: irsmoo.cpp:37
REAL ark[5]
Definition: timeDiscr.h:54
TimeStepping timeStepping
Definition: timeDiscr.h:49
TimeStepping
Kind of time-stepping.
Definition: defs.h:42
Conserved variables. All quantities are in SI units.
Definition: defs.h:80
double REAL
Definition: defs.h:58
int nIterIrs
Definition: timeDiscr.h:51
Definition: timeDiscr.h:43
void Solve(const Geometry &geometry, FluidProps &fluidProps, BndConds &bndConds, SpaceDiscr &spaceDiscr, const Precond &precond)
Definition: solve.cpp:40
void AllocateMemory(int nNodes)
Definition: timeDiscr.cpp:80