#4453 libecl : Add patch for construction of ACTNUM from PORV

Assign a value of 3 (two bit masks combined) when creating ACTNUM based on PORV
This commit is contained in:
Magne Sjaastad 2019-05-31 14:47:57 +02:00
parent 2c30f846f0
commit a85abeb9a2

View File

@ -0,0 +1,34 @@
From 978139b8cd9361fa1a5884079e66999ee39ea1bd Mon Sep 17 00:00:00 2001
From: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
Date: Fri, 31 May 2019 14:37:50 +0200
Subject: [PATCH] helper function for libecl dual porosity
---
ThirdParty/Ert/lib/ecl/ecl_kw_functions.cpp | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/ThirdParty/Ert/lib/ecl/ecl_kw_functions.cpp b/ThirdParty/Ert/lib/ecl/ecl_kw_functions.cpp
index d10646fd3..e5d980fb1 100644
--- a/ThirdParty/Ert/lib/ecl/ecl_kw_functions.cpp
+++ b/ThirdParty/Ert/lib/ecl/ecl_kw_functions.cpp
@@ -143,9 +143,16 @@ ecl_kw_type * ecl_kw_alloc_actnum(const ecl_kw_type * porv_kw, float porv_limit)
const float * porv_values = ecl_kw_get_float_ptr(porv_kw);
int * actnum_values = ecl_kw_get_int_ptr( actnum_kw);
+ // When PORV is used as criteria, make sure all active cells are assigned both
+ // active matrix and active fracture. This will make sure that both single porosity
+ // models and dual porosity models in initialized with the correct bit mask
+ // See documentation in top of ecl_grid.cpp
+ //
+ const int combinedActnumValueForMatrixAndFracture = CELL_ACTIVE_MATRIX + CELL_ACTIVE_FRACTURE;
+
for (int i=0; i < size; i++) {
if (porv_values[i] > porv_limit)
- actnum_values[i] = 1;
+ actnum_values[i] = combinedActnumValueForMatrixAndFracture;
else
actnum_values[i] = 0;
}
--
2.21.0.windows.1