Add copy of (proposed) grid structure.
This commit is contained in:
parent
4f1939b81b
commit
0734f8d842
45
grid.h
Normal file
45
grid.h
Normal 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
|
Loading…
Reference in New Issue
Block a user