Add copy of (proposed) grid structure.

This commit is contained in:
Jostein R. Natvig 2010-08-31 14:09:05 +00:00
parent 4f1939b81b
commit 0734f8d842

45
grid.h Normal file
View File

@ -0,0 +1,45 @@
#ifndef GRID_H_INCLUDED
#define GRID_H_INCLUDED
/* GRID_TOPOLOGY and GRID_GEOMETRY must be at the beginning of every
* grid type.
*
*
*/
#define GRID_TOPOLOGY \
int dimensions; \
\
int number_of_cells; \
int number_of_faces; \
int number_of_nodes; \
\
int *face_nodes; \
int *face_nodepos; \
int *face_cells; \
\
int *cell_faces; \
int *cell_facepos; \
#define GRID_GEOMETRY \
double *node_coordinates; \
\
double *face_centroids; \
double *face_areas; \
double *face_normals; \
\
double *cell_centroids; \
double *cell_volumes; \
typedef struct {
GRID_TOPOLOGY
GRID_GEOMETRY
} grid_t;
void free_grid (grid_t *g);
void alloc_grid_geometry (grid_t *g);
void print_grid_summary (grid_t *g);
#endif