20#ifndef OPM_GRID_HEADER_INCLUDED
21#define OPM_GRID_HEADER_INCLUDED
309 const double * zcorn);
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 UnstructuredGrid.c:73
struct UnstructuredGrid * create_grid_empty(void)
Allocate and initialise an empty UnstructuredGrid.
Definition UnstructuredGrid.c:58
void destroy_grid(struct UnstructuredGrid *g)
Destroy and deallocate an UnstructuredGrid and all its data.
Definition UnstructuredGrid.c:30
struct UnstructuredGrid * read_grid(const char *fname)
Import a grid from a character representation stored in file.
Definition UnstructuredGrid.c:524
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 UnstructuredGrid.c:85
bool grid_equal(const struct UnstructuredGrid *grid1, const struct UnstructuredGrid *grid2)
Determine whether or not two grid structures represent the same underlying geometry and topology.
Data structure for an unstructured grid, unstructured meaning that any cell may have an arbitrary num...
Definition UnstructuredGrid.h:99
int * face_nodes
Contains for each face, the indices of its adjacent nodes.
Definition UnstructuredGrid.h:121
int * face_nodepos
For a face f, face_nodepos[f] contains the starting index for f's nodes in the face_nodes array.
Definition UnstructuredGrid.h:127
int number_of_cells
The number of cells in the grid.
Definition UnstructuredGrid.h:109
double * face_areas
Exact or approximate face areas.
Definition UnstructuredGrid.h:173
int * cell_faces
Contains for each cell, the indices of its adjacent faces.
Definition UnstructuredGrid.h:146
int number_of_faces
The number of faces in the grid.
Definition UnstructuredGrid.h:111
double * cell_centroids
Exact or approximate cell centroids, stored consecutively for each cell.
Definition UnstructuredGrid.h:192
int * cell_facepos
For a cell c, cell_facepos[c] contains the starting index for c's faces in the cell_faces array.
Definition UnstructuredGrid.h:152
int * cell_facetag
If non-null, this array contains a number for cell-face adjacency indicating the face's position with...
Definition UnstructuredGrid.h:244
double * cell_volumes
Exact or approximate cell volumes.
Definition UnstructuredGrid.h:197
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 UnstructuredGrid.h:138
double * face_centroids
Exact or approximate face centroids, stored consecutively for each face.
Definition UnstructuredGrid.h:168
int number_of_nodes
The number of nodes in the grid.
Definition UnstructuredGrid.h:113
int dimensions
The topological and geometrical dimensionality of the grid.
Definition UnstructuredGrid.h:106
int cartdims[3]
Contains the size of the logical cartesian structure (if any) of the grid.
Definition UnstructuredGrid.h:227
int * global_cell
If non-null, this array contains the logical cartesian indices (in a lexicographic ordering) of each ...
Definition UnstructuredGrid.h:214
double * face_normals
Exact or approximate face normals, stored consecutively for each face.
Definition UnstructuredGrid.h:184
double * node_coordinates
Node coordinates, stored consecutively for each node.
Definition UnstructuredGrid.h:160