mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: expose category as member for dune 2.6
the enum can only be used with a define, and that would just be a temporary solution in any case
This commit is contained in:
parent
3c5510c879
commit
4315665b64
@ -527,12 +527,20 @@ namespace Opm {
|
||||
typedef Dune::CollectiveCommunication< Grid > communication_type;
|
||||
#endif
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 6)
|
||||
Dune::SolverCategory::Category category() const override
|
||||
{
|
||||
return overlapping ?
|
||||
Dune::SolverCategory::overlapping : Dune::SolverCategory::sequential;
|
||||
}
|
||||
#else
|
||||
enum {
|
||||
//! \brief The solver category.
|
||||
category = overlapping ?
|
||||
Dune::SolverCategory::overlapping :
|
||||
Dune::SolverCategory::sequential
|
||||
};
|
||||
#endif
|
||||
|
||||
//! constructor: just store a reference to a matrix
|
||||
WellModelMatrixAdapter (const M& A, const WellModel& wellMod, const boost::any& parallelInformation = boost::any() )
|
||||
|
@ -385,11 +385,19 @@ createAMGPreconditionerPointer( Op& opA, const double relax, const P& comm, std:
|
||||
typedef typename X::field_type field_type;
|
||||
|
||||
// define the category
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 6)
|
||||
Dune::SolverCategory::Category category() const override
|
||||
{
|
||||
return std::is_same<P,Dune::Amg::SequentialInformation>::value ?
|
||||
Dune::SolverCategory::sequential : Dune::SolverCategory::overlapping;
|
||||
}
|
||||
#else
|
||||
enum {
|
||||
//! \brief The category the preconditioner is part of.
|
||||
category = std::is_same<P,Dune::Amg::SequentialInformation>::value?
|
||||
Dune::SolverCategory::sequential:Dune::SolverCategory::overlapping
|
||||
};
|
||||
#endif
|
||||
|
||||
typedef ISTLUtility::CPRSelector<M,X,X,P> CPRSelectorType ;
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include <opm/common/Exceptions.hpp>
|
||||
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/istl/preconditioner.hh>
|
||||
#include <dune/istl/paamg/smoother.hh>
|
||||
#include <dune/istl/paamg/pinfo.hh>
|
||||
@ -227,12 +228,21 @@ protected:
|
||||
};
|
||||
|
||||
public:
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 6)
|
||||
Dune::SolverCategory::Category category() const override
|
||||
{
|
||||
return std::is_same<ParallelInfoT, Dune::Amg::SequentialInformation>::value ?
|
||||
Dune::SolverCategory::sequential : Dune::SolverCategory::overlapping;
|
||||
}
|
||||
|
||||
#else
|
||||
// define the category
|
||||
enum {
|
||||
//! \brief The category the preconditioner is part of.
|
||||
category = std::is_same<ParallelInfoT, Dune::Amg::SequentialInformation>::value ?
|
||||
Dune::SolverCategory::sequential : Dune::SolverCategory::overlapping
|
||||
};
|
||||
#endif
|
||||
|
||||
/*! \brief Constructor.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user