diff --git a/dumux/io/grid/gmshgriddatahandle.hh b/dumux/io/grid/gmshgriddatahandle.hh index 802fbeffc29a70d79fb98d7a986329747c386d10..49646d789e6b4a0925cc23a53a575c57166bb8e4 100644 --- a/dumux/io/grid/gmshgriddatahandle.hh +++ b/dumux/io/grid/gmshgriddatahandle.hh @@ -103,8 +103,15 @@ struct GmshGridDataHandle : public Dune::CommDataHandleIF<GmshGridDataHandle<Gri bool contains (int dim, int codim) const { return codim == 0 || codim == 1; } - bool fixedSize (int dim, int codim) const +#if DUNE_VERSION_GT(DUNE_GRID,2,7) + //! returns true if size per entity of given dim and codim is a constant + bool fixedSize(int dim, int codim) const { return true; } +#else + //! returns true if size per entity of given dim and codim is a constant + bool fixedsize(int dim, int codim) const + { return true; } +#endif template<class EntityType> std::size_t size (const EntityType& e) const @@ -181,8 +188,15 @@ struct GmshGridDataHandle<Dune::UGGrid<dimgrid>, GridFactory, Data> bool contains (int dim, int codim) const { return codim == 0 || codim == 1; } - bool fixedSize (int dim, int codim) const +#if DUNE_VERSION_GT(DUNE_GRID,2,7) + //! returns true if size per entity of given dim and codim is a constant + bool fixedSize(int dim, int codim) const { return true; } +#else + //! returns true if size per entity of given dim and codim is a constant + bool fixedsize(int dim, int codim) const + { return true; } +#endif template<class EntityType> std::size_t size (const EntityType& e) const diff --git a/dumux/io/loadsolution.hh b/dumux/io/loadsolution.hh index c9770b996c8ae789cc8b5263ce327403db4e6346..1cc5f2f37c4e955ca025564f10acee14925804fe 100644 --- a/dumux/io/loadsolution.hh +++ b/dumux/io/loadsolution.hh @@ -32,6 +32,7 @@ #include <type_traits> #include <functional> +#include <dune/common/version.hh> #include <dune/common/exceptions.hh> #include <dune/common/indices.hh> #include <dune/grid/common/partitionset.hh> @@ -66,8 +67,15 @@ public: bool contains(int dim, int cd) const { return cd == codim; } - bool fixedSize(int dim, int cd) const +#if DUNE_VERSION_GT(DUNE_GRID,2,7) + //! returns true if size per entity of given dim and codim is a constant + bool fixedSize(int dim, int codim) const { return true; } +#else + //! returns true if size per entity of given dim and codim is a constant + bool fixedsize(int dim, int codim) const + { return true; } +#endif template<class EntityType> size_t size (const EntityType &e) const diff --git a/dumux/linear/parallelhelpers.hh b/dumux/linear/parallelhelpers.hh index 38624a968ebec123be8c1e6518db232a3dff8f22..df12dd5f99d07563367b9fb007f87dc101dff43a 100644 --- a/dumux/linear/parallelhelpers.hh +++ b/dumux/linear/parallelhelpers.hh @@ -65,8 +65,15 @@ class ParallelISTLHelper bool contains(int dim, int codim) const { return dofCodim == codim; } +#if DUNE_VERSION_GT(DUNE_GRID,2,7) + //! returns true if size per entity of given dim and codim is a constant bool fixedSize(int dim, int codim) const { return true; } +#else + //! returns true if size per entity of given dim and codim is a constant + bool fixedsize(int dim, int codim) const + { return true; } +#endif template<class EntityType> std::size_t size(EntityType& e) const @@ -91,7 +98,11 @@ class ParallelISTLHelper public: using DataType = typename V::block_type; using BaseGatherScatter::contains; +#if DUNE_VERSION_GT(DUNE_GRID,2,7) using BaseGatherScatter::fixedSize; +#else + using BaseGatherScatter::fixedsize; +#endif using BaseGatherScatter::size; ConsistencyBoxGatherScatter(V& container, const DofMapper& mapper) @@ -129,7 +140,11 @@ class ParallelISTLHelper public: using DataType = std::size_t; using BaseGatherScatter::contains; +#if DUNE_VERSION_GT(DUNE_GRID,2,7) using BaseGatherScatter::fixedSize; +#else + using BaseGatherScatter::fixedsize; +#endif using BaseGatherScatter::size; GhostGatherScatter(std::vector<std::size_t>& ranks, const DofMapper& mapper) @@ -171,7 +186,11 @@ class ParallelISTLHelper public: using DataType = std::size_t; using BaseGatherScatter::contains; +#if DUNE_VERSION_GT(DUNE_GRID,2,7) using BaseGatherScatter::fixedSize; +#else + using BaseGatherScatter::fixedsize; +#endif using BaseGatherScatter::size; InteriorBorderGatherScatter(std::vector<std::size_t>& ranks, const DofMapper& mapper) @@ -210,7 +229,11 @@ class ParallelISTLHelper { using DataType = int; using BaseGatherScatter::contains; +#if DUNE_VERSION_GT(DUNE_GRID,2,7) using BaseGatherScatter::fixedSize; +#else + using BaseGatherScatter::fixedsize; +#endif using BaseGatherScatter::size; NeighbourGatherScatter(const DofMapper& mapper, int rank, std::set<int>& neighbours) @@ -246,7 +269,11 @@ class ParallelISTLHelper { using DataType = int; using BaseGatherScatter::contains; +#if DUNE_VERSION_GT(DUNE_GRID,2,7) using BaseGatherScatter::fixedSize; +#else + using BaseGatherScatter::fixedsize; +#endif using BaseGatherScatter::size; SharedGatherScatter(std::vector<int>& shared, const DofMapper& mapper) @@ -283,7 +310,11 @@ class ParallelISTLHelper { using DataType = GlobalIndex; using BaseGatherScatter::contains; +#if DUNE_VERSION_GT(DUNE_GRID,2,7) using BaseGatherScatter::fixedSize; +#else + using BaseGatherScatter::fixedsize; +#endif using BaseGatherScatter::size; GlobalIndexGatherScatter(std::vector<GlobalIndex>& globalIndices, const DofMapper& mapper) @@ -536,11 +567,15 @@ class ParallelMatrixHelper bool contains (int dim, int codim) const { return (codim == dofCodim); } - /*! - * \brief Returns true if size of data per entity of given dim and codim is a constant - */ - bool fixedSize (int dim, int codim) const +#if DUNE_VERSION_GT(DUNE_GRID,2,7) + //! returns true if size per entity of given dim and codim is a constant + bool fixedSize(int dim, int codim) const + { return false; } +#else + //! returns true if size per entity of given dim and codim is a constant + bool fixedsize(int dim, int codim) const { return false; } +#endif /*! * \brief How many objects of type DataType have to be sent for a given entity @@ -633,11 +668,15 @@ class ParallelMatrixHelper bool contains(int dim, int codim) const { return (codim == dofCodim); } - /*! - * \brief Returns true if size of data per entity of given dim and codim is a constant - */ +#if DUNE_VERSION_GT(DUNE_GRID,2,7) + //! returns true if size per entity of given dim and codim is a constant bool fixedSize(int dim, int codim) const { return false; } +#else + //! returns true if size per entity of given dim and codim is a constant + bool fixedsize(int dim, int codim) const + { return false; } +#endif /*! * \brief How many objects of type DataType have to be sent for a given entity diff --git a/dumux/parallel/vectorcommdatahandle.hh b/dumux/parallel/vectorcommdatahandle.hh index 21f5ffd9892f7b1c58e885c295a23b242b0f76bf..956dad6021fb615ae896025d49c8e1ce45f4bd6c 100644 --- a/dumux/parallel/vectorcommdatahandle.hh +++ b/dumux/parallel/vectorcommdatahandle.hh @@ -87,9 +87,15 @@ public: bool contains(int dim, int codim) const { return (codim == entityCodim); } +#if DUNE_VERSION_GT(DUNE_GRID,2,7) //! returns true if size per entity of given dim and codim is a constant bool fixedSize(int dim, int codim) const { return true; } +#else + //! returns true if size per entity of given dim and codim is a constant + bool fixedsize(int dim, int codim) const + { return true; } +#endif /*! * \brief how many objects of type DataType have to be sent for a given entity