From 78687dc5c9bfddea9c6285270260ce2e4eb20ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Fri, 16 Mar 2012 11:59:51 +0100 Subject: [PATCH] Refactor construction of driving forces in preparation of well support. --- opm/core/pressure/IncompTpfa.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opm/core/pressure/IncompTpfa.cpp b/opm/core/pressure/IncompTpfa.cpp index a66ab4cbb..0b966e57b 100644 --- a/opm/core/pressure/IncompTpfa.cpp +++ b/opm/core/pressure/IncompTpfa.cpp @@ -109,7 +109,9 @@ namespace Opm } } - const ifs_tpfa_forces F = { &src[0], bcs }; + ifs_tpfa_forces F = { 0 }; + if (! src.empty()) { F.src = &src[0]; } + F.bc = bcs; ifs_tpfa_assemble(gg, &F, &trans_[0], &gpress_omegaweighted_[0], h_);