diff --git a/opm/models/blackoil/blackoilbrinemodules.hh b/opm/models/blackoil/blackoilbrinemodules.hh index 9a5432c59..91f7fcabb 100644 --- a/opm/models/blackoil/blackoilbrinemodules.hh +++ b/opm/models/blackoil/blackoilbrinemodules.hh @@ -38,7 +38,6 @@ #include #include #include -#include #endif #include @@ -125,8 +124,7 @@ public: const auto& bdensityTable = bdensityTables[pvtRegionIdx]; const auto& pvtwsaltTable = pvtwsaltTables[pvtRegionIdx]; const auto& c = pvtwsaltTable.getSaltConcentrationColumn(); - const auto& density = bdensityTable.getBrineDensityColumn(); - bdensityTable_[pvtRegionIdx].setXYContainers(c, density); + bdensityTable_[pvtRegionIdx].setXYContainers(c, bdensityTable); } } } diff --git a/opm/models/discretization/common/fvbasediscretization.hh b/opm/models/discretization/common/fvbasediscretization.hh index e2b00b6e9..c65d4d2f0 100644 --- a/opm/models/discretization/common/fvbasediscretization.hh +++ b/opm/models/discretization/common/fvbasediscretization.hh @@ -67,11 +67,7 @@ #include #if HAVE_DUNE_FEM -#if DUNE_VERSION_NEWER(DUNE_FEM, 2,6) #include -#else -#include -#endif #include #include #include @@ -95,22 +91,12 @@ BEGIN_PROPERTIES SET_TYPE_PROP(FvBaseDiscretization, Simulator, Opm::Simulator); //! Mapper for the grid view's vertices. -#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6) SET_TYPE_PROP(FvBaseDiscretization, VertexMapper, Dune::MultipleCodimMultipleGeomTypeMapper); -#else -SET_TYPE_PROP(FvBaseDiscretization, VertexMapper, - Dune::MultipleCodimMultipleGeomTypeMapper); -#endif //! Mapper for the grid view's elements. -#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6) SET_TYPE_PROP(FvBaseDiscretization, ElementMapper, Dune::MultipleCodimMultipleGeomTypeMapper); -#else -SET_TYPE_PROP(FvBaseDiscretization, ElementMapper, - Dune::MultipleCodimMultipleGeomTypeMapper); -#endif //! marks the border indices (required for the algebraic overlap stuff) SET_PROP(FvBaseDiscretization, BorderListCreator) @@ -380,13 +366,8 @@ public: FvBaseDiscretization(Simulator& simulator) : simulator_(simulator) , gridView_(simulator.gridView()) -#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6) , elementMapper_(gridView_, Dune::mcmgElementLayout()) , vertexMapper_(gridView_, Dune::mcmgVertexLayout()) -#else - , elementMapper_(gridView_) - , vertexMapper_(gridView_) -#endif , newtonMethod_(simulator) , localLinearizer_(ThreadManager::maxThreads()) , linearizer_(new Linearizer()) diff --git a/opm/models/discretization/common/fvbaselinearizer.hh b/opm/models/discretization/common/fvbaselinearizer.hh index 07690d169..4b4fa9a71 100644 --- a/opm/models/discretization/common/fvbaselinearizer.hh +++ b/opm/models/discretization/common/fvbaselinearizer.hh @@ -191,15 +191,6 @@ public: linearize_(); succeeded = 1; } -#if ! DUNE_VERSION_NEWER(DUNE_COMMON, 2,5) - catch (const Dune::Exception& e) - { - std::cout << "rank " << simulator_().gridView().comm().rank() - << " caught an exception while linearizing:" << e.what() - << "\n" << std::flush; - succeeded = 0; - } -#endif catch (const std::exception& e) { std::cout << "rank " << simulator_().gridView().comm().rank() @@ -246,16 +237,6 @@ public: << " caught an exception while linearizing:" << e.what() << "\n" << std::flush; } -#if ! DUNE_VERSION_NEWER(DUNE_COMMON, 2,5) - catch (const Dune::Exception& e) - { - succeeded = false; - - std::cout << "rank " << simulator_().gridView().comm().rank() - << " caught an exception while linearizing:" << e.what() - << "\n" << std::flush; - } -#endif succeeded = comm.min(succeeded); diff --git a/opm/models/discretization/common/fvbaseproblem.hh b/opm/models/discretization/common/fvbaseproblem.hh index be9d98c3d..b493f9397 100644 --- a/opm/models/discretization/common/fvbaseproblem.hh +++ b/opm/models/discretization/common/fvbaseproblem.hh @@ -111,13 +111,8 @@ public: FvBaseProblem(Simulator& simulator) : nextTimeStepSize_(0.0) , gridView_(simulator.gridView()) -#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6) , elementMapper_(gridView_, Dune::mcmgElementLayout()) , vertexMapper_(gridView_, Dune::mcmgVertexLayout()) -#else - , elementMapper_(gridView_) - , vertexMapper_(gridView_) -#endif , boundingBoxMin_(std::numeric_limits::max()) , boundingBoxMax_(-std::numeric_limits::max()) , simulator_(simulator) diff --git a/opm/models/discretization/ecfv/ecfvstencil.hh b/opm/models/discretization/ecfv/ecfvstencil.hh index b064a2c6b..4fdea53a7 100644 --- a/opm/models/discretization/ecfv/ecfvstencil.hh +++ b/opm/models/discretization/ecfv/ecfvstencil.hh @@ -63,11 +63,7 @@ class EcfvStencil typedef typename GridView::Intersection Intersection; typedef typename GridView::template Codim<0>::Entity Element; -#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6) typedef Dune::MultipleCodimMultipleGeomTypeMapper ElementMapper; -#else - typedef Dune::MultipleCodimMultipleGeomTypeMapper ElementMapper; -#endif typedef Dune::FieldVector GlobalPosition; diff --git a/opm/models/discretization/vcfv/vcfvstencil.hh b/opm/models/discretization/vcfv/vcfvstencil.hh index 78684a2c6..45f108148 100644 --- a/opm/models/discretization/vcfv/vcfvstencil.hh +++ b/opm/models/discretization/vcfv/vcfvstencil.hh @@ -724,11 +724,7 @@ private: public: //! exported Mapper type -#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6) typedef Dune::MultipleCodimMultipleGeomTypeMapper Mapper; -#else - typedef Dune::MultipleCodimMultipleGeomTypeMapper Mapper; -#endif class ScvGeometry { diff --git a/opm/models/io/dgfvanguard.hh b/opm/models/io/dgfvanguard.hh index 4965ab407..15a9bd0e8 100644 --- a/opm/models/io/dgfvanguard.hh +++ b/opm/models/io/dgfvanguard.hh @@ -156,13 +156,8 @@ protected: LevelGridView gridView = dgfPointer->levelGridView(/*level=*/0); const unsigned edgeCodim = Grid::dimension - 1; -#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6) typedef Dune::MultipleCodimMultipleGeomTypeMapper VertexMapper; VertexMapper vertexMapper(gridView, Dune::mcmgVertexLayout()); -#else - typedef Dune::MultipleCodimMultipleGeomTypeMapper VertexMapper; - VertexMapper vertexMapper(gridView); -#endif // first create a map of the dune to ART vertex indices auto eIt = gridView.template begin(); diff --git a/opm/models/io/vtkmultiwriter.hh b/opm/models/io/vtkmultiwriter.hh index 884efc7b7..835be58e9 100644 --- a/opm/models/io/vtkmultiwriter.hh +++ b/opm/models/io/vtkmultiwriter.hh @@ -96,13 +96,8 @@ class VtkMultiWriter : public BaseOutputWriter enum { dim = GridView::dimension }; -#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6) typedef Dune::MultipleCodimMultipleGeomTypeMapper VertexMapper; typedef Dune::MultipleCodimMultipleGeomTypeMapper ElementMapper; -#else - typedef Dune::MultipleCodimMultipleGeomTypeMapper ElementMapper; - typedef Dune::MultipleCodimMultipleGeomTypeMapper VertexMapper; -#endif public: typedef BaseOutputWriter::Scalar Scalar; @@ -113,11 +108,7 @@ public: typedef BaseOutputWriter::TensorBuffer TensorBuffer; typedef Dune::VTKWriter VtkWriter; -#if DUNE_VERSION_NEWER(DUNE_GRID, 2,5) typedef std::shared_ptr< Dune::VTKFunction< GridView > > FunctionPtr; -#else - typedef typename VtkWriter::VTKFunctionPtr FunctionPtr; -#endif VtkMultiWriter(bool asyncWriting, const GridView& gridView, @@ -125,13 +116,8 @@ public: const std::string& simName = "", std::string multiFileName = "") : gridView_(gridView) -#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6) , elementMapper_(gridView, Dune::mcmgElementLayout()) , vertexMapper_(gridView, Dune::mcmgVertexLayout()) -#else - , elementMapper_(gridView) - , vertexMapper_(gridView) -#endif , curWriter_(nullptr) , curWriterNum_(0) , taskletRunner_(/*numThreads=*/asyncWriting?1:0) diff --git a/opm/models/nonlinear/newtonmethod.hh b/opm/models/nonlinear/newtonmethod.hh index 4a0938a8e..27649c11d 100644 --- a/opm/models/nonlinear/newtonmethod.hh +++ b/opm/models/nonlinear/newtonmethod.hh @@ -628,16 +628,6 @@ protected: << " caught an exception while pre-processing the problem:" << e.what() << "\n" << std::flush; } -#if ! DUNE_VERSION_NEWER(DUNE_COMMON, 2,5) - catch (const Dune::Exception& e) - { - succeeded = false; - - std::cout << "rank " << simulator_.gridView().comm().rank() - << " caught an exception while pre-processing the problem:" << e.what() - << "\n" << std::flush; - } -#endif succeeded = comm.min(succeeded); @@ -733,16 +723,6 @@ protected: << " caught an exception while post processing an auxiliary module:" << e.what() << "\n" << std::flush; } -#if ! DUNE_VERSION_NEWER(DUNE_COMMON, 2,5) - catch (const Dune::Exception& e) - { - succeeded = false; - - std::cout << "rank " << simulator_.gridView().comm().rank() - << " caught an exception while post processing an auxiliary module:" << e.what() - << "\n" << std::flush; - } -#endif succeeded = comm.min(succeeded); @@ -872,16 +852,6 @@ protected: << " caught an exception while letting the problem post-process:" << e.what() << "\n" << std::flush; } -#if ! DUNE_VERSION_NEWER(DUNE_COMMON, 2,5) - catch (const Dune::Exception& e) - { - succeeded = false; - - std::cout << "rank " << simulator_.gridView().comm().rank() - << " caught an exception while letting the problem post process:" << e.what() - << "\n" << std::flush; - } -#endif succeeded = comm.min(succeeded); diff --git a/opm/models/utils/pffgridvector.hh b/opm/models/utils/pffgridvector.hh index 46e65757d..2a0f56359 100644 --- a/opm/models/utils/pffgridvector.hh +++ b/opm/models/utils/pffgridvector.hh @@ -49,20 +49,12 @@ class PffGridVector { typedef typename GridView::template Codim<0>::Entity Element; -#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6) typedef Dune::MultipleCodimMultipleGeomTypeMapper ElementMapper; -#else - typedef Dune::MultipleCodimMultipleGeomTypeMapper ElementMapper; -#endif public: PffGridVector(const GridView& gridView, const DofMapper& dofMapper) : gridView_(gridView) -#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6) , elementMapper_(gridView_, Dune::mcmgElementLayout()) -#else - , elementMapper_(gridView_) -#endif , dofMapper_(dofMapper) { } diff --git a/opm/models/utils/start.hh b/opm/models/utils/start.hh index ff9ddb595..92af8ab9c 100644 --- a/opm/models/utils/start.hh +++ b/opm/models/utils/start.hh @@ -401,19 +401,6 @@ static inline int start(int argc, char **argv, bool registerParams=true) } return 0; } -#if ! DUNE_VERSION_NEWER(DUNE_COMMON, 2,5) - catch (Dune::Exception& e) - { - if (myRank == 0) { - std::cout << "Dune reported an error: " << e.what() << std::endl << std::flush; - - std::cout << "Trying to reset TTY.\n"; - resetTerminal_(); - } - - return 2; - } -#endif catch (std::exception& e) { if (myRank == 0) { diff --git a/opm/simulators/linalg/overlappingoperator.hh b/opm/simulators/linalg/overlappingoperator.hh index d9a2a2d39..e4d686aba 100644 --- a/opm/simulators/linalg/overlappingoperator.hh +++ b/opm/simulators/linalg/overlappingoperator.hh @@ -50,14 +50,9 @@ public: OverlappingOperator(const OverlappingMatrix& A) : A_(A) {} -#if DUNE_VERSION_NEWER(DUNE_ISTL, 2,6) //! the kind of computations supported by the operator. Either overlapping or non-overlapping Dune::SolverCategory::Category category() const override { return Dune::SolverCategory::overlapping; } -#else - // redefine the category - enum { category = Dune::SolverCategory::overlapping }; -#endif //! apply operator to x: \f$ y = A(x) \f$ virtual void apply(const DomainVector& x, RangeVector& y) const override diff --git a/opm/simulators/linalg/overlappingpreconditioner.hh b/opm/simulators/linalg/overlappingpreconditioner.hh index 358665f07..402c99ef1 100644 --- a/opm/simulators/linalg/overlappingpreconditioner.hh +++ b/opm/simulators/linalg/overlappingpreconditioner.hh @@ -50,14 +50,9 @@ public: typedef typename SeqPreCond::domain_type domain_type; typedef typename SeqPreCond::range_type range_type; -#if DUNE_VERSION_NEWER(DUNE_ISTL, 2,6) //! the kind of computations supported by the operator. Either overlapping or non-overlapping Dune::SolverCategory::Category category() const override { return Dune::SolverCategory::overlapping; } -#else - // redefine the category - enum { category = Dune::SolverCategory::overlapping }; -#endif OverlappingPreconditioner(SeqPreCond& seqPreCond, const Overlap& overlap) : seqPreCond_(seqPreCond), overlap_(&overlap) diff --git a/opm/simulators/linalg/overlappingscalarproduct.hh b/opm/simulators/linalg/overlappingscalarproduct.hh index 8b4933f0b..0f68eb7fa 100644 --- a/opm/simulators/linalg/overlappingscalarproduct.hh +++ b/opm/simulators/linalg/overlappingscalarproduct.hh @@ -45,20 +45,11 @@ public: typedef typename OverlappingBlockVector::field_type field_type; typedef typename Dune::CollectiveCommunication CollectiveCommunication; -#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 5) typedef typename Dune::ScalarProduct::real_type real_type; -#else - typedef double real_type; -#endif -#if DUNE_VERSION_NEWER(DUNE_ISTL, 2,6) //! the kind of computations supported by the operator. Either overlapping or non-overlapping Dune::SolverCategory::Category category() const override { return Dune::SolverCategory::overlapping; } -#else - // redefine the category - enum { category = Dune::SolverCategory::overlapping }; -#endif OverlappingScalarProduct(const Overlap& overlap) : overlap_(overlap), comm_( Dune::MPIHelper::getCollectiveCommunication() )