Loading...
Searching...
No Matches
cornerpoint_grid.h File Reference

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

`#include <opm/grid/UnstructuredGrid.h>`
`#include <opm/grid/cpgpreprocess/preprocess.h>`

Go to the source code of this file.

## Functions

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.
void | compute_geometry (struct UnstructuredGrid *g)
| Compute derived geometric primitives in a grid.

## 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] | g | Grid structure.

## 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] | in | Corner-point specification. If "actnum" is NULL, then the specification is interpreted as if all cells are initially active.
  [in] | tol | Absolute tolerance of node-coincidence.
  [in] | edge_conformal | Whether 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().