opm-grid
Loading...
Searching...
No Matches
preprocess.h
Go to the documentation of this file.
1/*===========================================================================
2//
3// File: preprocess.h
4//
5// Created: Fri Jun 19 08:43:04 2009
6//
7// Author: Jostein R. Natvig <Jostein.R.Natvig@sintef.no>
8//
9// $Date$
10//
11// $Revision$
12//
13//==========================================================================*/
14
15/*
16 Copyright 2009, 2010 SINTEF ICT, Applied Mathematics.
17 Copyright 2009, 2010 Statoil ASA.
18
19 This file is part of the Open Porous Media project (OPM).
20
21 OPM is free software: you can redistribute it and/or modify
22 it under the terms of the GNU General Public License as published by
23 the Free Software Foundation, either version 3 of the License, or
24 (at your option) any later version.
25
26 OPM is distributed in the hope that it will be useful,
27 but WITHOUT ANY WARRANTY; without even the implied warranty of
28 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 GNU General Public License for more details.
30
31 You should have received a copy of the GNU General Public License
32 along with OPM. If not, see <http://www.gnu.org/licenses/>.
33*/
34
35#ifndef OPM_PREPROCESS_HEADER
36#define OPM_PREPROCESS_HEADER
37
48
49#ifdef __cplusplus
50extern "C" {
51#endif
52
56 struct grdecl {
57 int dims[3];
58 const double *coord;
59 const double *zcorn;
60 const int *actnum;
61 };
62
72
78 int m;
80 int n;
82
83 int dimensions[3];
84
85 unsigned number_of_faces;
89 unsigned int *face_node_ptr;
91
94
97
98 /* Cell-to-face mapping, the transpose of the face-to-cell mapping
99 * (i.e., face_neighbors), needed for edge conformal processing */
100 unsigned int *cell_face_ptr;
102
105
110
114
118 };
119
163 int process_grdecl(int pinchActive,
164 int edge_conformal,
165 double tol,
166 const struct grdecl *g,
167 const int *is_aquifer_cell,
168 struct processed_grid *out);
169
180 void free_processed_grid(struct processed_grid *g);
181
193 int add_cell_face_mapping(struct processed_grid *grid);
194
195#ifdef __cplusplus
196}
197#endif
198
199#endif /* OPM_PREPROCESS_HEADER */
200
201/* Local Variables: */
202/* c-basic-offset:4 */
203/* End: */
face_tag
Connection taxonomy.
Definition preprocess.h:66
@ K_FACE
Connection topologically normal to I-J plane.
Definition preprocess.h:69
@ J_FACE
Connection topologically normal to I-K plane.
Definition preprocess.h:68
@ NNC_FACE
Arbitrary non-neighbouring connection.
Definition preprocess.h:70
@ I_FACE
Connection topologically normal to J-K plane.
Definition preprocess.h:67
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.
Definition preprocess.c:1105
int add_cell_face_mapping(struct processed_grid *grid)
Populate cell-to-face mapping.
Definition preprocess.c:1349
void free_processed_grid(struct processed_grid *g)
Release memory resources acquired in previous grid processing using function process_grdecl().
Definition preprocess.c:1333
Raw corner-point specification of a particular geological model.
Definition preprocess.h:56
const double * coord
Pillar end-points.
Definition preprocess.h:58
int dims[3]
Cartesian box dimensions.
Definition preprocess.h:57
const double * zcorn
Corner-point depths.
Definition preprocess.h:59
const int * actnum
Explicit "active" map.
Definition preprocess.h:60
Result structure representing minimal derived topology and geometry of a geological model in corner-p...
Definition preprocess.h:77
int * cell_faces
Face numbers of each cell, stored sequentially.
Definition preprocess.h:103
int * face_neighbors
Global cell numbers.
Definition preprocess.h:92
enum face_tag * face_tag
Classification of grid's individual connections (faces).
Definition preprocess.h:95
double * node_coordinates
Vertex coordinates.
Definition preprocess.h:111
int * local_cell_index
Deceptively named local-to-global cell index mapping.
Definition preprocess.h:116
unsigned number_of_faces
Total number of unique grid faces (i.e., connections).
Definition preprocess.h:85
unsigned int * cell_face_ptr
Start position for each cell's 'cell_faces'.
Definition preprocess.h:100
int number_of_nodes_on_pillars
Total number of unique cell vertices that lie on pillars.
Definition preprocess.h:107
int * face_nodes
Node (vertex) numbers of each face, stored sequentially.
Definition preprocess.h:87
int number_of_cells
Number of active grid cells.
Definition preprocess.h:115
int dimensions[3]
Cartesian box dimensions.
Definition preprocess.h:83
int n
Upper bound on "number_of_nodes".
Definition preprocess.h:80
unsigned int * face_node_ptr
Start position for each face's 'face_nodes'.
Definition preprocess.h:89
int number_of_nodes
Number of unique grid vertices.
Definition preprocess.h:106
int m
Upper bound on "number_of_faces".
Definition preprocess.h:78