Skip to content

Commit

Permalink
Prepare OPM for DUNE 2.10
Browse files Browse the repository at this point in the history
DUNE_VERSION_NEWER has been removed. Falling back to DUNE_VERSION_GTE
which exists since at least DUNE 2.7

Use Dune::Communcation instead of removed
Dune::CollectiveCommunication (there since at least DUNE 2.7)l
  • Loading branch information
blattms committed Oct 2, 2024
1 parent 057de17 commit 513e76c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/finitevolume/finitevolume.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ template<class G>
void timeloop(const G& grid, double tend)
{
// make a mapper for codim 0 entities in the leaf grid
#if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 8)
#if DUNE_VERSION_GTE(DUNE_GEOMETRY, 2, 8)
Dune::MultipleCodimMultipleGeomTypeMapper<typename G::LeafGridView> mapper(grid.leafGridView(), Dune::mcmgElementLayout());
#else
Dune::LeafMultipleCodimMultipleGeomTypeMapper<G> mapper(grid, Dune::mcmgElementLayout());
Expand Down
2 changes: 1 addition & 1 deletion opm/grid/common/SubGridPart.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ struct SubGridPartTraits {
using IntersectionIterator = typename Grid ::Traits ::LeafIntersectionIterator;

/** \brief type of the collective communication */
using CollectiveCommunication = typename Grid ::Traits ::CollectiveCommunication;
using CollectiveCommunication = typename Grid ::Traits ::Communication;


template <class BaseEntityType>
Expand Down
2 changes: 1 addition & 1 deletion opm/grid/cpgrid/CpGridData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ struct AttributeDataHandle
c2e_(cell_to_entity), grid_(grid)
{}

#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 8)
#if DUNE_VERSION_GTE(DUNE_COMMON, 2, 8)
bool fixedSize()
#else
bool fixedsize()
Expand Down
2 changes: 1 addition & 1 deletion opm/grid/cpgrid/Entity2IndexDataHandle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class Entity2IndexDataHandle
: fromGrid_(fromGrid), toGrid_(toGrid), data_(data)
{}

#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 8)
#if DUNE_VERSION_GTE(DUNE_COMMON, 2, 8)
bool fixedSize()
{
return data_.fixedSize(3, codim);
Expand Down
4 changes: 2 additions & 2 deletions tests/cpgrid/distribution_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class CheckGlobalCellHandle

typedef int DataType;

#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 8)
#if DUNE_VERSION_GTE(DUNE_COMMON, 2, 8)
bool fixedSize()
#else
bool fixedsize()
Expand Down Expand Up @@ -217,7 +217,7 @@ class CheckBoundaryIdHandle
{}

typedef int DataType;
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 8)
#if DUNE_VERSION_GTE(DUNE_COMMON, 2, 8)
bool fixedSize()
#else
bool fixedsize()
Expand Down

0 comments on commit 513e76c

Please sign in to comment.