-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nnc new data structure #80
Conversation
@@ -29,7 +29,7 @@ extern "C" { | |||
|
|||
typedef struct ecl_nnc_data_struct ecl_nnc_data_type; | |||
|
|||
ecl_nnc_data_type * ecl_nnc_data_alloc_tran(ecl_nnc_geometry_type * nnc_geo, ecl_file_view_type * view_file); | |||
ecl_nnc_data_type * ecl_nnc_data_alloc_tran(const ecl_grid_type * grid, ecl_nnc_geometry_type * nnc_geo, ecl_file_view_type * init_file); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ecl_nnc_geometry_type *
should be const ecl_nnc_geometry_type *
.
libecl/src/ecl_nnc_data.c
Outdated
int current_grid1 = -1; | ||
int current_grid2 = -1; | ||
ecl_kw_type * tran_kw = NULL; | ||
|
||
for (int nnc_index = 0; nnc_index < data->size; nnc_index++) { | ||
ecl_nnc_pair_type * pair = ecl_nnc_geometry_iget( nnc_geo, nnc_index ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be const
@@ -60,6 +61,20 @@ void test_alloc_file(char * filename) { | |||
index = find_index( nnc_geo, 0, 0, 48365, 118191); | |||
test_assert_double_equal(0.580284 , ecl_nnc_data_iget_value( nnc_geo_data, index) ); | |||
|
|||
index = find_index( nnc_geo, 0, 19, 42830, 211); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These numerical values are handtuned to the input file: ???
Go here: https://github.com/Statoil/libecl/blob/master/libecl/tests/ecl_nnc_export.c#L236 and add a |
Can now read all TRANX_KW.