CG  Version 25
GridFunction.h
Go to the documentation of this file.
1 #ifndef GRID_FUNCTION_H
2 #define GRID_FUNCTION_H
3 
4 #include "Overture.h"
5 #include "Parameters.h"
6 
7 class MatrixTransform;
8 
10 {
11  public:
12  enum Forms
13  {
16  };
17 
18  GridFunction(Parameters *pParameters=NULL);
19  ~GridFunction();
20 
21  int updateToMatchGrid(CompositeGrid & cg);
22 
23  void updateGridVelocityArrays(); // update grid velocity arrays if the number of grids has changed.
24 
25 // OB_MappedGridFunction & operator [](const int & grid) const; // reference to a mapped grid function
26 
27  virtual int get( const GenericDataBase & dir, const aString & name); // get from a database file
28  virtual int put( GenericDataBase & dir, const aString & name) const; // put to a database file
29 
30  int primitiveToConservative(int gridToConvert=-1, int fixupUnsedPoints=false);
31  int conservativeToPrimitive(int gridToConvert=-1, int fixupUnsedPoints=false);
32 
33  // build the gridVelocity on a specified component grid.
34  realMappedGridFunction & createGridVelocity(int grid );
35 
36  // return the gridVelocity (if it is there, otherwise return a null grid function)
37  realMappedGridFunction & getGridVelocity(int grid);
38 
40 
41  realCompositeGridFunction & getGridVelocity(); // ***** temporary for conversion ****
42 
43  void setParameters(Parameters & parameters);
44 
47 
49  real t;
50 
53 
55  realCompositeGridFunction u;
56 
59 
61  realMappedGridFunction **gridVelocity; // grid velocity for moving grid problems
62 
64  CompositeGrid cg; // reference to the grid associated with u
65 
67  MatrixTransform **transform;
68 
71 
74 
75  mutable DataBase dbase; // save additional parameters here
76 
77  // return size of this object
78  virtual real sizeOf(FILE *file = NULL ) const;
79 
80 };
81 
82 
83 #endif