CG  Version 25
CnsParameters.h
Go to the documentation of this file.
1 #ifndef CNS_PARAMETERS
2 #define CNS_PARAMETERS
3 
4 #include "Parameters.h"
5 // Here are the run time and PDE parameters
6 class CnsParameters : public Parameters
7 {
8 public:
9 
11 {
20  farField=16 // far field BC treats inflow and outflow cases
21 };
22 
23 enum PDE
24 {
27 };
29 {
30  fortranVersion, // Don's fortran version
31  cppVersionI, // Don's C++ version
32  cppVersionII, // dlb's C++ version (to be removed)
33  multiComponentVersion, // Jeff Banks version
34  multiFluidVersion // Don's multifluid version
35 };
36 
37 // int conservativeGodunovMethod; // 0=fortran, 1=C++, 2=DLB
39 {
41  jwlEOS=1, // EOS for a solid/gas mixture
42  mieGruneisenEOS=2, // EOS for high temperature solids
43  userDefinedEOS=3, // user defined EOS (userDefinedEOS.f)
44  stiffenedGasEOS=4, // stiffened gas
45  taitEOS=5 // tait EOS (for water for e.g.)
46 };
47 
49 {
53  hLLRiemannSolver=3 // *note* this is correct
54 };
55 
56 enum PDEVariation // These options modify the type of PDE.
57 {
61 };
62 
63 
64 // Here are some standard test problems
66 {
69 };
70 
71  CnsParameters(const int & numberOfDimensions0=3);
73 
74  virtual int
75  conservativeToPrimitive(GridFunction & gf, int gridToConvert=-1, int fixupUnsedPoints=false);
76 
77  virtual int
78  displayPdeParameters(FILE *file = stdout );
79 
80  virtual int
81  getDerivedFunction( const aString & name, const realCompositeGridFunction & u,
82  realCompositeGridFunction & v, const int component, const real t,
83  Parameters & parameters);
84  virtual int
85  getDerivedFunction( const aString & name, const realMappedGridFunction & u,
86  realMappedGridFunction & v, const int grid,
87  const int component, const real t, Parameters & parameters);
88 
89  // compute the normal force on a boundary (for moving grid problems)
90  virtual
91  int getNormalForce( realCompositeGridFunction & u, realSerialArray & normalForce, int *ipar, real *rpar );
92 
93  virtual int
94  primitiveToConservative(GridFunction & gf, int gridToConvert=-1, int fixupUnsedPoints=false);
95 
96  virtual int
98 
99  virtual int
100  setParameters(const int & numberOfDimensions0=2,
101  const aString & reactionName =nullString);
102  virtual int
103  setPdeParameters(CompositeGrid & cg, const aString & command = nullString,
104  DialogData *interface =NULL );
105 
106  virtual int
108  const int & degreeSpace =2,
109  const int & degreeTime =1 );
110 
111  virtual int
113 
114  virtual int
116 
117  virtual
118  int buildReactions();
119 
120  virtual int
121  updateUserDefinedEOS(GenericGraphicsInterface & gi);
122 
123  virtual
124  bool useConservativeVariables(int grid=-1) const; // if true we are using a solver that uses conservative variables
125 
126  virtual
127  int numberOfGhostPointsNeeded() const; // number of ghost points needed by this method.
128 
129  virtual
130  int get(const GenericDataBase & dir, const aString & name);
131  virtual
132  int put(GenericDataBase & dir, const aString & name);
133 
134  virtual
135  int
136  assignParameterValues(const aString & label, RealArray & values,
137  const int & numRead, aString *c, real val[],
138  char *extraName1 /* = 0 */, const int & extraValue1Location /* = 0 */,
139  char *extraName2 /* = 0 */, const int & extraValue2Location /* = 0 */,
140  char *extraName3 /* = 0 */, const int & extraValue3Location /* = 0 */ );
141 
142 // virtual
143 // int setTwilightZoneParameters(const aString & command =nullString,
144 // DialogData *interface=NULL );
145 
146 // virtual
147 // realMappedGridFunction& getKnownSolution(real t, int grid,
148 // const Index & I1, const Index &I2, const Index &I3,
149 // bool initialCall=false );
150 
151  virtual
152  int updateToMatchGrid( CompositeGrid & cg,
153  IntegerArray & sharedBoundaryCondition = Overture::nullIntArray() );
154 
155  virtual
156  int getComponents( IntegerArray &components );
157 
158  virtual
160  const int & axis,
161  const int & grid,
162  CompositeGrid & cg);
163  virtual
164  bool isMixedBC( int bc );
165 
166 };
167 #endif