From ca0e2600dbcd2b0ddca36a7ad24edb38597b37f1 Mon Sep 17 00:00:00 2001 From: "Jostein R. Natvig" Date: Mon, 16 Jan 2012 12:41:34 +0000 Subject: [PATCH] Do not check ZCORN monotonicity in inactive cells. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bård Skaflestad --- preprocess.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/preprocess.c b/preprocess.c index dbbddd65..3b08e731 100644 --- a/preprocess.c +++ b/preprocess.c @@ -445,7 +445,10 @@ void process_grdecl(const struct grdecl *in, double z1 = sign*in->zcorn[i+2*nx*(j+2*ny*(k))]; double z2 = sign*in->zcorn[i+2*nx*(j+2*ny*(k+1))]; - if (z2 < z1){ + int c1 = i/2 + nx*(j/2 + ny*k/2); + int c2 = i/2 + nx*(j/2 + ny*(k+1)/2); + + if (in->actnum[c1] && in->actnum[c2] && (z2 < z1)){ fprintf(stderr, "\nZCORN should be strictly nondecreasing along pillars!\n"); error = 1; goto end;