From f2983ac6af3694397d01688419656dacce6228b7 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 27 Feb 2023 09:39:25 +0100 Subject: [PATCH] minimum dune version required is now 2.7 --- dune.module | 2 +- ebos/collecttoiorank.cc | 8 ------- ebos/eclgenerictracermodel_impl.hh | 8 ------- ebos/eclgenericvanguard.hh | 4 ---- opm/simulators/flow/BlackoilModelEbos.hpp | 4 ---- .../linalg/MatrixMarketSpecializations.hpp | 5 ---- .../linalg/ParallelOverlappingILU0.hpp | 14 ----------- .../linalg/ParallelOverlappingILU0_impl.hpp | 2 ++ .../ParallelRestrictedAdditiveSchwarz.hpp | 24 ++++--------------- .../linalg/PreconditionerFactory.hpp | 5 ---- .../linalg/PreconditionerFactory_impl.hpp | 16 ------------- .../linalg/PressureBhpTransferPolicy.hpp | 14 ----------- .../linalg/PressureTransferPolicy.hpp | 5 ---- opm/simulators/linalg/amgcpr.hh | 22 ----------------- .../bda/MultisegmentWellContribution.hpp | 5 ---- .../linalg/bda/WellContributions.hpp | 4 ---- opm/simulators/linalg/bda/opencl/CPR.cpp | 4 ---- opm/simulators/linalg/bda/opencl/CPR.hpp | 5 ---- .../utils/ParallelCommunication.hpp | 13 ++++------ opm/simulators/wells/GasLiftGroupInfo.hpp | 4 ---- opm/simulators/wells/MSWellHelpers.cpp | 4 ---- tests/DuneIstlTestHelpers.hpp | 6 ----- tests/test_ParallelSerialization.cpp | 4 ---- tests/test_blackoil_amg.cpp | 9 ------- tests/test_broadcast.cpp | 4 ---- tests/test_csrToCscOffsetMap.cpp | 5 ---- tests/test_gatherdeferredlogger.cpp | 13 ---------- tests/test_milu.cpp | 1 + tests/test_wellmodel.cpp | 4 ---- 29 files changed, 14 insertions(+), 204 deletions(-) diff --git a/dune.module b/dune.module index be1da3341..a07579021 100644 --- a/dune.module +++ b/dune.module @@ -10,4 +10,4 @@ Label: 2023.04-pre Maintainer: atgeirr@sintef.no MaintainerName: Atgeirr F. Rasmussen Url: http://opm-project.org -Depends: dune-istl (>= 2.6) opm-common opm-grid opm-models +Depends: dune-istl (>= 2.7) opm-common opm-grid opm-models diff --git a/ebos/collecttoiorank.cc b/ebos/collecttoiorank.cc index da5a5714a..1aa07cdee 100644 --- a/ebos/collecttoiorank.cc +++ b/ebos/collecttoiorank.cc @@ -214,11 +214,7 @@ public: : sendMapper_(sendMapper), recvMapper_(recvMapper), elementIndices_(elementIndices) {} using DataType = int; -#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7) bool fixedSize(int /*dim*/, int /*codim*/) -#else - bool fixedsize(int /*dim*/, int /*codim*/) -#endif { return true; } @@ -258,11 +254,7 @@ public: : mapper_(mapper), elementIndices_(elementIndices) {} using DataType = int; -#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7) bool fixedSize(int /*dim*/, int /*codim*/) -#else - bool fixedsize(int /*dim*/, int /*codim*/) -#endif { return true; } diff --git a/ebos/eclgenerictracermodel_impl.hh b/ebos/eclgenerictracermodel_impl.hh index 8c5dde4f6..f7f268962 100644 --- a/ebos/eclgenerictracermodel_impl.hh +++ b/ebos/eclgenerictracermodel_impl.hh @@ -274,10 +274,6 @@ template:: linearSolve_(const TracerMatrix& M, TracerVector& x, TracerVector& b) { -#if ! DUNE_VERSION_NEWER(DUNE_COMMON, 2,7) - Dune::FMatrixPrecision::set_singular_limit(1.e-30); - Dune::FMatrixPrecision::set_absolute_limit(1.e-30); -#endif x = 0.0; Scalar tolerance = 1e-2; int maxIter = 100; @@ -333,10 +329,6 @@ template:: linearSolveBatchwise_(const TracerMatrix& M, std::vector& x, std::vector& b) { -#if ! DUNE_VERSION_NEWER(DUNE_COMMON, 2,7) - Dune::FMatrixPrecision::set_singular_limit(1.e-30); - Dune::FMatrixPrecision::set_absolute_limit(1.e-30); -#endif Scalar tolerance = 1e-2; int maxIter = 100; diff --git a/ebos/eclgenericvanguard.hh b/ebos/eclgenericvanguard.hh index 5fc211013..3fdffd4ee 100644 --- a/ebos/eclgenericvanguard.hh +++ b/ebos/eclgenericvanguard.hh @@ -33,11 +33,7 @@ #include -#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7) #include -#else -#include -#endif #include #include diff --git a/opm/simulators/flow/BlackoilModelEbos.hpp b/opm/simulators/flow/BlackoilModelEbos.hpp index 451c189fa..fcd6bd1ed 100644 --- a/opm/simulators/flow/BlackoilModelEbos.hpp +++ b/opm/simulators/flow/BlackoilModelEbos.hpp @@ -53,11 +53,7 @@ #include #include -#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7) #include -#else -#include -#endif #include #include diff --git a/opm/simulators/linalg/MatrixMarketSpecializations.hpp b/opm/simulators/linalg/MatrixMarketSpecializations.hpp index ec770b98a..bb77c9b60 100644 --- a/opm/simulators/linalg/MatrixMarketSpecializations.hpp +++ b/opm/simulators/linalg/MatrixMarketSpecializations.hpp @@ -9,7 +9,6 @@ #ifndef OPM_MATRIXMARKETSPECIALIZATIONS_HEADER_INCLUDED #define OPM_MATRIXMARKETSPECIALIZATIONS_HEADER_INCLUDED -#include #include namespace Opm @@ -46,10 +45,8 @@ namespace MatrixMarketImpl }; } // namespace MatrixMarketImpl -#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) namespace MatrixMarketImpl { -#endif template struct mm_multipliers, A>> { @@ -58,9 +55,7 @@ namespace MatrixMarketImpl cols = j }; }; -#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) } // namespace MatrixMarketImpl -#endif } // namespace Dune diff --git a/opm/simulators/linalg/ParallelOverlappingILU0.hpp b/opm/simulators/linalg/ParallelOverlappingILU0.hpp index d8634550b..bd36bace1 100644 --- a/opm/simulators/linalg/ParallelOverlappingILU0.hpp +++ b/opm/simulators/linalg/ParallelOverlappingILU0.hpp @@ -22,7 +22,6 @@ #include #include -#include #include #include @@ -92,11 +91,7 @@ struct ConstructionTraits; using Arguments = DefaultParallelConstructionArgs; -#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) using ParallelOverlappingILU0Pointer = std::shared_ptr; -#else - using ParallelOverlappingILU0Pointer = T*; -#endif static inline ParallelOverlappingILU0Pointer construct(Arguments& args) { @@ -107,15 +102,6 @@ struct ConstructionTraits +#include + #include #include diff --git a/opm/simulators/linalg/ParallelRestrictedAdditiveSchwarz.hpp b/opm/simulators/linalg/ParallelRestrictedAdditiveSchwarz.hpp index 12b6f133a..0903d3e24 100644 --- a/opm/simulators/linalg/ParallelRestrictedAdditiveSchwarz.hpp +++ b/opm/simulators/linalg/ParallelRestrictedAdditiveSchwarz.hpp @@ -55,33 +55,19 @@ struct ConstructionTraits SeqConstructionTraits; /// \brief Construct a parallel restricted overlapping schwarz preconditioner. -#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) typedef std::shared_ptr< Opm::ParallelRestrictedOverlappingSchwarz > ParallelRestrictedOverlappingSchwarzPointer; -#else - typedef Opm::ParallelRestrictedOverlappingSchwarz* ParallelRestrictedOverlappingSchwarzPointer; -#endif static inline ParallelRestrictedOverlappingSchwarzPointer construct(Arguments& args) { - return -#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) - std::make_shared( -#endif - new Opm::ParallelRestrictedOverlappingSchwarz - (*SeqConstructionTraits ::construct(args), - args.getComm()) -#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) - ); -#else - ; -#endif + using PROS = + Opm::ParallelRestrictedOverlappingSchwarz; + return std::make_shared(*SeqConstructionTraits::construct(args), + args.getComm()); } /// \brief Deconstruct and free a parallel restricted overlapping schwarz preconditioner. diff --git a/opm/simulators/linalg/PreconditionerFactory.hpp b/opm/simulators/linalg/PreconditionerFactory.hpp index 04ef9036d..d340ac980 100644 --- a/opm/simulators/linalg/PreconditionerFactory.hpp +++ b/opm/simulators/linalg/PreconditionerFactory.hpp @@ -24,13 +24,8 @@ #include -#include #include -#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) #include -#else -#include -#endif #include #include diff --git a/opm/simulators/linalg/PreconditionerFactory_impl.hpp b/opm/simulators/linalg/PreconditionerFactory_impl.hpp index 558953dd6..c7cc489a5 100644 --- a/opm/simulators/linalg/PreconditionerFactory_impl.hpp +++ b/opm/simulators/linalg/PreconditionerFactory_impl.hpp @@ -320,11 +320,7 @@ struct StandardPreconditioners F::addCreator("amg", [](const O& op, const P& prm, const std::function&, std::size_t) { const std::string smoother = prm.get("smoother", "ParOverILU0"); if (smoother == "ILU0" || smoother == "ParOverILU0") { - #if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) using Smoother = SeqILU; - #else - using Smoother = SeqILU0; - #endif return AMGHelper::template makeAmgPreconditioner(op, prm); } else if (smoother == "Jac") { using Smoother = SeqJac; @@ -336,11 +332,7 @@ struct StandardPreconditioners using Smoother = SeqSSOR; return AMGHelper::template makeAmgPreconditioner(op, prm); } else if (smoother == "ILUn") { - #if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) using Smoother = SeqILU; - #else - using Smoother = SeqILUn; - #endif return AMGHelper::template makeAmgPreconditioner(op, prm); } else { OPM_THROW(std::invalid_argument, @@ -350,11 +342,7 @@ struct StandardPreconditioners F::addCreator("kamg", [](const O& op, const P& prm, const std::function&, std::size_t) { const std::string smoother = prm.get("smoother", "ParOverILU0"); if (smoother == "ILU0" || smoother == "ParOverILU0") { - #if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) using Smoother = SeqILU; - #else - using Smoother = SeqILU0; - #endif return AMGHelper::template makeAmgPreconditioner(op, prm, true); } else if (smoother == "Jac") { using Smoother = SeqJac; @@ -369,11 +357,7 @@ struct StandardPreconditioners using Smoother = SeqSSOR; return AMGHelper::template makeAmgPreconditioner(op, prm, true); } else if (smoother == "ILUn") { - #if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) using Smoother = SeqILU; - #else - using Smoother = SeqILUn; - #endif return AMGHelper::template makeAmgPreconditioner(op, prm, true); } else { OPM_THROW(std::invalid_argument, diff --git a/opm/simulators/linalg/PressureBhpTransferPolicy.hpp b/opm/simulators/linalg/PressureBhpTransferPolicy.hpp index 514320663..755e1b087 100644 --- a/opm/simulators/linalg/PressureBhpTransferPolicy.hpp +++ b/opm/simulators/linalg/PressureBhpTransferPolicy.hpp @@ -140,21 +140,12 @@ namespace Opm ++createIter; } } -#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) if constexpr (std::is_same_v) { coarseLevelCommunication_ = std::make_shared(); } else { coarseLevelCommunication_ = std::make_shared( communication_->communicator(), communication_->category(), false); } -#else - if constexpr (std::is_same_v) { - coarseLevelCommunication_ = std::make_shared(); - } else { - coarseLevelCommunication_ = std::make_shared( - communication_->communicator(), communication_->getSolverCategory(), false); - } -#endif if (prm_.get("add_wells")) { fineOperator.addWellPressureEquationsStruct(*coarseLevelMatrix_); coarseLevelMatrix_->compress(); // all elemenst should be set @@ -167,13 +158,8 @@ namespace Opm this->lhs_.resize(this->coarseLevelMatrix_->M()); this->rhs_.resize(this->coarseLevelMatrix_->N()); using OperatorArgs = typename Dune::Amg::ConstructionTraits::Arguments; -#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) OperatorArgs oargs(coarseLevelMatrix_, *coarseLevelCommunication_); this->operator_ = Dune::Amg::ConstructionTraits::construct(oargs); -#else - OperatorArgs oargs(*coarseLevelMatrix_, *coarseLevelCommunication_); - this->operator_.reset(Dune::Amg::ConstructionTraits::construct(oargs)); -#endif } virtual void calculateCoarseEntries(const FineOperator& fineOperator) override diff --git a/opm/simulators/linalg/PressureTransferPolicy.hpp b/opm/simulators/linalg/PressureTransferPolicy.hpp index fa8d1381b..0383c871a 100644 --- a/opm/simulators/linalg/PressureTransferPolicy.hpp +++ b/opm/simulators/linalg/PressureTransferPolicy.hpp @@ -87,13 +87,8 @@ public: this->lhs_.resize(this->coarseLevelMatrix_->M()); this->rhs_.resize(this->coarseLevelMatrix_->N()); using OperatorArgs = typename Dune::Amg::ConstructionTraits::Arguments; -#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) OperatorArgs oargs(coarseLevelMatrix_, *coarseLevelCommunication_); this->operator_ = Dune::Amg::ConstructionTraits::construct(oargs); -#else - OperatorArgs oargs(*coarseLevelMatrix_, *coarseLevelCommunication_); - this->operator_.reset(Dune::Amg::ConstructionTraits::construct(oargs)); -#endif } virtual void calculateCoarseEntries(const FineOperator& fineOperator) override diff --git a/opm/simulators/linalg/amgcpr.hh b/opm/simulators/linalg/amgcpr.hh index 656031f21..f838b467f 100644 --- a/opm/simulators/linalg/amgcpr.hh +++ b/opm/simulators/linalg/amgcpr.hh @@ -256,7 +256,6 @@ namespace Dune * @param matrix The fine level matrix operator. * @param pinfo The fine level parallel information. */ -#if DUNE_VERSION_NEWER( DUNE_ISTL, 2, 7 ) template void createHierarchies(C& criterion, Operator& matrix, const PI& pinfo) @@ -271,12 +270,6 @@ namespace Dune void createHierarchies(C& criterion, std::shared_ptr< Operator > matrix, std::shared_ptr< PI > pinfo ); -#else - template - void createHierarchies(C& criterion, Operator& matrix, - const PI& pinfo); -#endif - void setupCoarseSolver(); /** @@ -492,12 +485,8 @@ namespace Dune template template -#if DUNE_VERSION_NEWER( DUNE_ISTL, 2, 7) void AMGCPR::createHierarchies(C& criterion, std::shared_ptr< Operator > matrix, std::shared_ptr< PI > pinfo ) -#else - void AMGCPR::createHierarchies(C& criterion, Operator& matrix, const PI& pinfo ) -#endif { Timer watch; matrices_.reset(new OperatorHierarchy(matrix, pinfo)); @@ -538,15 +527,9 @@ namespace Dune cargs.setComm(*matrices_->parallelInformation().coarsest()); } -#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) coarseSmoother_ = ConstructionTraits::construct(cargs); -#else - coarseSmoother_.reset(ConstructionTraits::construct(cargs)); -#endif - scalarProduct_ = createScalarProduct(cargs.getComm(),category()); - typedef DirectSolverSelector< typename M::matrix_type, X > SolverSelector; // Use superlu if we are purely sequential or with only one processor on the coarsest level. @@ -660,13 +643,8 @@ namespace Dune matrices_->parallelInformation().coarsest()->copyOwnerToAll(x,x); -#if DUNE_VERSION_NEWER( DUNE_ISTL, 2, 7) typedef std::shared_ptr< Range > RangePtr ; typedef std::shared_ptr< Domain > DomainPtr; -#else - typedef Range* RangePtr; - typedef Domain* DomainPtr; -#endif // Hierarchy takes ownership of pointers RangePtr copy( new Range(b) ); diff --git a/opm/simulators/linalg/bda/MultisegmentWellContribution.hpp b/opm/simulators/linalg/bda/MultisegmentWellContribution.hpp index 6a2c87a1d..079f30a30 100644 --- a/opm/simulators/linalg/bda/MultisegmentWellContribution.hpp +++ b/opm/simulators/linalg/bda/MultisegmentWellContribution.hpp @@ -73,12 +73,7 @@ private: unsigned int getColIdx(unsigned int idx); public: - -#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) using UMFPackIndex = SuiteSparse_long; -#else - using UMFPackIndex = int; -#endif #if HAVE_CUDA /// Set a cudaStream to be used diff --git a/opm/simulators/linalg/bda/WellContributions.hpp b/opm/simulators/linalg/bda/WellContributions.hpp index 896dc7c8d..51f706ed6 100644 --- a/opm/simulators/linalg/bda/WellContributions.hpp +++ b/opm/simulators/linalg/bda/WellContributions.hpp @@ -53,11 +53,7 @@ class WellContributions public: static std::unique_ptr create(const std::string& accelerator_mode, bool useWellConn); -#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) using UMFPackIndex = SuiteSparse_long; -#else - using UMFPackIndex = int; -#endif /// StandardWell has C, D and B matrices that need to be copied enum class MatrixType { C, diff --git a/opm/simulators/linalg/bda/opencl/CPR.cpp b/opm/simulators/linalg/bda/opencl/CPR.cpp index 4aac566a9..0361f16d0 100644 --- a/opm/simulators/linalg/bda/opencl/CPR.cpp +++ b/opm/simulators/linalg/bda/opencl/CPR.cpp @@ -299,12 +299,8 @@ void CPR::create_preconditioner_amg(BlockedMatrix *mat_) { } dune_op = std::make_shared(*dune_coarse); -#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) Dune::Amg::SequentialInformation seqinfo; dune_amg = std::make_unique(dune_op, Dune::stackobject_to_shared_ptr(seqinfo)); -#else - dune_amg = std::make_unique(*dune_op); -#endif Opm::PropertyTree property_tree; property_tree.put("alpha", 0.333333333333); diff --git a/opm/simulators/linalg/bda/opencl/CPR.hpp b/opm/simulators/linalg/bda/opencl/CPR.hpp index dd1c39e79..515000ec5 100644 --- a/opm/simulators/linalg/bda/opencl/CPR.hpp +++ b/opm/simulators/linalg/bda/opencl/CPR.hpp @@ -22,12 +22,7 @@ #include -#include -#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) #include -#else -#include -#endif #include #include diff --git a/opm/simulators/utils/ParallelCommunication.hpp b/opm/simulators/utils/ParallelCommunication.hpp index 304a2546a..9efc0030b 100644 --- a/opm/simulators/utils/ParallelCommunication.hpp +++ b/opm/simulators/utils/ParallelCommunication.hpp @@ -23,16 +23,13 @@ #include #include -namespace Opm -{ -namespace Parallel -{ +namespace Opm { +namespace Parallel { + using MPIComm = typename Dune::MPIHelper::MPICommunicator; -#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7) using Communication = Dune::Communication; -#else - using Communication = Dune::CollectiveCommunication; -#endif + } // namespace Parallel } // end namespace Opm + #endif // OPM_PARALLELCOMMUNICATION_HEADER_INCLUDED diff --git a/opm/simulators/wells/GasLiftGroupInfo.hpp b/opm/simulators/wells/GasLiftGroupInfo.hpp index 3856ce961..1e8e194c1 100644 --- a/opm/simulators/wells/GasLiftGroupInfo.hpp +++ b/opm/simulators/wells/GasLiftGroupInfo.hpp @@ -60,11 +60,7 @@ protected: using GroupRateMap = std::map; using GroupIdxMap = std::map; -#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7) using Communication = Dune::Communication; -#else - using Communication = Dune::CollectiveCommunication; -#endif // TODO: same definition with WellInterface, and // WellState eventually they should go to a common header file. diff --git a/opm/simulators/wells/MSWellHelpers.cpp b/opm/simulators/wells/MSWellHelpers.cpp index 2aef8652e..a14fc4681 100644 --- a/opm/simulators/wells/MSWellHelpers.cpp +++ b/opm/simulators/wells/MSWellHelpers.cpp @@ -185,11 +185,7 @@ invDX(const MatrixType& D, VectorType x, DeferredLogger& deferred_logger) Dune::MatrixAdapter linearOperator(D); // Sequential incomplete LU decomposition as the preconditioner -#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) Dune::SeqILU preconditioner(D, 1.0); -#else - Dune::SeqILU0 preconditioner(D, 1.0); -#endif // Dune::SeqILUn preconditioner(D, 1, 0.92); // Dune::SeqGS preconditioner(D, 1, 1); // Dune::SeqJac preconditioner(D, 1, 1); diff --git a/tests/DuneIstlTestHelpers.hpp b/tests/DuneIstlTestHelpers.hpp index 4165562a4..b86e40c90 100644 --- a/tests/DuneIstlTestHelpers.hpp +++ b/tests/DuneIstlTestHelpers.hpp @@ -29,14 +29,8 @@ #error "This file needs to compiled with MPI support!" #endif -#include -#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7) #include #include -#else -#include -#include -#endif #include #include diff --git a/tests/test_ParallelSerialization.cpp b/tests/test_ParallelSerialization.cpp index e46889208..39614fdc5 100644 --- a/tests/test_ParallelSerialization.cpp +++ b/tests/test_ParallelSerialization.cpp @@ -144,11 +144,7 @@ template std::tuple PackUnpack(T& in) { -#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7) const auto& comm = Dune::MPIHelper::getCommunication(); -#else - const auto& comm = Dune::MPIHelper::getCollectiveCommunication(); -#endif Opm::EclMpiSerializer ser(comm); ser.pack(in); diff --git a/tests/test_blackoil_amg.cpp b/tests/test_blackoil_amg.cpp index df38e1d27..86d647387 100644 --- a/tests/test_blackoil_amg.cpp +++ b/tests/test_blackoil_amg.cpp @@ -31,12 +31,7 @@ #include #include #include -#include -#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7) #include -#else -#include -#endif #include #include #include @@ -277,11 +272,7 @@ void runBlackoilAmgLaplace() typedef Dune::OwnerOverlapCopyCommunication Communication; typedef Dune::OverlappingSchwarzOperator Operator; -#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7) const auto& ccomm = Dune::MPIHelper::getCommunication(); -#else - const auto& ccomm = Dune::MPIHelper::getCollectiveCommunication(); -#endif Communication comm(ccomm); int n=0; diff --git a/tests/test_broadcast.cpp b/tests/test_broadcast.cpp index 0e897c4cf..fffd4b150 100644 --- a/tests/test_broadcast.cpp +++ b/tests/test_broadcast.cpp @@ -58,11 +58,7 @@ init_unit_test_func() BOOST_AUTO_TEST_CASE(BroadCast) { -#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7) const auto& cc = Dune::MPIHelper::getCommunication(); -#else - const auto& cc = Dune::MPIHelper::getCollectiveCommunication(); -#endif std::vector d(3); if (cc.rank() == 1) diff --git a/tests/test_csrToCscOffsetMap.cpp b/tests/test_csrToCscOffsetMap.cpp index 92761717d..c850f9a3c 100644 --- a/tests/test_csrToCscOffsetMap.cpp +++ b/tests/test_csrToCscOffsetMap.cpp @@ -5,7 +5,6 @@ #include #include -#include #include #include #include @@ -14,11 +13,7 @@ BOOST_AUTO_TEST_CASE(testcsrtocscoffsetmap){ -#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) using Matrix = Dune::BCRSMatrix; -#else - using Matrix = Dune::BCRSMatrix>; -#endif Matrix matrix; { diff --git a/tests/test_gatherdeferredlogger.cpp b/tests/test_gatherdeferredlogger.cpp index bae077885..66772611d 100644 --- a/tests/test_gatherdeferredlogger.cpp +++ b/tests/test_gatherdeferredlogger.cpp @@ -25,7 +25,6 @@ #include -#include #include #include @@ -81,11 +80,7 @@ void initLogger(std::ostringstream& log_stream) { BOOST_AUTO_TEST_CASE(NoMessages) { -#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7) const auto& cc = Dune::MPIHelper::getCommunication(); -#else - const auto& cc = Dune::MPIHelper::getCollectiveCommunication(); -#endif std::ostringstream log_stream; initLogger(log_stream); @@ -107,11 +102,7 @@ BOOST_AUTO_TEST_CASE(NoMessages) BOOST_AUTO_TEST_CASE(VariableNumberOfMessages) { -#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7) const auto& cc = Dune::MPIHelper::getCommunication(); -#else - const auto& cc = Dune::MPIHelper::getCollectiveCommunication(); -#endif std::ostringstream log_stream; initLogger(log_stream); @@ -149,11 +140,7 @@ BOOST_AUTO_TEST_CASE(VariableNumberOfMessages) BOOST_AUTO_TEST_CASE(AllHaveOneMessage) { -#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7) const auto& cc = Dune::MPIHelper::getCommunication(); -#else - const auto& cc = Dune::MPIHelper::getCollectiveCommunication(); -#endif std::ostringstream log_stream; initLogger(log_stream); diff --git a/tests/test_milu.cpp b/tests/test_milu.cpp index 80fb41c8d..af92fa7f3 100644 --- a/tests/test_milu.cpp +++ b/tests/test_milu.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/tests/test_wellmodel.cpp b/tests/test_wellmodel.cpp index b5832500f..795588977 100644 --- a/tests/test_wellmodel.cpp +++ b/tests/test_wellmodel.cpp @@ -103,11 +103,7 @@ struct GlobalFixture { Dune::MPIHelper::instance(argcDummy, argvDummy); #endif -#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7) Opm::FlowMainEbos::setupParameters_(argcDummy, argvDummy, Dune::MPIHelper::getCommunication()); -#else - Opm::FlowMainEbos::setupParameters_(argcDummy, argvDummy, Dune::MPIHelper::getCollectiveCommunication()); -#endif } };