From 07c4938e00d8a4ae8be3cf5f470ff67252724252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Tue, 20 Mar 2012 12:05:59 +0100 Subject: [PATCH] Compensate for matrix adjustment in rock comp case. --- opm/core/pressure/IncompTpfa.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/opm/core/pressure/IncompTpfa.cpp b/opm/core/pressure/IncompTpfa.cpp index d202eea04..3c03b870c 100644 --- a/opm/core/pressure/IncompTpfa.cpp +++ b/opm/core/pressure/IncompTpfa.cpp @@ -178,7 +178,13 @@ namespace Opm ifs_tpfa_assemble(gg, &F, &trans_[0], &gpress_omegaweighted_[0], h_); + // TODO: this is a hack, it would be better to handle this in a + // (variant of) ifs_tpfa_assemble(). if (!rock_comp.empty()) { + // We must compensate for adjustment made in ifs_tpfa_assemble() + // to make the system nonsingular. + h_->A->sa[0] *= 0.5; + // The extra term of the equation is // // porevol*rock_comp*(p - p0)/dt.