20 #ifndef OPM_GRID_HEADER_INCLUDED 21 #define OPM_GRID_HEADER_INCLUDED 309 const double * zcorn);
int * cell_facetag
If non-null, this array contains a number for cell-face adjacency indicating the face's position with...
Definition: grid.h:244
int * global_cell
If non-null, this array contains the logical cartesian indices (in a lexicographic ordering) of each ...
Definition: grid.h:214
double * cell_volumes
Exact or approximate cell volumes.
Definition: grid.h:197
double * node_coordinates
Node coordinates, stored consecutively for each node.
Definition: grid.h:160
double * face_centroids
Exact or approximate face centroids, stored consecutively for each face.
Definition: grid.h:168
int number_of_cells
The number of cells in the grid.
Definition: grid.h:109
struct UnstructuredGrid * read_grid(const char *fname)
Import a grid from a character representation stored in file.
Definition: grid.c:526
int * cell_facepos
For a cell c, cell_facepos[c] contains the starting index for c's faces in the cell_faces array...
Definition: grid.h:152
double * cell_centroids
Exact or approximate cell centroids, stored consecutively for each cell.
Definition: grid.h:192
double * face_normals
Exact or approximate face normals, stored consecutively for each face.
Definition: grid.h:184
int number_of_faces
The number of faces in the grid.
Definition: grid.h:111
int dimensions
The topological and geometrical dimensionality of the grid.
Definition: grid.h:106
int * face_nodepos
For a face f, face_nodepos[f] contains the starting index for f's nodes in the face_nodes array...
Definition: grid.h:127
int * face_cells
For a face f, face_cells[2*f] and face_cells[2*f + 1] contain the cell indices of the cells adjacent ...
Definition: grid.h:138
int * cell_faces
Contains for each cell, the indices of its adjacent faces.
Definition: grid.h:146
struct UnstructuredGrid * allocate_grid(size_t ndims, size_t ncells, size_t nfaces, size_t nfacenodes, size_t ncellfaces, size_t nnodes)
Allocate and initialise an UnstructuredGrid where pointers are set to location with correct size...
Definition: grid.c:87
double * face_areas
Exact or approximate face areas.
Definition: grid.h:173
struct UnstructuredGrid * create_grid_empty(void)
Allocate and initialise an empty UnstructuredGrid.
Definition: grid.c:60
int * face_nodes
Contains for each face, the indices of its adjacent nodes.
Definition: grid.h:121
Data structure for an unstructured grid, unstructured meaning that any cell may have an arbitrary num...
Definition: grid.h:98
int number_of_nodes
The number of nodes in the grid.
Definition: grid.h:113
void destroy_grid(struct UnstructuredGrid *g)
Destroy and deallocate an UnstructuredGrid and all its data.
Definition: grid.c:32
int cartdims[3]
Contains the size of the logical cartesian structure (if any) of the grid.
Definition: grid.h:227
void attach_zcorn_copy(struct UnstructuredGrid *G, const double *zcorn)
Will allocate storage internally in the grid object to hold a copy of the zcorn data supplied in the ...
Definition: grid.c:75