-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGrid.h
37 lines (37 loc) · 1.05 KB
/
Grid.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
class Grid {
public:
Grid( int _nx, int _ny, double _minx, double _miny, double _maxx, double _maxy, int _quadOrder, int _basisOrder, bool _internal );
~Grid();
int nx;
int ny;
double minx;
double miny;
double maxx;
double maxy;
int quadOrder;
int basisOrder;
bool internal; // true for pressure grid, false for velocity grid
double dx;
double dy;
double dxInv;
double dyInv;
int nVerts;
int nEdges;
int nPolys;
double** verts;
Edge** edges;
Polygon** polys;
int GetPolyIndex( double* pt );
int EdgeCoordToIndex( int norm, int xi, int yj );
void EdgeIndexToCoord( int ei, int* norm, int* xi, int* yj );
void GetEdgePolys( int ei, Polygon* poly1, Polygon* Polygon2 );
bool GetEdgePolyInds( int ei, int* pinds );
void GetPolyEdgeInds( int pi, int* einds );
void GetVertPolyInds( int vi, int* cinds );
void GetPolyVertInds( int ci, int* vinds );
void UpdateEdges();
void UpdatePolys();
void UpdateTris();
void Write( string fname, int n );
void WriteTris( string fname );
};