Merge pull request #2327 from akva2/bump_dune

Bump required dune version to 2.6
This commit is contained in:
Atgeirr Flø Rasmussen
2020-02-11 09:41:44 +01:00
committed by GitHub
22 changed files with 48 additions and 314 deletions

View File

@@ -306,13 +306,8 @@ public:
typedef typename Vanguard::GridView LocalGridView;
const LocalGridView localGridView = vanguard.gridView();
#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6)
typedef Dune::MultipleCodimMultipleGeomTypeMapper<LocalGridView> ElementMapper;
ElementMapper elemMapper(localGridView, Dune::mcmgElementLayout());
#else
typedef Dune::MultipleCodimMultipleGeomTypeMapper<LocalGridView, Dune::MCMGElementLayout> ElementMapper;
ElementMapper elemMapper(localGridView);
#endif
localIdxToGlobalIdx_.resize(localGridView.size(0), -1);
@@ -325,13 +320,8 @@ public:
globalCartesianIndex_.resize(globalSize, -1);
const EquilGridView equilGridView = vanguard.equilGrid().leafGridView();
#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6)
typedef Dune::MultipleCodimMultipleGeomTypeMapper<EquilGridView> EquilElementMapper;
EquilElementMapper equilElemMapper(equilGridView, Dune::mcmgElementLayout());
#else
typedef Dune::MultipleCodimMultipleGeomTypeMapper<EquilGridView, Dune::MCMGElementLayout> EquilElementMapper;
EquilElementMapper equilElemMapper(equilGridView);
#endif
// Scatter the global index to local index for lookup during restart
ElementIndexScatterHandle<EquilElementMapper,ElementMapper> handle(equilElemMapper, elemMapper, localIdxToGlobalIdx_);

View File

@@ -162,11 +162,7 @@ public:
const auto& gridView = grid_->leafGridView();
unsigned numFaces = grid_->numFaces();
std::vector<double> faceTrans(numFaces, 0.0);
#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6)
ElementMapper elemMapper(this->gridView(), Dune::mcmgElementLayout());
#else
ElementMapper elemMapper(this->gridView());
#endif
auto elemIt = gridView.template begin</*codim=*/0>();
const auto& elemEndIt = gridView.template end</*codim=*/0>();
for (; elemIt != elemEndIt; ++ elemIt) {

View File

@@ -414,11 +414,7 @@ protected:
typedef Dune::BiCGSTABSolver<TracerVector> TracerSolver;
typedef Dune::MatrixAdapter<TracerMatrix, TracerVector , TracerVector > TracerOperator;
typedef Dune::SeqScalarProduct< TracerVector > TracerScalarProduct ;
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2,6)
typedef Dune::SeqILU< TracerMatrix, TracerVector, TracerVector > TracerPreconditioner;
#else
typedef Dune::SeqILUn< TracerMatrix, TracerVector, TracerVector > TracerPreconditioner;
#endif
TracerOperator tracerOperator(M);
TracerScalarProduct tracerScalarProduct;

View File

@@ -133,11 +133,7 @@ public:
const auto& eclGrid = eclState.getInputGrid();
const auto& cartDims = cartMapper.cartesianDimensions();
auto& transMult = eclState.getTransMult();
#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6)
ElementMapper elemMapper(gridView, Dune::mcmgElementLayout());
#else
ElementMapper elemMapper(gridView);
#endif
// get the ntg values, the ntg values are modified for the cells merged with minpv
std::vector<double> ntg;
@@ -491,11 +487,7 @@ private:
const auto& gridView = vanguard_.gridView();
const auto& cartMapper = vanguard_.cartesianIndexMapper();
const auto& cartDims = cartMapper.cartesianDimensions();
#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6)
ElementMapper elemMapper(gridView, Dune::mcmgElementLayout());
#else
ElementMapper elemMapper(gridView);
#endif
const auto& fp = vanguard_.eclState().fieldProps();
const auto& inputTranxData = fp.get_global_double("TRANX");

View File

@@ -496,13 +496,8 @@ private:
typedef typename EquilGrid :: LeafGridView GlobalGridView;
const GlobalGridView& globalGridView = globalGrid().leafGridView();
#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6)
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GlobalGridView> ElementMapper;
ElementMapper globalElemMapper(globalGridView, Dune::mcmgElementLayout());
#else
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GlobalGridView, Dune::MCMGElementLayout> ElementMapper;
ElementMapper globalElemMapper(globalGridView);
#endif
const EclTransmissibility<TypeTag>* globalTrans;
@@ -603,15 +598,9 @@ private:
typedef typename EquilGrid :: LeafGridView GlobalGridView;
const GlobalGridView& globalGridView = globalGrid().leafGridView();
#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6)
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GlobalGridView> ElementMapper;
ElementMapper globalElemMapper(globalGridView, Dune::mcmgElementLayout());
#else
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GlobalGridView, Dune::MCMGElementLayout> ElementMapper;
ElementMapper globalElemMapper(globalGridView);
#endif
const EclTransmissibility<TypeTag>* globalTrans;
if (!collectToIORank_.isParallel()) {
// in the sequential case we must use the transmissibilites defined by

View File

@@ -49,21 +49,6 @@ class EntityPointer;
// specialization of dune-fem compatiblity functions for CpGrid, since CpGrid does not use the interface classes.
namespace Fem {
////////////////////////////////////////////////////////////
//
// make_entity for CpGrid entities
//
////////////////////////////////////////////////////////////
#if ! DUNE_VERSION_NEWER(DUNE_GRID, 2, 6)
template <int codim>
inline Dune::cpgrid::Entity<codim> make_entity(const Dune::cpgrid::EntityPointer<codim>& entityPointer)
{ return *entityPointer; }
template <int codim>
inline Dune::cpgrid::Entity<codim> make_entity(Dune::cpgrid::Entity<codim> entity)
{ return std::move(entity); }
#endif
////////////////////////////////////////////////////////////
//
// GridEntityAccess for CpGrid entities