Skip to content
Snippets Groups Projects
Commit bd1c0b53 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

Merge branch 'feature/remove-backwards-compatible-isparallel' into 'master'

Remove use of isParallel.

canCommunicate is already part of Dune 2.4.

See merge request !27
parents 01acc84f 7b085788
No related branches found
No related tags found
1 merge request!31Feature/colebrookwhiteboundarylayer
......@@ -210,26 +210,14 @@ private:
* \brief Wraps the AMG backend such that it can be used for the el2p model.
*/
template <class TypeTag>
class El2PAMGBackend : public El2PAMGBackendBase
<
class El2PAMGBackend : public El2PAMGBackendBase<
TypeTag,
#if DUNE_VERSION_NEWER(DUNE_GRID, 3, 0)
Dune::Capabilities::canCommunicate<typename GET_PROP_TYPE(TypeTag, Grid),
typename GET_PROP_TYPE(TypeTag, Grid)::dimension>::v
#else
Dune::Capabilities::isParallel<typename GET_PROP_TYPE(TypeTag, Grid)>::v
#endif
>
GET_PROP_TYPE(TypeTag, Grid)::dimension>::v>
{
typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid;
enum { dofCodim = Grid::dimension };
enum {
#if DUNE_VERSION_NEWER(DUNE_GRID, 3, 0)
isParallel = Dune::Capabilities::canCommunicate<Grid, dofCodim>::v
#else
isParallel = Dune::Capabilities::isParallel<Grid>::v
#endif
};
enum { isParallel = Dune::Capabilities::canCommunicate<Grid, dofCodim>::v };
typedef El2PAMGBackendBase<TypeTag, isParallel> ParentType;
typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem;
......
......@@ -399,13 +399,7 @@ public:
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
enum { dofCodim = Grid::dimension,
isNonOverlapping = true };
enum {
#if DUNE_VERSION_NEWER(DUNE_GRID, 3, 0)
isParallel = Dune::Capabilities::canCommunicate<Grid, dofCodim>::v
#else
isParallel = Dune::Capabilities::isParallel<Grid>::v
#endif
};
enum { isParallel = Dune::Capabilities::canCommunicate<Grid, dofCodim>::v };
static const int numEq = isParallel ? GET_PROP_VALUE(TypeTag, NumEq)
: GET_PROP_TYPE(TypeTag, JacobianMatrix)::block_type::rows;
......
......@@ -116,12 +116,8 @@ public:
std::shared_ptr<typename AmgTraits::Comm> comm;
std::shared_ptr<typename AmgTraits::LinearOperator> fop;
std::shared_ptr<typename AmgTraits::ScalarProduct> sp;
#if DUNE_VERSION_NEWER(DUNE_GRID, 3, 0)
static const int dofCodim = AmgTraits::dofCodim;
static const bool isParallel = Dune::Capabilities::canCommunicate<Grid, dofCodim>::v;
#else
static const bool isParallel = Dune::Capabilities::isParallel<Grid>::v;
#endif
prepareLinearAlgebra_<Matrix, Vector, isParallel>(A, b, rank, comm, fop, sp);
typedef typename Dune::Amg::SmootherTraits<Smoother>::Arguments
......
......@@ -82,11 +82,7 @@ public:
numEq = JacobianMatrix::block_type::rows,
dofCodim = Grid::dimension,
isNonOverlapping = true,
#if DUNE_VERSION_NEWER(DUNE_GRID, 3, 0)
isParallel = Dune::Capabilities::canCommunicate<Grid, dofCodim>::v
#else
isParallel = Dune::Capabilities::isParallel<Grid>::v
#endif
};
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef Dune::BCRSMatrix<Dune::FieldMatrix<Scalar,numEq,numEq> > MType;
......@@ -128,11 +124,7 @@ public:
numEq = JacobianMatrix::block_type::rows,
dofCodim = 0,
isNonOverlapping = false,
#if DUNE_VERSION_NEWER(DUNE_GRID, 3, 0)
isParallel = Dune::Capabilities::canCommunicate<Grid, dofCodim>::v
#else
isParallel = Dune::Capabilities::isParallel<Grid>::v
#endif
};
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef Dune::BCRSMatrix<Dune::FieldMatrix<Scalar,numEq,numEq> > MType;
......@@ -154,11 +146,7 @@ public:
numEq = JacobianMatrix::block_type::rows,
dofCodim = 0,
isNonOverlapping = false,
#if DUNE_VERSION_NEWER(DUNE_GRID, 3, 0)
isParallel = Dune::Capabilities::canCommunicate<Grid, dofCodim>::v
#else
isParallel = Dune::Capabilities::isParallel<Grid>::v
#endif
};
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef Dune::BCRSMatrix<Dune::FieldMatrix<Scalar,numEq,numEq> > MType;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment