From e6c8f6985cd3c7e8d711b3a1ad6ef0598cf7291d Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Mon, 26 Jul 2021 17:04:35 +0200 Subject: [PATCH 1/3] Remove some shawowed variable warnings. --- ebos/eclgenericoutputblackoilmodule.cc | 6 +++--- ebos/eclmpiserializer.hh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ebos/eclgenericoutputblackoilmodule.cc b/ebos/eclgenericoutputblackoilmodule.cc index 923aff361..60a167239 100644 --- a/ebos/eclgenericoutputblackoilmodule.cc +++ b/ebos/eclgenericoutputblackoilmodule.cc @@ -1631,10 +1631,10 @@ updateSummaryRegionValues(const Inplace& inplace, // support the RPR__xxx summary keywords. { auto get_vector = [&inplace] - (const auto& node, - const Inplace::Phase phase) + (const auto& node_, + const Inplace::Phase phase_) { - return inplace.get_vector(node.fip_region(), phase); + return inplace.get_vector(node_.fip_region(), phase_); }; for (const auto& phase : Inplace::phases()) { diff --git a/ebos/eclmpiserializer.hh b/ebos/eclmpiserializer.hh index 196222a5f..abaa9e005 100644 --- a/ebos/eclmpiserializer.hh +++ b/ebos/eclmpiserializer.hh @@ -168,7 +168,7 @@ public: m_packSize += Mpi::packSize(d, m_comm); }; - auto pack = [&](auto& d) { + auto packer = [&](auto& d) { Mpi::pack(d, m_buffer, m_position, m_comm); }; @@ -177,7 +177,7 @@ public: std::visit( [&] (auto& arg) { pack_size(arg); }, data); } else if (m_op == Operation::PACK) { Mpi::pack(data.index(), m_buffer, m_position, m_comm); - std::visit([&](auto& arg) { pack(arg); }, data); + std::visit([&](auto& arg) { packer(arg); }, data); } else if (m_op == Operation::UNPACK) { size_t index; std::variant& mutable_data = const_cast&>(data); From c84b55c452232bc57ed42aeeca141329e5747d78 Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Mon, 13 Sep 2021 12:25:49 +0200 Subject: [PATCH 2/3] Fixes ILU for Dune 2.8 We got compile errors like: /home/build/opm-simulators/opm/simulators/linalg/FlexibleSolver1.cpp:24:1: required from here /usr/include/dune/istl/ilu.hh:140:29: error: 'double' is not a class, struct, or union type without this patch. Hence we use the new internal ILU functions if available. --- opm/simulators/linalg/FlexibleSolver_impl.hpp | 3 ++- opm/simulators/linalg/ParallelOverlappingILU0.hpp | 9 +++++++++ tests/test_milu.cpp | 4 ++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/opm/simulators/linalg/FlexibleSolver_impl.hpp b/opm/simulators/linalg/FlexibleSolver_impl.hpp index e1674f834..f8f5bd8fa 100644 --- a/opm/simulators/linalg/FlexibleSolver_impl.hpp +++ b/opm/simulators/linalg/FlexibleSolver_impl.hpp @@ -21,9 +21,10 @@ #ifndef OPM_FLEXIBLE_SOLVER_IMPL_HEADER_INCLUDED #define OPM_FLEXIBLE_SOLVER_IMPL_HEADER_INCLUDED +#include +#include #include #include -#include #include #include diff --git a/opm/simulators/linalg/ParallelOverlappingILU0.hpp b/opm/simulators/linalg/ParallelOverlappingILU0.hpp index 9cca2e75c..99a320369 100644 --- a/opm/simulators/linalg/ParallelOverlappingILU0.hpp +++ b/opm/simulators/linalg/ParallelOverlappingILU0.hpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -430,7 +431,11 @@ namespace Opm detail::IsPositiveFunctor() ); break; default: +#if DUNE_VERSION_LT(DUNE_GRID, 2, 8) bilu0_decomposition( ILU ); +#else + Dune::ILU::blockILU0Decomposition( ILU ); +#endif break; } } @@ -1022,7 +1027,11 @@ public: break; default: if (interiorSize_ == A_->N()) +#if DUNE_VERSION_LT(DUNE_GRID, 2, 8) bilu0_decomposition( *ILU ); +#else + Dune::ILU::blockILU0Decomposition( *ILU ); +#endif else detail::ghost_last_bilu0_decomposition(*ILU, interiorSize_); break; diff --git a/tests/test_milu.cpp b/tests/test_milu.cpp index d6ff84a93..7e1cc413e 100644 --- a/tests/test_milu.cpp +++ b/tests/test_milu.cpp @@ -85,7 +85,11 @@ void test_milu0(M& A) // Test that (LU)^-1Ae=e A.mv(e, x1); +#if DUNE_VERSION_GTE(DUNE_ISTL, 2, 8) + Dune::ILU::blockILUBacksolve(ILU, x2, x1); +#else bilu_backsolve(ILU, x2, x1); +#endif diff = x2; diff -= e; From 8abf2159c4638d267abae1ebf0555cad85108e5e Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Mon, 13 Sep 2021 12:27:56 +0200 Subject: [PATCH 3/3] Support Dune 2.8 version of MultipleCodimMultipleGeomTypeMapper Drop removed second template parameter from MultipleCodimMultipleGeomTypeMapper (there is a defaultsince 2,6 nd now it is gone alltogether) --- ebos/eclgenericcpgridvanguard.cc | 2 +- ebos/eclgenericthresholdpressure.cc | 4 ++-- ebos/eclgenerictracermodel.cc | 4 ++-- ebos/eclgenericwriter.cc | 4 ++-- ebos/ecltransmissibility.cc | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ebos/eclgenericcpgridvanguard.cc b/ebos/eclgenericcpgridvanguard.cc index 69a460625..61c3db5ba 100644 --- a/ebos/eclgenericcpgridvanguard.cc +++ b/ebos/eclgenericcpgridvanguard.cc @@ -380,7 +380,7 @@ template class EclGenericCpGridVanguard>>, double>; #else -template class EclGenericCpGridVanguard>,Dune::Impl::MCMGFailLayout>, +template class EclGenericCpGridVanguard>>, Dune::GridView>, double>; #endif diff --git a/ebos/eclgenericthresholdpressure.cc b/ebos/eclgenericthresholdpressure.cc index c43015db7..31decba12 100644 --- a/ebos/eclgenericthresholdpressure.cc +++ b/ebos/eclgenericthresholdpressure.cc @@ -253,13 +253,13 @@ template class EclGenericThresholdPressure>, - Dune::MultipleCodimMultipleGeomTypeMapper>,Dune::Impl::MCMGFailLayout>, + Dune::MultipleCodimMultipleGeomTypeMapper>>, double>; #endif template class EclGenericThresholdPressure, Dune::GridView>, - Dune::MultipleCodimMultipleGeomTypeMapper>, Dune::Impl::MCMGFailLayout>, + Dune::MultipleCodimMultipleGeomTypeMapper>>, double>; } // namespace Opm diff --git a/ebos/eclgenerictracermodel.cc b/ebos/eclgenerictracermodel.cc index 48c55ae22..a57500da5 100644 --- a/ebos/eclgenerictracermodel.cc +++ b/ebos/eclgenerictracermodel.cc @@ -289,14 +289,14 @@ template class EclGenericTracerModel>, - Dune::MultipleCodimMultipleGeomTypeMapper>,Dune::Impl::MCMGFailLayout>, + Dune::MultipleCodimMultipleGeomTypeMapper>>, Opm::EcfvStencil>,false,false>, double>; #endif template class EclGenericTracerModel, Dune::GridView>, - Dune::MultipleCodimMultipleGeomTypeMapper>,Dune::Impl::MCMGFailLayout>, + Dune::MultipleCodimMultipleGeomTypeMapper>>, Opm::EcfvStencil>,false,false>, double>; diff --git a/ebos/eclgenericwriter.cc b/ebos/eclgenericwriter.cc index 50fbb5815..06abb4c04 100644 --- a/ebos/eclgenericwriter.cc +++ b/ebos/eclgenericwriter.cc @@ -537,14 +537,14 @@ template class EclGenericWriter>, - Dune::MultipleCodimMultipleGeomTypeMapper>, Dune::Impl::MCMGFailLayout>, + Dune::MultipleCodimMultipleGeomTypeMapper>>, double>; #endif template class EclGenericWriter, Dune::PolyhedralGrid<3,3,double>, Dune::GridView>, - Dune::MultipleCodimMultipleGeomTypeMapper>, Dune::Impl::MCMGFailLayout>, + Dune::MultipleCodimMultipleGeomTypeMapper>>, double>; } // namespace Opm diff --git a/ebos/ecltransmissibility.cc b/ebos/ecltransmissibility.cc index 68dd21396..509a4148d 100644 --- a/ebos/ecltransmissibility.cc +++ b/ebos/ecltransmissibility.cc @@ -1049,13 +1049,13 @@ template class EclTransmissibility>, - Dune::MultipleCodimMultipleGeomTypeMapper>, Dune::Impl::MCMGFailLayout>, + Dune::MultipleCodimMultipleGeomTypeMapper>>, double>; #endif template class EclTransmissibility, Dune::GridView>, - Dune::MultipleCodimMultipleGeomTypeMapper>, Dune::Impl::MCMGFailLayout>, + Dune::MultipleCodimMultipleGeomTypeMapper>>, double>; } // namespace Opm