CG  Version 25
Cgcns.h
Go to the documentation of this file.
1 #ifndef CGCNS_H
2 #define CGCNS_H
3 
4 #include "DomainSolver.h"
5 
6 
7 // Cgcns can be used to solve the compressible Navier-Stokes and reactive Euler equations.
8 
9 class Cgcns : public DomainSolver
10 {
11 public:
12 
13 Cgcns(CompositeGrid & cg, GenericGraphicsInterface *ps=NULL, Ogshow *show=NULL, const int & plotOption=1 );
14 
15 
16 virtual ~Cgcns();
17 
18 
19 virtual int
20 applyBoundaryConditions(const real & t, realMappedGridFunction & u,
21  realMappedGridFunction & gridVelocity,
22  const int & grid,
23  const int & option=-1,
24  realMappedGridFunction *puOld=NULL,
25  realMappedGridFunction *pGridVelocityOld=NULL,
26  const real & dt=-1.);
27 
28 
29 virtual int
30 applyBoundaryConditionsForImplicitTimeStepping(realMappedGridFunction & rhs,
31  realMappedGridFunction & uL,
32  realMappedGridFunction & gridVelocity,
33  real t,
34  int scalarSystem,
35  int grid );
36 
37 virtual int
39  realCompositeGridFunction &coeff,
40  realCompositeGridFunction &ucur,
41  realCompositeGridFunction &rhs, const int &numberOfComponents);
42 
43 virtual
44 void addForcing(realMappedGridFunction & dvdt, const realMappedGridFunction & u, int iparam[], real rparam[],
45  realMappedGridFunction & dvdtImplicit = Overture::nullRealMappedGridFunction(),
46  realMappedGridFunction *referenceFrameVelocity=NULL );
47 
48 virtual void
50 
51 virtual void
52 buildImplicitSolvers(CompositeGrid &cg);
53 
54 virtual int
55 buildTimeSteppingDialog(DialogData & dialog );
56 
57 // virtual void getUt( GridFunction & cgf,
58 // const real & t,
59 // RealCompositeGridFunction & ut,
60 // real tForce );
61 
62 virtual void
63 formMatrixForImplicitSolve(const real & dt0,
64  GridFunction & cgf1,
65  GridFunction & cgf0 );
66 virtual int
67 formImplicitTimeSteppingMatrix(realMappedGridFunction & coeff,
68  const real & dt0,
69  int scalarSystem,
70  realMappedGridFunction & uL,
71  const int & grid );
72 
73 virtual realCompositeGridFunction &
74 getAugmentedSolution( GridFunction & gf0, realCompositeGridFunction & v );
75 
76 // Return the list of interface data needed by a given interface:
77 virtual int
78 getInterfaceDataOptions( GridFaceDescriptor & info, int & interfaceDataOptions ) const;
79 
80 virtual void
81 getTimeSteppingEigenvalue(MappedGrid & mg,
82  realMappedGridFunction & u,
83  realMappedGridFunction & gridVelocity,
84  real & reLambda,
85  real & imLambda,
86  const int & grid);
87 virtual int
88 getTimeSteppingOption(const aString & answer,
89  DialogData & dialog );
90 
91 
92 virtual int
93 getUt(const realMappedGridFunction & v,
94  const realMappedGridFunction & gridVelocity,
95  realMappedGridFunction & dvdt,
96  int iparam[], real rparam[],
97  realMappedGridFunction & dvdtImplicit = Overture::nullRealMappedGridFunction(),
98  MappedGrid *pmg2=NULL,
99  const realMappedGridFunction *pGridVelocity2= NULL);
100 
101 
102 virtual void
103 implicitSolve(const real & dt0,
104  GridFunction & cgf1,
105  GridFunction & cgf0);
106 
107 virtual int
109 
110 virtual int
112  int interfaceDataOptions,
113  GridFaceDescriptor & info,
114  GridFaceDescriptor & gfd,
115  int gfIndex, real t );
116 
117 virtual bool
118 isImplicitMatrixSingular( realCompositeGridFunction &uL );
119 
120 virtual void
121 printTimeStepInfo( const int & step, const real & t, const real & cpuTime );
122 
123 virtual int
124 project(GridFunction & cgf);
125 
126 virtual void
127 saveShowFileComments( Ogshow &show );
128 
129 virtual int
130 setPlotTitle(const real &t, const real &dt);
131 
132 virtual int
134 
135 virtual int
136 setupPde(aString & reactionName,bool restartChosen, IntegerArray & originalBoundaryCondition);
137 
138 virtual int
140 
141 virtual int
142 updateStateVariables(GridFunction & cgf, int stage=-1);
143 
144 virtual int
145 updateToMatchGrid(CompositeGrid & cg);
146 
147 virtual
148 void writeParameterSummary( FILE *);
149 
150 protected:
151 
152 
153 private:
154 
155 
156 };
157 
158 #endif