Skip to content

Commit

Permalink
Merge pull request #745 from akva2/bump_dune_2.9
Browse files Browse the repository at this point in the history
bump minimum dune version to 2.9
  • Loading branch information
blattms authored Dec 3, 2024
2 parents 2fe71b7 + 85b6b18 commit b7ef2ef
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 23 deletions.
4 changes: 2 additions & 2 deletions dune.module
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ Label: 2025.04-pre
Maintainer: atgeirr@sintef.no
MaintainerName: Atgeirr F. Rasmussen
Url: http://opm-project.org
Depends: dune-common (>= 2.7) dune-geometry (>= 2.7) dune-grid (>= 2.7) opm-common
Suggests: dune-istl (>= 2.7)
Depends: dune-common (>= 2.9) dune-geometry (>= 2.9) dune-grid (>= 2.9) opm-common
Suggests: dune-istl (>= 2.9)
4 changes: 0 additions & 4 deletions opm/grid/cpgrid/CpGridData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -946,11 +946,7 @@ struct AttributeDataHandle
c2e_(cell_to_entity), grid_(grid)
{}

#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 8)
bool fixedSize()
#else
bool fixedsize()
#endif
{
return true;
}
Expand Down
11 changes: 4 additions & 7 deletions opm/grid/cpgrid/Entity2IndexDataHandle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,31 +64,28 @@ class Entity2IndexDataHandle
: fromGrid_(fromGrid), toGrid_(toGrid), data_(data)
{}

#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 8)
bool fixedSize()
{
return data_.fixedSize(3, codim);
}
#else
bool fixedsize()
{
return data_.fixedSize(3, codim);
}
#endif

std::size_t size(std::size_t i)
{
return data_.size(Entity<codim>(fromGrid_, i, true));
}

template<class B>
void gather(B& buffer, std::size_t i)
{
data_.gather(buffer, Entity<codim>(fromGrid_, i, true));
}

template<class B>
void scatter(B& buffer, std::size_t i, std::size_t s)
{
data_.scatter(buffer, Entity<codim>(toGrid_, i, true), s);
}

private:
const CpGridData& fromGrid_;
const CpGridData& toGrid_;
Expand Down
3 changes: 0 additions & 3 deletions opm/grid/polyhedralgrid/grid.hh
Original file line number Diff line number Diff line change
Expand Up @@ -962,9 +962,6 @@ namespace Dune
}

public:
#if DUNE_VERSION_LT_REV(DUNE_GRID, 2, 7, 1)
using Base::getRealImplementation;
#endif
typedef typename Traits :: ExtraData ExtraData;
ExtraData extraData () const { return this; }

Expand Down
7 changes: 0 additions & 7 deletions opm/grid/polyhedralgrid/gridfactory.hh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

#include <dune/common/typetraits.hh>
#include <dune/common/version.hh>
#if DUNE_VERSION_LT(DUNE_GRID, 2, 8)
#include <dune/common/to_unique_ptr.hh>
#endif

#include <dune/grid/common/gridfactory.hh>
#include <opm/grid/polyhedralgrid/grid.hh>
Expand Down Expand Up @@ -40,11 +37,7 @@ namespace Dune
typedef Dune::FieldVector<ctype,dimensionworld> CoordinateType;
typedef CoordinateType Coordinate;

#if DUNE_VERSION_LT(DUNE_GRID, 2, 8)
typedef ToUniquePtr<Grid> UniquePtrType;
#else
using UniquePtrType = std::unique_ptr<Grid>;
#endif

/** \brief Default constructor */
explicit GridFactory ( const MPICommunicatorType& = MPIHelper::getCommunicator() )
Expand Down

0 comments on commit b7ef2ef

Please sign in to comment.