preprocess.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  grdecl
 
struct  processed_grid
 

Enumerations

enum  face_tag { I_FACE , J_FACE , K_FACE , NNC_FACE }
 

Functions

int process_grdecl (int pinchActive, int edge_conformal, double tol, const struct grdecl *g, const int *is_aquifer_cell, struct processed_grid *out)
 
void free_processed_grid (struct processed_grid *g)
 
int add_cell_face_mapping (struct processed_grid *grid)
 

Detailed Description

Low-level corner-point processing routines and supporting data structures.

User code should typically employ higher-level routines such as create_grid_cornerpoint() in order to construct fully formed UnstructuredGrid data structures from a corner-point specification. Incidentally, the routines provided by this module are used to implement function create_grid_cornerpoint().

Enumeration Type Documentation

◆ face_tag

enum face_tag

Connection taxonomy.

Enumerator
I_FACE 

Connection topologically normal to J-K plane.

J_FACE 

Connection topologically normal to I-K plane.

K_FACE 

Connection topologically normal to I-J plane.

NNC_FACE 

Arbitrary non-neighbouring connection.

Function Documentation

◆ add_cell_face_mapping()

int add_cell_face_mapping ( struct processed_grid grid)

Populate cell-to-face mapping.

Parameters
[in,out]gridOn input, the neighbourship structure from process_grdecl(), with the 'edge_conformal' flag set to true. On output, the same structure, but with added cell-to-face mappings.
Returns
One (1) if cell-to-face mapping successfully created and zero (0) otherwise. The latter is typically due to memory allocation failure.

◆ free_processed_grid()

void free_processed_grid ( struct processed_grid g)

Release memory resources acquired in previous grid processing using function process_grdecl().

Note: This function releases the resources associated to the individual fields of the processed_grid, but does not free() the structure itself.

Parameters
[in,out]gPrototypical grid representation obtained in an earlier call to function process_grdecl().

◆ process_grdecl()

int process_grdecl ( int  pinchActive,
int  edge_conformal,
double  tol,
const struct grdecl g,
const int *  is_aquifer_cell,
struct processed_grid out 
)

Construct a prototypical grid representation from a corner-point specification.

Pinched cells will be removed irrespective of any explicit "active" map in the geological model input specification. On input, the result structure "out" must point to a valid management structure. In other words, the result structure must point to a region of memory that is typically backed by automatic or allocated (dynamic) storage duration.

Parameters
[in]pinchActiveWhether cells with zero volume should be pinched out and neighboring cells should be connected.
[in]edge_conformalWhether or not to create an edge-conformal grid. 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.
[in]tolAbsolute tolerance of node-coincidence.
[in]gCorner-point specification. If "actnum" is NULL, then the specification is interpreted as if all cells are initially active.
[in]is_aquifer_cellWhether or not an input cell represents a numerical aquifer. Pass NULL if there are no numerical aquifers in the run. Otherwise, the argument is expected to be one integer for each Cartesian input cell with a zero value for cells that are not in numerical aquifers and a non-zero value for cells that are in numerical aquifers.
[in,out]outMinimal grid representation featuring face-to-cell neighbourship definition, vertex geometry, face's constituent vertices, and local-to-global cell mapping.
Returns
One (1, true) if grid successfully generated, zero (0, false) otherwise.