From 99fca58dcaee3edfb698285ef6bf32dfbe35bd90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Fri, 1 Sep 2023 08:48:11 +0200 Subject: [PATCH] Improvements from review. --- CMakeLists_files.cmake | 1 + opm/simulators/flow/BlackoilModelEbosNldd.hpp | 2 +- opm/simulators/linalg/ISTLSolverEbos.hpp | 6 ++---- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CMakeLists_files.cmake b/CMakeLists_files.cmake index f0c5512a9d..4e6aa2418e 100644 --- a/CMakeLists_files.cmake +++ b/CMakeLists_files.cmake @@ -417,6 +417,7 @@ list (APPEND PUBLIC_HEADER_FILES ebos/hdf5serializer.hh ebos/vtkecltracermodule.hh opm/simulators/flow/countGlobalCells.hpp + opm/simulators/flow/priVarsPacking.hpp opm/simulators/flow/BlackoilModelEbos.hpp opm/simulators/flow/BlackoilModelEbosNldd.hpp opm/simulators/flow/BlackoilModelParametersEbos.hpp diff --git a/opm/simulators/flow/BlackoilModelEbosNldd.hpp b/opm/simulators/flow/BlackoilModelEbosNldd.hpp index d560ed4ed0..7032c8a5a0 100644 --- a/opm/simulators/flow/BlackoilModelEbosNldd.hpp +++ b/opm/simulators/flow/BlackoilModelEbosNldd.hpp @@ -266,7 +266,7 @@ public: // we move on. const auto& comm = model_.ebosSimulator().vanguard().grid().comm(); if (comm.size() > 1) { - const auto& ccomm = model_.ebosSimulator().model().newtonMethod().linearSolver().comm(); + const auto* ccomm = model_.ebosSimulator().model().newtonMethod().linearSolver().comm(); // Copy numerical values from primary vars. ccomm->copyOwnerToAll(solution, solution); diff --git a/opm/simulators/linalg/ISTLSolverEbos.hpp b/opm/simulators/linalg/ISTLSolverEbos.hpp index b4dffeacd5..be1b6c8386 100644 --- a/opm/simulators/linalg/ISTLSolverEbos.hpp +++ b/opm/simulators/linalg/ISTLSolverEbos.hpp @@ -263,11 +263,9 @@ std::unique_ptr blockJacobiAdjacency(const Grid& grid, OPM_TIMEBLOCK(istlSolverEbosPrepare); const bool firstcall = (matrix_ == nullptr); #if HAVE_MPI - if (firstcall) { + if (firstcall && isParallel()) { const std::size_t size = M.N(); - if (isParallel()) { - detail::copyParValues(parallelInformation_, size, *comm_); - } + detail::copyParValues(parallelInformation_, size, *comm_); } #endif