Merge pull request #2215 from dr-robertk/PR/fix-compile-dune27

Fix compilation with DUNE 2.7
This commit is contained in:
Markus Blatt 2019-12-18 08:56:51 +01:00 committed by GitHub
commit d255e1cad6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View File

@ -46,13 +46,6 @@ template <int codim>
class EntityPointer;
}
#if DUNE_VERSION_NEWER(DUNE_FEM, 2, 6)
template <int dim, int cdim>
auto referenceElement(const Dune::cpgrid::Geometry<dim, cdim>& geo)
-> decltype(referenceElement<double, dim>(geo.type()))
{ return referenceElement<double, dim>(geo.type()); }
#endif
// specialization of dune-fem compatiblity functions for CpGrid, since CpGrid does not use the interface classes.
namespace Fem {
@ -61,6 +54,7 @@ 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; }
@ -68,6 +62,7 @@ inline Dune::cpgrid::Entity<codim> make_entity(const Dune::cpgrid::EntityPointer
template <int codim>
inline Dune::cpgrid::Entity<codim> make_entity(Dune::cpgrid::Entity<codim> entity)
{ return std::move(entity); }
#endif
////////////////////////////////////////////////////////////
//

View File

@ -35,6 +35,7 @@
#include <dune/istl/scalarproducts.hh>
#include <dune/common/fvector.hh>
#include <dune/common/fmatrix.hh>
#include <dune/common/version.hh>
namespace Dune
{
namespace Amg
@ -227,9 +228,14 @@ struct ScalarType<Dune::SeqScalarProduct<X> >
ComposeScalarTypeForSeqPrecond(Dune::SeqJac);
ComposeScalarTypeForSeqPrecond(Dune::SeqSOR);
ComposeScalarTypeForSeqPrecond(Dune::SeqSSOR);
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
ComposeScalarTypeForSeqPrecond(Dune::SeqILU);
#else
// Dune::SeqGS and Dune::SeqSOR are the same in DUNE 2.7
ComposeScalarTypeForSeqPrecond(Dune::SeqGS);
ComposeScalarTypeForSeqPrecond(Dune::SeqILU0);
ComposeScalarTypeForSeqPrecond(Dune::SeqILUn);
#endif
#undef ComposeScalarTypeForSeqPrecond