Merge pull request #4768 from OPM/bug-libecl-crash2

#4762 Fix reset_actnum libecl crash on load
This commit is contained in:
Magne Sjaastad 2019-09-27 14:40:03 +02:00 committed by GitHub
commit 0c4de184b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -290,17 +290,13 @@ const int * ecl_coarse_cell_get_box_ptr( const ecl_coarse_cell_type * coarse_cel
void ecl_coarse_cell_update_index( ecl_coarse_cell_type * coarse_cell , int global_index , int * active_index , int * active_fracture_index , int active_value) {
if (active_value & CELL_ACTIVE_MATRIX) {
if (coarse_cell->active_index == -1) {
coarse_cell->active_index = *active_index;
(*active_index) += 1;
}
coarse_cell->active_index = *active_index;
(*active_index) += 1;
}
if (active_value & CELL_ACTIVE_FRACTURE) {
if (coarse_cell->active_fracture_index == -1) {
coarse_cell->active_fracture_index = *active_fracture_index;
(*active_fracture_index) += 1;
}
coarse_cell->active_fracture_index = *active_fracture_index;
(*active_fracture_index) += 1;
}
int_vector_append( coarse_cell->active_cells , global_index );