From 3fe00d0ea58ae2ead8af9f6f3faf3a0e2a9bb732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Tue, 20 Mar 2012 21:36:31 +0100 Subject: [PATCH] Bugfixes in RockCompressibility::isActive() and constructor. --- opm/core/fluid/RockCompressibility.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/opm/core/fluid/RockCompressibility.cpp b/opm/core/fluid/RockCompressibility.cpp index be6b7357..17d86beb 100644 --- a/opm/core/fluid/RockCompressibility.cpp +++ b/opm/core/fluid/RockCompressibility.cpp @@ -41,12 +41,12 @@ namespace Opm { if (deck.hasField("ROCKTAB")) { const table_t& rt = deck.getROCKTAB().rocktab_; - int n = rt[0].size(); + int n = rt[0][0].size(); p_.resize(n); poromult_.resize(n); for (int i = 0; i < n; ++i) { - p_[i] = rt[0][i][0]; - poromult_[i] = rt[0][i][1]; + p_[i] = rt[0][0][i]; + poromult_[i] = rt[0][1][i]; } } else if (deck.hasField("ROCK")) { const ROCK& r = deck.getROCK(); @@ -59,7 +59,7 @@ namespace Opm bool RockCompressibility::isActive() const { - return p_.empty() && (rock_comp_ == 0.0); + return !p_.empty() || (rock_comp_ != 0.0); } double RockCompressibility::poroMult(double pressure) const