Loading...
Searching...
No Matches
preprocess.h
Go to the documentation of this file.
/*===========================================================================
//
// File: preprocess.h
//
// Created: Fri Jun 19 08:43:04 2009
//
// Author: Jostein R. Natvig <Jostein.R.Natvig@sintef.no>
//
// $Date$
//
// $Revision$
//
//==========================================================================*/
/*
Copyright 2009, 2010 SINTEF ICT, Applied Mathematics.
Copyright 2009, 2010 Statoil ASA.
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPM_PREPROCESS_HEADER
#define OPM_PREPROCESS_HEADER
#ifdef __cplusplus
extern "C" {
#endif
struct grdecl {
int dims[3];
const double *coord;
const double *zcorn;
const int *actnum;
};
enum face_tag {
I_FACE,
J_FACE,
K_FACE,
NNC_FACE
};
struct processed_grid {
int m;
int n;
int dimensions[3];
unsigned number_of_faces;
int *face_nodes;
unsigned int *face_node_ptr;
int *face_neighbors;
enum face_tag *face_tag;
/* Cell-to-face mapping, the transpose of the face-to-cell mapping
* (i.e., face_neighbors), needed for edge conformal processing */
unsigned int *cell_face_ptr;
int *cell_faces;
int number_of_nodes;
int number_of_nodes_on_pillars;
double *node_coordinates;
int number_of_cells;
int *local_cell_index;
};
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);
#ifdef __cplusplus
}
#endif
#endif /* OPM_PREPROCESS_HEADER */
/* Local Variables: */
/* c-basic-offset:4 */
/* End: */
face_tag
face_tag
Connection taxonomy.
Definition preprocess.h:66
K_FACE
@ K_FACE
Connection topologically normal to I-J plane.
Definition preprocess.h:69
J_FACE
@ J_FACE
Connection topologically normal to I-K plane.
Definition preprocess.h:68
NNC_FACE
@ NNC_FACE
Arbitrary non-neighbouring connection.
Definition preprocess.h:70
I_FACE
@ I_FACE
Connection topologically normal to J-K plane.
Definition preprocess.h:67
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.
Definition preprocess.c:1105
add_cell_face_mapping
int add_cell_face_mapping(struct processed_grid *grid)
Populate cell-to-face mapping.
Definition preprocess.c:1349
free_processed_grid
void free_processed_grid(struct processed_grid *g)
Release memory resources acquired in previous grid processing using function process_grdecl().
Definition preprocess.c:1333
grdecl
Raw corner-point specification of a particular geological model.
Definition preprocess.h:56
grdecl::coord
const double * coord
Pillar end-points.
Definition preprocess.h:58
grdecl::dims
int dims[3]
Cartesian box dimensions.
Definition preprocess.h:57
grdecl::zcorn
const double * zcorn
Corner-point depths.
Definition preprocess.h:59
grdecl::actnum
const int * actnum
Explicit "active" map.
Definition preprocess.h:60
processed_grid
Result structure representing minimal derived topology and geometry of a geological model in corner-p...
Definition preprocess.h:77
processed_grid::cell_faces
int * cell_faces
Face numbers of each cell, stored sequentially.
Definition preprocess.h:103
processed_grid::face_neighbors
int * face_neighbors
Global cell numbers.
Definition preprocess.h:92
processed_grid::face_tag
enum face_tag * face_tag
Classification of grid's individual connections (faces).
Definition preprocess.h:95
processed_grid::node_coordinates
double * node_coordinates
Vertex coordinates.
Definition preprocess.h:111
processed_grid::local_cell_index
int * local_cell_index
Deceptively named local-to-global cell index mapping.
Definition preprocess.h:116
processed_grid::number_of_faces
unsigned number_of_faces
Total number of unique grid faces (i.e., connections).
Definition preprocess.h:85
processed_grid::cell_face_ptr
unsigned int * cell_face_ptr
Start position for each cell's 'cell_faces'.
Definition preprocess.h:100
processed_grid::number_of_nodes_on_pillars
int number_of_nodes_on_pillars
Total number of unique cell vertices that lie on pillars.
Definition preprocess.h:107
processed_grid::face_nodes
int * face_nodes
Node (vertex) numbers of each face, stored sequentially.
Definition preprocess.h:87
processed_grid::number_of_cells
int number_of_cells
Number of active grid cells.
Definition preprocess.h:115
processed_grid::dimensions
int dimensions[3]
Cartesian box dimensions.
Definition preprocess.h:83
processed_grid::n
int n
Upper bound on "number_of_nodes".
Definition preprocess.h:80
processed_grid::face_node_ptr
unsigned int * face_node_ptr
Start position for each face's 'face_nodes'.
Definition preprocess.h:89
processed_grid::number_of_nodes
int number_of_nodes
Number of unique grid vertices.
Definition preprocess.h:106
processed_grid::m
int m
Upper bound on "number_of_faces".
Definition preprocess.h:78