Skip to content
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

Merged
merged 7 commits into from
May 24, 2017
Merged

Conversation

stefoss23
Copy link

Can now read all TRANX_KW.

@@ -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);
Copy link
Contributor

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 *.

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 );
Copy link
Contributor

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);
Copy link
Contributor

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: ???

@joakim-hove
Copy link
Contributor

Go here: https://github.com/Statoil/libecl/blob/master/libecl/tests/ecl_nnc_export.c#L236 and add a ecl_nnc_data_type * instance and compare/test that as well.

@joakim-hove joakim-hove reopened this May 24, 2017
@joakim-hove joakim-hove merged commit a39b397 into equinor:master May 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants