CG
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
cg.v25
common
src
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
9
class
GridFunction
10
{
11
public
:
12
enum
Forms
13
{
14
primitiveVariables
=0,
15
conservativeVariables
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
39
int
referenceGridVelocity
(
GridFunction
& gf);
40
41
realCompositeGridFunction &
getGridVelocity
();
// ***** temporary for conversion ****
42
43
void
setParameters
(
Parameters
& parameters);
44
46
Forms
form
;
47
49
real
t
;
50
52
real
gridVelocityTime
;
53
55
realCompositeGridFunction
u
;
56
58
int
sizeOfGridVelocityArray
;
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
70
int
numberOfTransformMappings
;
71
73
Parameters
*
pParams
;
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
Generated on Fri Jan 4 2013 10:19:20 for CG by
1.8.3