CG  Version 25
Cgad.h
Go to the documentation of this file.
1 #include "DomainSolver.h"
2 
3 #ifndef CGAD_H
4 #define CGAD_H
5 
6 
7 // CG equation-domain solver for the advection-diffusion (AD) equations
8 
9 class Cgad : public DomainSolver
10 {
11 public:
12 
13 Cgad(CompositeGrid & cg, GenericGraphicsInterface *ps=NULL, Ogshow *show=NULL, const int & plotOption=1 );
14 
15 
16 virtual ~Cgad();
17 
18 
19 virtual
20 void addForcing(realMappedGridFunction & dvdt, const realMappedGridFunction & u, int iparam[], real rparam[],
21  realMappedGridFunction & dvdtImplicit = Overture::nullRealMappedGridFunction(),
22  realMappedGridFunction *referenceFrameVelocity=NULL);
23 
24 virtual void
25 advanceADI( real & t, real & dt, int & numberOfSubSteps, int & init, int initialStep );
26 
27 virtual int
28 applyBoundaryConditions(const real & t, realMappedGridFunction & u,
29  realMappedGridFunction & gridVelocity,
30  const int & grid,
31  const int & option=-1,
32  realMappedGridFunction *puOld=NULL,
33  realMappedGridFunction *pGridVelocityOld=NULL,
34  const real & dt=-1.);
35 
36 
37 virtual int
38 applyBoundaryConditionsForImplicitTimeStepping(realMappedGridFunction & rhs,
39  realMappedGridFunction & uL,
40  realMappedGridFunction & gridVelocity,
41  real t,
42  int scalarSystem,
43  int grid );
44 
45 virtual void
46 buildImplicitSolvers(CompositeGrid & cg);
47 
48 virtual int
49 buildTimeSteppingDialog(DialogData & dialog );
50 
51 virtual void
52 formMatrixForImplicitSolve(const real & dt0,
53  GridFunction & cgf1,
54  GridFunction & cgf0 );
55 
56 // virtual int
57 // iterativeInterfaceRightHandSide( IterativeInterfaceOptionsEnum option, GridFaceDescriptor & info,
58 // int gfIndex, real t );
59 
60 // virtual int
61 // formImplicitTimeSteppingMatrix(realMappedGridFunction & coeff,
62 // const real & dt0,
63 // int scalarSystem,
64 // realMappedGridFunction & uL,
65 // const int & grid );
66 
67 // Return the list of interface data needed by a given interface:
68 virtual int
69 getInterfaceDataOptions( GridFaceDescriptor & info, int & interfaceDataOptions ) const;
70 
71 virtual int
72 getUt(const realMappedGridFunction & v,
73  const realMappedGridFunction & gridVelocity,
74  realMappedGridFunction & dvdt,
75  int iparam[], real rparam[],
76  realMappedGridFunction & dvdtImplicit = Overture::nullRealMappedGridFunction(),
77  MappedGrid *pmg2=NULL,
78  const realMappedGridFunction *pGridVelocity2= NULL);
79 
80 
81 virtual void
82 getTimeSteppingEigenvalue(MappedGrid & mg,
83  realMappedGridFunction & u,
84  realMappedGridFunction & gridVelocity,
85  real & reLambda,
86  real & imLambda,
87  const int & grid);
88 
89 virtual int
90 getTimeSteppingOption(const aString & answer,
91  DialogData & dialog );
92 
93 virtual void
94 implicitSolve(const real & dt0,
95  GridFunction & cgf1,
96  GridFunction & cgf0);
97 
98 virtual int
100  int interfaceDataOptions,
101  GridFaceDescriptor & info,
102  GridFaceDescriptor & gfd,
103  int gfIndex, real t );
104 
105 virtual void
106 saveShowFileComments( Ogshow &show );
107 
108 
109 virtual int
110 setOgesBoundaryConditions( GridFunction &cgf, IntegerArray & boundaryConditions, RealArray &boundaryConditionData,
111  const int imp );
112 
113 virtual int
114 setPlotTitle(const real &t, const real &dt);
115 
116 virtual int
118 
119 virtual int
120 setupPde(aString & reactionName,bool restartChosen, IntegerArray & originalBoundaryCondition);
121 
122 virtual int
124 
125 virtual int
127 
128 virtual int
129 updateToMatchGrid(CompositeGrid & cg);
130 
131 virtual int
132 userDefinedInitialConditions(CompositeGrid & cg, realCompositeGridFunction & u );
133 
134 virtual void
136 
137 virtual
138 void writeParameterSummary( FILE *file );
139 
140 protected:
141 
142 
143 private:
144 
145 
146 };
147 
148 #endif