cornerpoint_grid.h File Reference
Include dependency graph for cornerpoint_grid.h:

Go to the source code of this file.

Functions

struct UnstructuredGridcreate_grid_cornerpoint (const struct grdecl *in, double tol)
 
void compute_geometry (struct UnstructuredGrid *g)
 

Detailed Description

Routines to form a complete UnstructuredGrid from a corner-point specification.

Function Documentation

void compute_geometry ( struct UnstructuredGrid g)

Compute derived geometric primitives in a grid.

This function computes values for each of the following quantities

  • Quantities pertaining to interfaces (connections, faces)
    1. Barycenters (centroids), g->dimensions scalars per face stored sequentially in g->face_centroids.
    2. Areas, one scalar per face stored sequentially in g->face_areas.
    3. Normals, g->dimensions scalars per face stored sequentially in g->face_normals. The Euclidian norm of each normal is equal to the corresponding face's area.
  • Quantities pertaining to cells (volumes)
    1. Barycenters (centroids), g->dimensions scalars per cell stored sequentially in g->cell_centroids.
    2. Volumes, one scalar per cell stored sequentially in g->cell_volumes.

These fields must be allocated prior to calling compute_geometry().

Parameters
[in,out]gGrid structure.
struct UnstructuredGrid* create_grid_cornerpoint ( const struct grdecl in,
double  tol 
)

Construct grid representation from corner-point specification of a particular geological model.

Pinched cells will be removed irrespective of any explicit "active" map in the geological model input specification. Geometric primitives such as cell barycenters (i.e., centroids), volumes and interface areas are computed internally using function compute_geometry(). The caller does not need to compute this information separately.

Parameters
[in]inCorner-point specification. If "actnum" is NULL, then the specification is interpreted as if all cells are initially active.
[in]tolAbsolute tolerance of node-coincidence.
Returns
Fully formed grid data structure that manages the grid defined by the input corner-point specification. Must be destroyed using function destroy_grid().