cornerpoint_grid.h File Reference
Include dependency graph for cornerpoint_grid.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct UnstructuredGrid * create_grid_cornerpoint (const struct grdecl *in, double tol, int edge_conformal)
 
struct UnstructuredGrid * create_grid_cornerpoint_pinch (const struct grdecl *in, double tol, int edge_conformal, int pinch_active)
 
void compute_geometry (struct UnstructuredGrid *g)
 

Detailed Description

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

Function Documentation

◆ compute_geometry()

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.

Referenced by Dune::PolyhedralGrid< dim, dimworld, coord_t >::computeGeometry().

◆ create_grid_cornerpoint()

struct UnstructuredGrid * create_grid_cornerpoint ( const struct grdecl *  in,
double  tol,
int  edge_conformal 
)

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.
[in]edge_conformalWhether or not to create an edge-conformal grid structure. This is an experimental feature, aimed at supporting geo-mechanical workflows, that should typically not be used in production runs of traditional reservoir simulations. Non-zero to enable edge-conformal processing, zero to disable this mode.
Returns
Fully formed grid data structure that manages the grid defined by the input corner-point specification. Must be destroyed using function destroy_grid().

◆ create_grid_cornerpoint_pinch()

struct UnstructuredGrid * create_grid_cornerpoint_pinch ( const struct grdecl *  in,
double  tol,
int  edge_conformal,
int  pinch_active 
)

Construct grid representation from corner-point specification, with connections across collapsed inactive cells.

As create_grid_cornerpoint(), and in addition the cells above and below a zone of inactive cells that has collapsed, as with a thickness of zero, are neighbors, with a face between them, if pinch_active is non-zero. This is what the keyword PINCH does. The faces between cells that are not neighbors in the logical Cartesian grid have the tag K_FACE.

Parameters
inInput GRDECL definition
tolTolerance for collapsin nodes
edge_conformalWhether or not to construct an edge conformal grid
[in]pinch_activeNon-zero to connect the cells across collapsed inactive cells, zero to leave the grid with no cell connections across them.

Referenced by Dune::PolyhedralGrid< dim, dimworld, coord_t >::createGrid().