ecl_grid.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2011 Equinor ASA, Norway.
3
4 The file 'ecl_grid.h' is part of ERT - Ensemble based Reservoir Tool.
5
6 ERT is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 ERT is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE.
14
15 See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
16 for more details.
17*/
18
19#ifndef ERT_ECL_GRID_H
20#define ERT_ECL_GRID_H
21
22#include <stdbool.h>
23
24#include <ert/util/double_vector.hpp>
25#include <ert/util/int_vector.hpp>
27
29#include <ert/ecl/ecl_kw.hpp>
30#include <ert/ecl/grid_dims.hpp>
31#include <ert/ecl/nnc_info.hpp>
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37#define ECL_GRID_COORD_SIZE(nx,ny) (((nx) + 1) * ((ny) + 1) * 6)
38#define ECL_GRID_ZCORN_SIZE(nx,ny,nz) (((nx) * (ny) * (nz) * 8))
39
40#define ECL_GRID_GLOBAL_GRID "Global" // used as key in hash tables over grids.
41#define ECL_GRID_MAINGRID_LGR_NR 0
42
43 typedef double (block_function_ftype) ( const double_vector_type *);
44 typedef struct ecl_grid_struct ecl_grid_type;
45
46 bool ecl_grid_have_coarse_cells( const ecl_grid_type * main_grid );
47 bool ecl_grid_cell_in_coarse_group1( const ecl_grid_type * main_grid , int global_index );
48 bool ecl_grid_cell_in_coarse_group3( const ecl_grid_type * main_grid , int i , int j , int k);
50 ecl_coarse_cell_type * ecl_grid_iget_coarse_group( const ecl_grid_type * ecl_grid , int coarse_nr );
52 ecl_coarse_cell_type * ecl_grid_get_cell_coarse_group3( const ecl_grid_type * ecl_grid , int i , int j , int k);
53
54 int ecl_grid_get_cell_twist1( const ecl_grid_type * ecl_grid, int global_index );
55 int ecl_grid_get_cell_twist3( const ecl_grid_type * ecl_grid, int i , int j , int k);
56
57 void ecl_grid_get_column_property(const ecl_grid_type * ecl_grid , const ecl_kw_type * ecl_kw , int i , int j, double_vector_type * column);
58 int ecl_grid_get_global_index_from_xy_top( const ecl_grid_type * ecl_grid , double x , double y);
59 int ecl_grid_get_global_index_from_xy_bottom( const ecl_grid_type * ecl_grid , double x , double y);
60 ecl_grid_type * ecl_grid_alloc_dx_dy_dz_tops( int nx, int ny , int nz , const double * dx , const double * dy , const double * dz , const double * tops , const int * actnum);
61
62 void ecl_grid_get_cell_corner_xyz3(const ecl_grid_type * grid , int i , int j , int k, int corner_nr , double * xpos , double * ypos , double * zpos );
63 void ecl_grid_get_cell_corner_xyz1(const ecl_grid_type * grid , int global_index , int corner_nr , double * xpos , double * ypos , double * zpos );
64 void ecl_grid_get_corner_xyz(const ecl_grid_type * grid , int i , int j , int k, double * xpos , double * ypos , double * zpos );
65
66 double ecl_grid_get_cell_dx1A( const ecl_grid_type * grid , int active_index);
67 double ecl_grid_get_cell_dy1A( const ecl_grid_type * grid , int active_index);
68 double ecl_grid_get_cell_dz1A( const ecl_grid_type * grid , int active_index );
69 double ecl_grid_get_cell_thickness1A( const ecl_grid_type * grid , int active_index );
70
71 double ecl_grid_get_cell_dx1( const ecl_grid_type * grid , int global_index );
72 double ecl_grid_get_cell_dy1( const ecl_grid_type * grid , int global_index );
73 double ecl_grid_get_cell_dz1( const ecl_grid_type * grid , int global_index );
74 double ecl_grid_get_cell_thickness1( const ecl_grid_type * grid , int global_index );
75
76 double ecl_grid_get_cell_dx3( const ecl_grid_type * grid , int i , int j , int k);
77 double ecl_grid_get_cell_dy3( const ecl_grid_type * grid , int i , int j , int k);
78 double ecl_grid_get_cell_dz3( const ecl_grid_type * grid , int i , int j , int k);
79 double ecl_grid_get_cell_thickness3( const ecl_grid_type * grid , int i , int j , int k);
80
81 void ecl_grid_get_distance(const ecl_grid_type * grid , int global_index1, int global_index2 , double *dx , double *dy , double *dz);
82 double ecl_grid_get_cdepth1A(const ecl_grid_type * grid , int active_index);
83 double ecl_grid_get_cdepth1(const ecl_grid_type * grid , int global_index);
84 double ecl_grid_get_cdepth3(const ecl_grid_type * grid , int i, int j , int k);
85 int ecl_grid_get_global_index_from_xy( const ecl_grid_type * ecl_grid , int k , bool lower_layer , double x , double y);
86 bool ecl_grid_cell_contains_xyz1( const ecl_grid_type * ecl_grid , int global_index , double x , double y , double z);
87 bool ecl_grid_cell_contains_xyz3( const ecl_grid_type * ecl_grid , int i , int j , int k, double x , double y , double z );
88 double ecl_grid_get_cell_volume1( const ecl_grid_type * ecl_grid, int global_index );
89 double ecl_grid_get_cell_volume3( const ecl_grid_type * ecl_grid, int i , int j , int k);
90 double ecl_grid_get_cell_volume1A( const ecl_grid_type * ecl_grid, int active_index );
91 bool ecl_grid_cell_contains1(const ecl_grid_type * grid , int global_index , double x , double y , double z);
92 bool ecl_grid_cell_contains3(const ecl_grid_type * grid , int i , int j ,int k , double x , double y , double z);
93 int ecl_grid_get_global_index_from_xyz(ecl_grid_type * grid , double x , double y , double z , int start_index);
94 bool ecl_grid_get_ijk_from_xyz(ecl_grid_type * grid , double x , double y , double z , int start_index, int *i, int *j, int *k );
95 bool ecl_grid_get_ij_from_xy( const ecl_grid_type * grid , double x , double y , int k , int* i, int* j);
96 const char * ecl_grid_get_name( const ecl_grid_type * );
97 int ecl_grid_get_active_index3(const ecl_grid_type * ecl_grid , int i , int j , int k);
98 int ecl_grid_get_active_index1(const ecl_grid_type * ecl_grid , int global_index);
99 int ecl_grid_get_active_fracture_index3(const ecl_grid_type * ecl_grid , int i , int j , int k);
100 int ecl_grid_get_active_fracture_index1(const ecl_grid_type * ecl_grid , int global_index);
101 bool ecl_grid_cell_active3(const ecl_grid_type * , int , int , int );
103 bool ecl_grid_ijk_valid(const ecl_grid_type * , int , int , int );
104 int ecl_grid_get_global_index3(const ecl_grid_type * , int , int , int );
105 int ecl_grid_get_global_index1A(const ecl_grid_type * ecl_grid , int active_index);
106 int ecl_grid_get_global_index1F(const ecl_grid_type * ecl_grid , int active_fracture_index);
107
108 const nnc_info_type * ecl_grid_get_cell_nnc_info3( const ecl_grid_type * grid , int i , int j , int k);
109 const nnc_info_type * ecl_grid_get_cell_nnc_info1( const ecl_grid_type * grid , int global_index);
110 void ecl_grid_add_self_nnc( ecl_grid_type * grid1, int g1, int g2, int nnc_index);
111 void ecl_grid_add_self_nnc_list( ecl_grid_type * grid, const int * g1_list , const int * g2_list , int num_nnc );
112
113 ecl_grid_type * ecl_grid_alloc_GRDECL_kw( int nx, int ny , int nz , const ecl_kw_type * zcorn_kw , const ecl_kw_type * coord_kw , const ecl_kw_type * actnum_kw , const ecl_kw_type * mapaxes_kw );
114 ecl_grid_type * ecl_grid_alloc_GRDECL_data(int , int , int , const float * , const float * , const int * , bool apply_mapaxes , const float * mapaxes);
115 ecl_grid_type * ecl_grid_alloc_GRID_data(int num_coords , int nx, int ny , int nz , int coords_size , int ** coords , float ** corners , bool apply_mapaxes, const float * mapaxes);
117 ecl_grid_type * ecl_grid_alloc_ext_actnum(const char * , const int * ext_actnum);
118 ecl_grid_type * ecl_grid_load_case( const char * case_input );
119 ecl_grid_type * ecl_grid_load_case__( const char * case_input , bool apply_mapaxes);
120 ecl_grid_type * ecl_grid_alloc_rectangular( int nx , int ny , int nz , double dx , double dy , double dz , const int * actnum);
121 ecl_grid_type * ecl_grid_alloc_regular( int nx, int ny , int nz , const double * ivec, const double * jvec , const double * kvec , const int * actnum);
122 ecl_grid_type * ecl_grid_alloc_dxv_dyv_dzv( int nx, int ny , int nz , const double * dxv , const double * dyv , const double * dzv , const int * actnum);
123 ecl_grid_type * ecl_grid_alloc_dxv_dyv_dzv_depthz( int nx, int ny , int nz , const double * dxv , const double * dyv , const double * dzv , const double * depthz , const int * actnum);
124 ecl_kw_type * ecl_grid_alloc_volume_kw( const ecl_grid_type * grid , bool active_size);
127
128 bool ecl_grid_exists( const char * case_input );
129 char * ecl_grid_alloc_case_filename( const char * case_input );
130
132 void ecl_grid_free__( void * arg );
133 grid_dims_type ecl_grid_iget_dims( const ecl_grid_type * grid , int grid_nr);
134 void ecl_grid_get_dims(const ecl_grid_type * , int *, int * , int * , int *);
135 int ecl_grid_get_nz( const ecl_grid_type * grid );
136 int ecl_grid_get_nx( const ecl_grid_type * grid );
137 int ecl_grid_get_ny( const ecl_grid_type * grid );
140 int ecl_grid_get_active_index(const ecl_grid_type * , int , int , int );
142 void ecl_grid_get_ijk1(const ecl_grid_type * , int global_index , int *, int * , int *);
143 void ecl_grid_get_ijk1A(const ecl_grid_type * , int active_index, int *, int * , int *);
144 void ecl_grid_get_ijk_from_active_index(const ecl_grid_type *, int , int *, int * , int * );
145
146 void ecl_grid_get_xyz3(const ecl_grid_type * , int , int , int , double * , double * , double *);
147 void ecl_grid_get_xyz1(const ecl_grid_type * grid , int global_index , double *xpos , double *ypos , double *zpos);
148 void ecl_grid_get_xyz1A(const ecl_grid_type * grid , int active_index , double *xpos , double *ypos , double *zpos);
149
150 bool ecl_grid_get_xyz_inside1(const ecl_grid_type * grid , int global_index , double *xpos , double *ypos , double *zpos);
151 bool ecl_grid_get_xyz_inside3(const ecl_grid_type * grid , int i , int j , int k , double *xpos , double *ypos , double *zpos);
152
154 bool ecl_grid_compare(const ecl_grid_type * g1 , const ecl_grid_type * g2 , bool include_lgr, bool include_nnc , bool verbose);
156
157 double ecl_grid_get_bottom1(const ecl_grid_type * grid , int global_index);
158 double ecl_grid_get_bottom3(const ecl_grid_type * grid , int i, int j , int k);
159 double ecl_grid_get_bottom1A(const ecl_grid_type * grid , int active_index);
160 double ecl_grid_get_top1(const ecl_grid_type * grid , int global_index);
161 double ecl_grid_get_top3(const ecl_grid_type * grid , int i, int j , int k);
162 double ecl_grid_get_top1A(const ecl_grid_type * grid , int active_index);
163 double ecl_grid_get_top2(const ecl_grid_type * grid , int i, int j);
164 double ecl_grid_get_bottom2(const ecl_grid_type * grid , int i, int j);
165 int ecl_grid_locate_depth( const ecl_grid_type * grid , double depth , int i , int j );
166
169 double ecl_grid_block_eval3d(ecl_grid_type * grid , int i, int j , int k ,block_function_ftype * blockf );
170 int ecl_grid_get_block_count3d(const ecl_grid_type * ecl_grid , int i , int j, int k);
171 bool ecl_grid_block_value_3d(ecl_grid_type * , double , double ,double , double);
172
173 bool ecl_grid_cell_invalid1(const ecl_grid_type * ecl_grid , int global_index);
174 bool ecl_grid_cell_invalid3(const ecl_grid_type * ecl_grid , int i , int j , int k);
175 double ecl_grid_cell_invalid1A(const ecl_grid_type * grid , int active_index);
176
177 bool ecl_grid_cell_valid1(const ecl_grid_type * ecl_grid , int global_index);
178 bool ecl_grid_cell_valid3(const ecl_grid_type * ecl_grid , int i , int j , int k);
179 double ecl_grid_cell_valid1A(const ecl_grid_type * grid , int active_index);
180
181 void ecl_grid_dump(const ecl_grid_type * grid , FILE * stream);
182 void ecl_grid_dump_ascii(ecl_grid_type * grid , bool active_only , FILE * stream);
183 void ecl_grid_dump_ascii_cell1(ecl_grid_type * grid , int global_index , FILE * stream, const double * offset);
184 void ecl_grid_dump_ascii_cell3(ecl_grid_type * grid , int i , int j , int k , FILE * stream , const double * offset);
185
186 /* lgr related functions */
187 const ecl_grid_type * ecl_grid_get_cell_lgr3(const ecl_grid_type * grid , int i, int j , int k);
188 const ecl_grid_type * ecl_grid_get_cell_lgr1A(const ecl_grid_type * grid , int active_index);
189 const ecl_grid_type * ecl_grid_get_cell_lgr1(const ecl_grid_type * grid , int global_index );
190 int ecl_grid_get_num_lgr(const ecl_grid_type * main_grid );
191 int ecl_grid_get_lgr_nr( const ecl_grid_type * ecl_grid );
192 int ecl_grid_get_lgr_nr_from_name( const ecl_grid_type * grid , const char * name);
193 ecl_grid_type * ecl_grid_iget_lgr(const ecl_grid_type * main_grid , int lgr_index);
195 ecl_grid_type * ecl_grid_get_lgr(const ecl_grid_type * main_grid, const char * __lgr_name);
196 bool ecl_grid_has_lgr(const ecl_grid_type * main_grid, const char * __lgr_name);
197 bool ecl_grid_has_lgr_nr(const ecl_grid_type * main_grid, int lgr_nr);
198 const char * ecl_grid_iget_lgr_name( const ecl_grid_type * ecl_grid , int lgr_index);
199 const char * ecl_grid_get_lgr_name( const ecl_grid_type * ecl_grid , int lgr_nr);
201 int ecl_grid_get_parent_cell1( const ecl_grid_type * grid , int global_index);
202 int ecl_grid_get_parent_cell3( const ecl_grid_type * grid , int i , int j , int k);
204 bool ecl_grid_is_lgr( const ecl_grid_type * ecl_grid );
205
206 double ecl_grid_get_property(const ecl_grid_type * ecl_grid , const ecl_kw_type * ecl_kw , int i , int j , int k);
207 float ecl_grid_get_float_property(const ecl_grid_type * ecl_grid , const ecl_kw_type * ecl_kw , int i , int j , int k);
208 double ecl_grid_get_double_property(const ecl_grid_type * ecl_grid , const ecl_kw_type * ecl_kw , int i , int j , int k);
209 int ecl_grid_get_int_property(const ecl_grid_type * ecl_grid , const ecl_kw_type * ecl_kw , int i , int j , int k);
210
211 void ecl_grid_grdecl_fprintf_kw( const ecl_grid_type * ecl_grid , const ecl_kw_type * ecl_kw , const char * special_header , FILE * stream , double double_default);
213
214 void ecl_grid_fwrite_dims( const ecl_grid_type * grid , fortio_type * init_file, ert_ecl_unit_enum output_unit);
215 void ecl_grid_fwrite_depth( const ecl_grid_type * grid , fortio_type * init_file , ert_ecl_unit_enum ouput_unit);
216
217 void ecl_grid_fwrite_EGRID( ecl_grid_type * grid , const char * filename, bool metric_output);
218 void ecl_grid_fwrite_EGRID2( ecl_grid_type * grid , const char * filename, ert_ecl_unit_enum output_unit);
219
220 void ecl_grid_fwrite_GRID( const ecl_grid_type * grid , const char * filename);
221 void ecl_grid_fwrite_GRID2( const ecl_grid_type * grid , const char * filename, ert_ecl_unit_enum output_unit);
222
223 void ecl_grid_fprintf_grdecl( ecl_grid_type * grid , FILE * stream );
224 void ecl_grid_fprintf_grdecl2( ecl_grid_type * grid , FILE * stream , ert_ecl_unit_enum output_unit);
225
226 int ecl_grid_zcorn_index__(int nx, int ny , int i, int j , int k , int c);
227 int ecl_grid_zcorn_index(const ecl_grid_type * grid , int i, int j , int k , int c);
228 ecl_grid_type * ecl_grid_alloc_EGRID(const char * grid_file, bool apply_mapaxes );
229 ecl_grid_type * ecl_grid_alloc_GRID(const char * grid_file, bool apply_mapaxes );
230
236 ecl_kw_type * ecl_grid_alloc_gridhead_kw( int nx, int ny , int nz , int grid_nr);
238 ecl_grid_type * ecl_grid_alloc_processed_copy( const ecl_grid_type * src_grid , const double * zcorn , const int * actnum);
239
240 void ecl_grid_ri_export( const ecl_grid_type * ecl_grid , double * ri_points);
241 void ecl_grid_cell_ri_export( const ecl_grid_type * ecl_grid , int global_index , double * ri_points);
242
243 bool ecl_grid_dual_grid( const ecl_grid_type * ecl_grid );
245
246 bool ecl_grid_cell_regular3( const ecl_grid_type * ecl_grid, int i,int j,int k);
247 bool ecl_grid_cell_regular1( const ecl_grid_type * ecl_grid, int global_index);
248
249 void ecl_grid_init_zcorn_data( const ecl_grid_type * grid , float * zcorn );
250 void ecl_grid_init_zcorn_data_double( const ecl_grid_type * grid , double * zcorn );
252
253 void ecl_grid_init_coord_data( const ecl_grid_type * grid , float * coord );
254 void ecl_grid_init_coord_data_double( const ecl_grid_type * grid , double * coord );
256
257 void ecl_grid_init_actnum_data( const ecl_grid_type * grid , int * actnum );
259 void ecl_grid_init_mapaxes_data_double( const ecl_grid_type * grid , double * mapaxes);
260 void ecl_grid_reset_actnum( ecl_grid_type * grid , const int * actnum );
261 void ecl_grid_compressed_kw_copy( const ecl_grid_type * grid , ecl_kw_type * target_kw , const ecl_kw_type * src_kw);
262 void ecl_grid_global_kw_copy( const ecl_grid_type * grid , ecl_kw_type * target_kw , const ecl_kw_type * src_kw);
263 void ecl_grid_export_cell_corners1(const ecl_grid_type * grid, int global_index, double *x, double *y, double *z);
264
266 void ecl_grid_export_index(const ecl_grid_type * grid, int * global_index, int * index_data , bool active_only);
267 void ecl_grid_export_data_as_int( int index_size, const int * global_index, const ecl_kw_type * kw, int * output);
268 void ecl_grid_export_data_as_double( int index_size, const int * data_index, const ecl_kw_type * kw, double * output);
269 void ecl_grid_export_volume( const ecl_grid_type * grid, int index_size, const int * global_index, double * output );
270 void ecl_grid_export_position( const ecl_grid_type * grid, int index_size, const int * global_index, double * output);
271 void export_corners( const ecl_grid_type * grid, int index_size, const int * global_index, double * output);
272
275
276#ifdef __cplusplus
277}
278namespace ecl {
279
281 int ny,
282 int nz,
283 const double * zcorn,
284 const double * coord,
285 const int * actnum,
286 bool apply_mapaxes,
287 const float * mapaxes);
288
289}
290
291#ifdef __cplusplus
292#endif
293
294#endif
295#endif
ecl_grid_struct ecl_grid_type
Definition: ECLGraph.hpp:43
const char *const name
Definition: cJSON.h:258
struct ecl_coarse_cell_struct ecl_coarse_cell_type
Definition: ecl_coarse_cell.hpp:27
void ecl_grid_free__(void *arg)
ecl_grid_type * ecl_grid_alloc(const char *)
bool ecl_grid_cell_contains_xyz1(const ecl_grid_type *ecl_grid, int global_index, double x, double y, double z)
int * ecl_grid_alloc_actnum_data(const ecl_grid_type *grid)
void ecl_grid_cell_ri_export(const ecl_grid_type *ecl_grid, int global_index, double *ri_points)
int ecl_grid_get_parent_cell3(const ecl_grid_type *grid, int i, int j, int k)
void ecl_grid_add_self_nnc(ecl_grid_type *grid1, int g1, int g2, int nnc_index)
void export_corners(const ecl_grid_type *grid, int index_size, const int *global_index, double *output)
void ecl_grid_get_dims(const ecl_grid_type *, int *, int *, int *, int *)
int ecl_grid_get_active_index3(const ecl_grid_type *ecl_grid, int i, int j, int k)
ecl_grid_type * ecl_grid_alloc_dxv_dyv_dzv(int nx, int ny, int nz, const double *dxv, const double *dyv, const double *dzv, const int *actnum)
ecl_kw_type * ecl_grid_alloc_actnum_kw(const ecl_grid_type *grid)
bool ecl_grid_cell_in_coarse_group3(const ecl_grid_type *main_grid, int i, int j, int k)
ecl_kw_type * ecl_grid_alloc_coord_kw(const ecl_grid_type *grid)
double ecl_grid_cell_valid1A(const ecl_grid_type *grid, int active_index)
ecl_kw_type * ecl_grid_alloc_mapaxes_kw(const ecl_grid_type *grid)
ecl_grid_type * ecl_grid_load_case(const char *case_input)
bool ecl_grid_use_mapaxes(const ecl_grid_type *grid)
bool ecl_grid_get_ijk_from_xyz(ecl_grid_type *grid, double x, double y, double z, int start_index, int *i, int *j, int *k)
bool ecl_grid_cell_active3(const ecl_grid_type *, int, int, int)
void ecl_grid_reset_actnum(ecl_grid_type *grid, const int *actnum)
void ecl_grid_add_self_nnc_list(ecl_grid_type *grid, const int *g1_list, const int *g2_list, int num_nnc)
void ecl_grid_get_ijk1(const ecl_grid_type *, int global_index, int *, int *, int *)
double() block_function_ftype(const double_vector_type *)
Definition: ecl_grid.hpp:43
void ecl_grid_dump(const ecl_grid_type *grid, FILE *stream)
char * ecl_grid_alloc_case_filename(const char *case_input)
int ecl_grid_get_global_index1F(const ecl_grid_type *ecl_grid, int active_fracture_index)
int ecl_grid_get_nz(const ecl_grid_type *grid)
double ecl_grid_get_bottom2(const ecl_grid_type *grid, int i, int j)
double ecl_grid_get_cell_volume1(const ecl_grid_type *ecl_grid, int global_index)
void ecl_grid_fwrite_depth(const ecl_grid_type *grid, fortio_type *init_file, ert_ecl_unit_enum ouput_unit)
int ecl_grid_get_active_index1(const ecl_grid_type *ecl_grid, int global_index)
void ecl_grid_get_ijk_from_active_index(const ecl_grid_type *, int, int *, int *, int *)
void ecl_grid_get_xyz1(const ecl_grid_type *grid, int global_index, double *xpos, double *ypos, double *zpos)
bool ecl_grid_cell_contains3(const ecl_grid_type *grid, int i, int j, int k, double x, double y, double z)
void ecl_grid_alloc_blocking_variables(ecl_grid_type *, int)
ecl_grid_type * ecl_grid_alloc_ext_actnum(const char *, const int *ext_actnum)
bool ecl_grid_ijk_valid(const ecl_grid_type *, int, int, int)
void ecl_grid_fwrite_GRID2(const ecl_grid_type *grid, const char *filename, ert_ecl_unit_enum output_unit)
ecl_grid_type * ecl_grid_alloc_copy(const ecl_grid_type *src_grid)
bool ecl_grid_has_lgr_nr(const ecl_grid_type *main_grid, int lgr_nr)
ecl_grid_type * ecl_grid_alloc_dxv_dyv_dzv_depthz(int nx, int ny, int nz, const double *dxv, const double *dyv, const double *dzv, const double *depthz, const int *actnum)
const nnc_info_type * ecl_grid_get_cell_nnc_info3(const ecl_grid_type *grid, int i, int j, int k)
int ecl_grid_get_num_lgr(const ecl_grid_type *main_grid)
int ecl_grid_get_parent_cell1(const ecl_grid_type *grid, int global_index)
ecl_coarse_cell_type * ecl_grid_get_cell_coarse_group1(const ecl_grid_type *ecl_grid, int global_index)
void ecl_grid_fprintf_grdecl2(ecl_grid_type *grid, FILE *stream, ert_ecl_unit_enum output_unit)
int ecl_grid_zcorn_index__(int nx, int ny, int i, int j, int k, int c)
int ecl_grid_get_num_coarse_groups(const ecl_grid_type *main_grid)
void ecl_grid_dump_ascii_cell3(ecl_grid_type *grid, int i, int j, int k, FILE *stream, const double *offset)
int ecl_grid_get_global_index1A(const ecl_grid_type *ecl_grid, int active_index)
ecl_kw_type * ecl_grid_alloc_zcorn_kw(const ecl_grid_type *grid)
ecl_grid_type * ecl_grid_alloc_regular(int nx, int ny, int nz, const double *ivec, const double *jvec, const double *kvec, const int *actnum)
double ecl_grid_get_top2(const ecl_grid_type *grid, int i, int j)
void ecl_grid_free(ecl_grid_type *)
bool ecl_grid_cell_in_coarse_group1(const ecl_grid_type *main_grid, int global_index)
int ecl_grid_get_active_fracture_index1(const ecl_grid_type *ecl_grid, int global_index)
ecl_grid_type * ecl_grid_alloc_GRID(const char *grid_file, bool apply_mapaxes)
int ecl_grid_zcorn_index(const ecl_grid_type *grid, int i, int j, int k, int c)
void ecl_grid_get_cell_corner_xyz3(const ecl_grid_type *grid, int i, int j, int k, int corner_nr, double *xpos, double *ypos, double *zpos)
bool ecl_grid_compare(const ecl_grid_type *g1, const ecl_grid_type *g2, bool include_lgr, bool include_nnc, bool verbose)
int ecl_grid_get_zcorn_size(const ecl_grid_type *grid)
double ecl_grid_get_cell_dx1A(const ecl_grid_type *grid, int active_index)
double ecl_grid_block_eval3d(ecl_grid_type *grid, int i, int j, int k, block_function_ftype *blockf)
ecl_kw_type * ecl_grid_alloc_volume_kw(const ecl_grid_type *grid, bool active_size)
UTIL_SAFE_CAST_HEADER(ecl_grid)
ecl_kw_type * ecl_grid_alloc_hostnum_kw(const ecl_grid_type *grid)
ecl_grid_type * ecl_grid_alloc_EGRID(const char *grid_file, bool apply_mapaxes)
ecl_kw_type * ecl_grid_alloc_gridhead_kw(int nx, int ny, int nz, int grid_nr)
bool ecl_grid_test_lgr_consistency(const ecl_grid_type *ecl_grid)
bool ecl_grid_has_lgr(const ecl_grid_type *main_grid, const char *__lgr_name)
void ecl_grid_init_coord_data(const ecl_grid_type *grid, float *coord)
ecl_grid_type * ecl_grid_alloc_GRID_data(int num_coords, int nx, int ny, int nz, int coords_size, int **coords, float **corners, bool apply_mapaxes, const float *mapaxes)
double ecl_grid_get_cell_dx1(const ecl_grid_type *grid, int global_index)
double ecl_grid_get_cell_dx3(const ecl_grid_type *grid, int i, int j, int k)
bool ecl_grid_cell_valid3(const ecl_grid_type *ecl_grid, int i, int j, int k)
bool ecl_grid_have_coarse_cells(const ecl_grid_type *main_grid)
int ecl_grid_get_lgr_nr_from_name(const ecl_grid_type *grid, const char *name)
void ecl_grid_summarize(const ecl_grid_type *)
int ecl_grid_get_active_size(const ecl_grid_type *ecl_grid)
int ecl_grid_get_cell_twist1(const ecl_grid_type *ecl_grid, int global_index)
int ecl_grid_get_coord_size(const ecl_grid_type *ecl_grid)
int ecl_grid_get_lgr_nr(const ecl_grid_type *ecl_grid)
int ecl_grid_get_nactive(const ecl_grid_type *grid)
void ecl_grid_init_mapaxes_data_double(const ecl_grid_type *grid, double *mapaxes)
double ecl_grid_get_cdepth1(const ecl_grid_type *grid, int global_index)
void ecl_grid_ri_export(const ecl_grid_type *ecl_grid, double *ri_points)
ecl_grid_type * ecl_grid_alloc_dx_dy_dz_tops(int nx, int ny, int nz, const double *dx, const double *dy, const double *dz, const double *tops, const int *actnum)
int ecl_grid_get_global_index3(const ecl_grid_type *, int, int, int)
void ecl_grid_get_distance(const ecl_grid_type *grid, int global_index1, int global_index2, double *dx, double *dy, double *dz)
void ecl_grid_init_actnum_data(const ecl_grid_type *grid, int *actnum)
bool ecl_grid_cell_invalid1(const ecl_grid_type *ecl_grid, int global_index)
double ecl_grid_get_top1(const ecl_grid_type *grid, int global_index)
const char * ecl_grid_get_name(const ecl_grid_type *)
bool ecl_grid_cell_valid1(const ecl_grid_type *ecl_grid, int global_index)
double ecl_grid_cell_invalid1A(const ecl_grid_type *grid, int active_index)
double ecl_grid_get_bottom3(const ecl_grid_type *grid, int i, int j, int k)
double ecl_grid_get_double_property(const ecl_grid_type *ecl_grid, const ecl_kw_type *ecl_kw, int i, int j, int k)
double ecl_grid_get_cell_dz3(const ecl_grid_type *grid, int i, int j, int k)
double ecl_grid_get_cell_dz1(const ecl_grid_type *grid, int global_index)
bool ecl_grid_get_xyz_inside3(const ecl_grid_type *grid, int i, int j, int k, double *xpos, double *ypos, double *zpos)
double ecl_grid_get_cell_dy3(const ecl_grid_type *grid, int i, int j, int k)
void ecl_grid_grdecl_fprintf_kw(const ecl_grid_type *ecl_grid, const ecl_kw_type *ecl_kw, const char *special_header, FILE *stream, double double_default)
bool ecl_grid_cell_regular3(const ecl_grid_type *ecl_grid, int i, int j, int k)
double ecl_grid_get_property(const ecl_grid_type *ecl_grid, const ecl_kw_type *ecl_kw, int i, int j, int k)
void ecl_grid_get_xyz1A(const ecl_grid_type *grid, int active_index, double *xpos, double *ypos, double *zpos)
float ecl_grid_get_float_property(const ecl_grid_type *ecl_grid, const ecl_kw_type *ecl_kw, int i, int j, int k)
UTIL_IS_INSTANCE_HEADER(ecl_grid)
double ecl_grid_get_bottom1A(const ecl_grid_type *grid, int active_index)
const ecl_grid_type * ecl_grid_get_cell_lgr1(const ecl_grid_type *grid, int global_index)
double ecl_grid_get_cell_dy1(const ecl_grid_type *grid, int global_index)
ecl_grid_type * ecl_grid_alloc_GRDECL_data(int, int, int, const float *, const float *, const int *, bool apply_mapaxes, const float *mapaxes)
ecl_grid_type * ecl_grid_alloc_processed_copy(const ecl_grid_type *src_grid, const double *zcorn, const int *actnum)
ecl_grid_type * ecl_grid_get_lgr_from_lgr_nr(const ecl_grid_type *main_grid, int lgr_nr)
double ecl_grid_get_cell_thickness1A(const ecl_grid_type *grid, int active_index)
double ecl_grid_get_cdepth3(const ecl_grid_type *grid, int i, int j, int k)
int ecl_grid_get_nactive_fracture(const ecl_grid_type *grid)
bool ecl_grid_get_ij_from_xy(const ecl_grid_type *grid, double x, double y, int k, int *i, int *j)
int ecl_grid_get_int_property(const ecl_grid_type *ecl_grid, const ecl_kw_type *ecl_kw, int i, int j, int k)
const nnc_info_type * ecl_grid_get_cell_nnc_info1(const ecl_grid_type *grid, int global_index)
bool ecl_grid_cell_invalid3(const ecl_grid_type *ecl_grid, int i, int j, int k)
int ecl_grid_get_active_index(const ecl_grid_type *, int, int, int)
const char * ecl_grid_get_lgr_name(const ecl_grid_type *ecl_grid, int lgr_nr)
int ecl_grid_get_ny(const ecl_grid_type *grid)
int ecl_grid_get_cell_twist3(const ecl_grid_type *ecl_grid, int i, int j, int k)
void ecl_grid_fwrite_EGRID(ecl_grid_type *grid, const char *filename, bool metric_output)
void ecl_grid_export_cell_corners1(const ecl_grid_type *grid, int global_index, double *x, double *y, double *z)
int ecl_grid_get_block_count3d(const ecl_grid_type *ecl_grid, int i, int j, int k)
void ecl_grid_get_cell_corner_xyz1(const ecl_grid_type *grid, int global_index, int corner_nr, double *xpos, double *ypos, double *zpos)
ecl_coarse_cell_type * ecl_grid_iget_coarse_group(const ecl_grid_type *ecl_grid, int coarse_nr)
void ecl_grid_export_data_as_int(int index_size, const int *global_index, const ecl_kw_type *kw, int *output)
bool ecl_grid_exists(const char *case_input)
double ecl_grid_get_top1A(const ecl_grid_type *grid, int active_index)
int ecl_grid_get_global_index_from_xy_top(const ecl_grid_type *ecl_grid, double x, double y)
void ecl_grid_get_ijk1A(const ecl_grid_type *, int active_index, int *, int *, int *)
double ecl_grid_get_cell_dy1A(const ecl_grid_type *grid, int active_index)
double ecl_grid_get_cell_dz1A(const ecl_grid_type *grid, int active_index)
double ecl_grid_get_cell_volume3(const ecl_grid_type *ecl_grid, int i, int j, int k)
ecl_grid_type * ecl_grid_get_lgr(const ecl_grid_type *main_grid, const char *__lgr_name)
void ecl_grid_fwrite_dims(const ecl_grid_type *grid, fortio_type *init_file, ert_ecl_unit_enum output_unit)
double ecl_grid_get_cdepth1A(const ecl_grid_type *grid, int active_index)
ecl_coarse_cell_type * ecl_grid_get_cell_coarse_group3(const ecl_grid_type *ecl_grid, int i, int j, int k)
bool ecl_grid_block_value_3d(ecl_grid_type *, double, double, double, double)
void ecl_grid_compressed_kw_copy(const ecl_grid_type *grid, ecl_kw_type *target_kw, const ecl_kw_type *src_kw)
grid_dims_type ecl_grid_iget_dims(const ecl_grid_type *grid, int grid_nr)
double ecl_grid_get_cell_thickness1(const ecl_grid_type *grid, int global_index)
void ecl_grid_global_kw_copy(const ecl_grid_type *grid, ecl_kw_type *target_kw, const ecl_kw_type *src_kw)
ecl_grid_type * ecl_grid_iget_lgr(const ecl_grid_type *main_grid, int lgr_index)
void ecl_grid_fwrite_GRID(const ecl_grid_type *grid, const char *filename)
double ecl_grid_get_cell_volume1A(const ecl_grid_type *ecl_grid, int active_index)
double ecl_grid_get_bottom1(const ecl_grid_type *grid, int global_index)
double ecl_grid_get_top3(const ecl_grid_type *grid, int i, int j, int k)
int ecl_grid_get_global_index_from_xy_bottom(const ecl_grid_type *ecl_grid, double x, double y)
bool ecl_grid_cell_active1(const ecl_grid_type *, int)
bool ecl_grid_is_lgr(const ecl_grid_type *ecl_grid)
void ecl_grid_dump_ascii_cell1(ecl_grid_type *grid, int global_index, FILE *stream, const double *offset)
const ecl_grid_type * ecl_grid_get_cell_lgr3(const ecl_grid_type *grid, int i, int j, int k)
void ecl_grid_get_corner_xyz(const ecl_grid_type *grid, int i, int j, int k, double *xpos, double *ypos, double *zpos)
void ecl_grid_init_coord_data_double(const ecl_grid_type *grid, double *coord)
ecl_grid_type * ecl_grid_load_case__(const char *case_input, bool apply_mapaxes)
bool ecl_grid_cell_contains1(const ecl_grid_type *grid, int global_index, double x, double y, double z)
bool ecl_grid_cell_contains_xyz3(const ecl_grid_type *ecl_grid, int i, int j, int k, double x, double y, double z)
void ecl_grid_get_column_property(const ecl_grid_type *ecl_grid, const ecl_kw_type *ecl_kw, int i, int j, double_vector_type *column)
bool ecl_grid_cell_regular1(const ecl_grid_type *ecl_grid, int global_index)
void ecl_grid_fwrite_EGRID2(ecl_grid_type *grid, const char *filename, ert_ecl_unit_enum output_unit)
bool ecl_grid_get_xyz_inside1(const ecl_grid_type *grid, int global_index, double *xpos, double *ypos, double *zpos)
void ecl_grid_dump_ascii(ecl_grid_type *grid, bool active_only, FILE *stream)
void ecl_grid_init_zcorn_data_double(const ecl_grid_type *grid, double *zcorn)
const ecl_grid_type * ecl_grid_get_global_grid(const ecl_grid_type *grid)
void ecl_grid_export_index(const ecl_grid_type *grid, int *global_index, int *index_data, bool active_only)
const char * ecl_grid_iget_lgr_name(const ecl_grid_type *ecl_grid, int lgr_index)
ecl_grid_type * ecl_grid_alloc_rectangular(int nx, int ny, int nz, double dx, double dy, double dz, const int *actnum)
double ecl_grid_get_cell_thickness3(const ecl_grid_type *grid, int i, int j, int k)
int ecl_grid_get_nx(const ecl_grid_type *grid)
void ecl_grid_init_zcorn_data(const ecl_grid_type *grid, float *zcorn)
int ecl_grid_get_global_index_from_xy(const ecl_grid_type *ecl_grid, int k, bool lower_layer, double x, double y)
ert_ecl_unit_enum ecl_grid_get_unit_system(const ecl_grid_type *grid)
void ecl_grid_export_position(const ecl_grid_type *grid, int index_size, const int *global_index, double *output)
ecl_grid_type * ecl_grid_alloc_GRDECL_kw(int nx, int ny, int nz, const ecl_kw_type *zcorn_kw, const ecl_kw_type *coord_kw, const ecl_kw_type *actnum_kw, const ecl_kw_type *mapaxes_kw)
void ecl_grid_get_xyz3(const ecl_grid_type *, int, int, int, double *, double *, double *)
void ecl_grid_fprintf_grdecl(ecl_grid_type *grid, FILE *stream)
int ecl_grid_get_active_fracture_index3(const ecl_grid_type *ecl_grid, int i, int j, int k)
bool ecl_grid_dual_grid(const ecl_grid_type *ecl_grid)
void ecl_grid_export_volume(const ecl_grid_type *grid, int index_size, const int *global_index, double *output)
int ecl_grid_get_global_size(const ecl_grid_type *ecl_grid)
void ecl_grid_init_blocking(ecl_grid_type *)
stringlist_type * ecl_grid_alloc_lgr_name_list(const ecl_grid_type *ecl_grid)
int ecl_grid_locate_depth(const ecl_grid_type *grid, double depth, int i, int j)
const ecl_grid_type * ecl_grid_get_cell_lgr1A(const ecl_grid_type *grid, int active_index)
void ecl_grid_export_data_as_double(int index_size, const int *data_index, const ecl_kw_type *kw, double *output)
int ecl_grid_get_num_nnc(const ecl_grid_type *grid)
int ecl_grid_get_global_index_from_xyz(ecl_grid_type *grid, double x, double y, double z, int start_index)
float * ecl_grid_alloc_zcorn_data(const ecl_grid_type *grid)
struct ecl_kw_struct ecl_kw_type
Definition: ecl_kw.hpp:39
ert_ecl_unit_enum
Definition: ecl_util.hpp:99
struct fortio_struct fortio_type
Definition: include/ert/ecl/fortio.h:42
Definition: ecl_box.hpp:26
x y * z
Definition: exprtk.hpp:9663
x y t t *t x y t t t x y t t t x *y t *t t x *y t *t t x y t t t x y t t t x(y+z)
struct nnc_info_struct nnc_info_type
Definition: nnc_info.hpp:28
struct stringlist_struct stringlist_type
Definition: stringlist.hpp:34
Definition: grid_dims.hpp:25