From 50aba2c8f63f3af083e918e240315a06202f82fc Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Thu, 12 Feb 2015 21:00:32 +0100 Subject: [PATCH 1/2] Makes right hand side passed to linear solver consistent. Due to the size of the overlap layer and the discretization scheme the rhs might not contain correct values for overlap cells. This commit makes sure they are correct by an additional communication step. --- opm/core/linalg/LinearSolverIstl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opm/core/linalg/LinearSolverIstl.cpp b/opm/core/linalg/LinearSolverIstl.cpp index 1cf66f35d..2e811bd52 100644 --- a/opm/core/linalg/LinearSolverIstl.cpp +++ b/opm/core/linalg/LinearSolverIstl.cpp @@ -195,6 +195,8 @@ namespace Opm // System RHS Vector b(opA.getmat().N()); std::copy(rhs, rhs+b.size(), b.begin()); + // Make rhs consistent in the parallel case + comm.copyOwnerToOverlap(b,b); // System solution Vector x(opA.getmat().M()); x = 0.0; From a35b2f2b7c4b2ce6dba66a8a76aea0482c83ebcc Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Fri, 13 Feb 2015 11:00:28 +0100 Subject: [PATCH 2/2] [fixup] Use the correct function. This should have been in the las commit and should be added there before merging. --- opm/core/linalg/LinearSolverIstl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opm/core/linalg/LinearSolverIstl.cpp b/opm/core/linalg/LinearSolverIstl.cpp index 2e811bd52..eb3a84578 100644 --- a/opm/core/linalg/LinearSolverIstl.cpp +++ b/opm/core/linalg/LinearSolverIstl.cpp @@ -196,7 +196,7 @@ namespace Opm Vector b(opA.getmat().N()); std::copy(rhs, rhs+b.size(), b.begin()); // Make rhs consistent in the parallel case - comm.copyOwnerToOverlap(b,b); + comm.copyOwnerToAll(b,b); // System solution Vector x(opA.getmat().M()); x = 0.0;