mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-21 08:54:08 -06:00
minimum dune version required is now 2.7
This commit is contained in:
parent
5309ba22f7
commit
f2983ac6af
@ -10,4 +10,4 @@ Label: 2023.04-pre
|
||||
Maintainer: atgeirr@sintef.no
|
||||
MaintainerName: Atgeirr F. Rasmussen
|
||||
Url: http://opm-project.org
|
||||
Depends: dune-istl (>= 2.6) opm-common opm-grid opm-models
|
||||
Depends: dune-istl (>= 2.7) opm-common opm-grid opm-models
|
||||
|
@ -214,11 +214,7 @@ public:
|
||||
: sendMapper_(sendMapper), recvMapper_(recvMapper), elementIndices_(elementIndices)
|
||||
{}
|
||||
using DataType = int;
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
|
||||
bool fixedSize(int /*dim*/, int /*codim*/)
|
||||
#else
|
||||
bool fixedsize(int /*dim*/, int /*codim*/)
|
||||
#endif
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -258,11 +254,7 @@ public:
|
||||
: mapper_(mapper), elementIndices_(elementIndices)
|
||||
{}
|
||||
using DataType = int;
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
|
||||
bool fixedSize(int /*dim*/, int /*codim*/)
|
||||
#else
|
||||
bool fixedsize(int /*dim*/, int /*codim*/)
|
||||
#endif
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -274,10 +274,6 @@ template<class Grid,class GridView, class DofMapper, class Stencil, class Scalar
|
||||
bool EclGenericTracerModel<Grid,GridView,DofMapper,Stencil,Scalar>::
|
||||
linearSolve_(const TracerMatrix& M, TracerVector& x, TracerVector& b)
|
||||
{
|
||||
#if ! DUNE_VERSION_NEWER(DUNE_COMMON, 2,7)
|
||||
Dune::FMatrixPrecision<Scalar>::set_singular_limit(1.e-30);
|
||||
Dune::FMatrixPrecision<Scalar>::set_absolute_limit(1.e-30);
|
||||
#endif
|
||||
x = 0.0;
|
||||
Scalar tolerance = 1e-2;
|
||||
int maxIter = 100;
|
||||
@ -333,10 +329,6 @@ template<class Grid,class GridView, class DofMapper, class Stencil, class Scalar
|
||||
bool EclGenericTracerModel<Grid,GridView,DofMapper,Stencil,Scalar>::
|
||||
linearSolveBatchwise_(const TracerMatrix& M, std::vector<TracerVector>& x, std::vector<TracerVector>& b)
|
||||
{
|
||||
#if ! DUNE_VERSION_NEWER(DUNE_COMMON, 2,7)
|
||||
Dune::FMatrixPrecision<Scalar>::set_singular_limit(1.e-30);
|
||||
Dune::FMatrixPrecision<Scalar>::set_absolute_limit(1.e-30);
|
||||
#endif
|
||||
Scalar tolerance = 1e-2;
|
||||
int maxIter = 100;
|
||||
|
||||
|
@ -33,11 +33,7 @@
|
||||
|
||||
#include <opm/simulators/utils/ParallelCommunication.hpp>
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
|
||||
#include <dune/common/parallel/communication.hh>
|
||||
#else
|
||||
#include <dune/common/parallel/collectivecommunication.hh>
|
||||
#endif
|
||||
|
||||
#include <array>
|
||||
#include <cassert>
|
||||
|
@ -53,11 +53,7 @@
|
||||
#include <opm/simulators/wells/WellConnectionAuxiliaryModule.hpp>
|
||||
|
||||
#include <dune/istl/owneroverlapcopy.hh>
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
|
||||
#include <dune/common/parallel/communication.hh>
|
||||
#else
|
||||
#include <dune/common/parallel/collectivecommunication.hh>
|
||||
#endif
|
||||
#include <dune/common/timer.hh>
|
||||
#include <dune/common/unused.hh>
|
||||
|
||||
|
@ -9,7 +9,6 @@
|
||||
#ifndef OPM_MATRIXMARKETSPECIALIZATIONS_HEADER_INCLUDED
|
||||
#define OPM_MATRIXMARKETSPECIALIZATIONS_HEADER_INCLUDED
|
||||
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/istl/matrixmarket.hh>
|
||||
|
||||
namespace Opm
|
||||
@ -46,10 +45,8 @@ namespace MatrixMarketImpl
|
||||
};
|
||||
} // namespace MatrixMarketImpl
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
namespace MatrixMarketImpl
|
||||
{
|
||||
#endif
|
||||
template <typename T, int i, int j, typename A>
|
||||
struct mm_multipliers<BCRSMatrix<Opm::MatrixBlock<T,i,j>, A>>
|
||||
{
|
||||
@ -58,9 +55,7 @@ namespace MatrixMarketImpl
|
||||
cols = j
|
||||
};
|
||||
};
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
} // namespace MatrixMarketImpl
|
||||
#endif
|
||||
|
||||
} // namespace Dune
|
||||
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
#include <opm/simulators/linalg/MILU.hpp>
|
||||
#include <opm/simulators/linalg/PreconditionerWithUpdate.hpp>
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/istl/paamg/smoother.hh>
|
||||
|
||||
#include <cstddef>
|
||||
@ -92,11 +91,7 @@ struct ConstructionTraits<Opm::ParallelOverlappingILU0<Matrix,Domain,Range,Paral
|
||||
using T = Opm::ParallelOverlappingILU0<Matrix,Domain,Range,ParallelInfo>;
|
||||
using Arguments = DefaultParallelConstructionArgs<T,ParallelInfo>;
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
using ParallelOverlappingILU0Pointer = std::shared_ptr<T>;
|
||||
#else
|
||||
using ParallelOverlappingILU0Pointer = T*;
|
||||
#endif
|
||||
|
||||
static inline ParallelOverlappingILU0Pointer construct(Arguments& args)
|
||||
{
|
||||
@ -107,15 +102,6 @@ struct ConstructionTraits<Opm::ParallelOverlappingILU0<Matrix,Domain,Range,Paral
|
||||
args.getArgs().relaxationFactor,
|
||||
args.getArgs().getMilu()) );
|
||||
}
|
||||
|
||||
#if ! DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
// this method is not needed anymore in 2.7 since std::shared_ptr is used
|
||||
static inline void deconstruct(T* bp)
|
||||
{
|
||||
delete bp;
|
||||
}
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
} // end namespace Amg
|
||||
|
@ -20,6 +20,8 @@
|
||||
|
||||
#include <opm/simulators/linalg/ParallelOverlappingILU0.hpp>
|
||||
|
||||
#include <dune/common/version.hh>
|
||||
|
||||
#include <dune/istl/ilu.hh>
|
||||
#include <dune/istl/owneroverlapcopy.hh>
|
||||
|
||||
|
@ -55,33 +55,19 @@ struct ConstructionTraits<Opm::ParallelRestrictedOverlappingSchwarz<Range,
|
||||
typedef ConstructionTraits<SeqPreconditioner> SeqConstructionTraits;
|
||||
|
||||
/// \brief Construct a parallel restricted overlapping schwarz preconditioner.
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
typedef std::shared_ptr< Opm::ParallelRestrictedOverlappingSchwarz<Range,
|
||||
Domain,
|
||||
ParallelInfo,
|
||||
SeqPreconditioner> > ParallelRestrictedOverlappingSchwarzPointer;
|
||||
#else
|
||||
typedef Opm::ParallelRestrictedOverlappingSchwarz<Range,
|
||||
Domain,
|
||||
ParallelInfo,
|
||||
SeqPreconditioner>* ParallelRestrictedOverlappingSchwarzPointer;
|
||||
#endif
|
||||
|
||||
static inline ParallelRestrictedOverlappingSchwarzPointer
|
||||
construct(Arguments& args)
|
||||
{
|
||||
return
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
std::make_shared(
|
||||
#endif
|
||||
new Opm::ParallelRestrictedOverlappingSchwarz
|
||||
<Range,Domain,ParallelInfo,SeqPreconditioner>(*SeqConstructionTraits ::construct(args),
|
||||
args.getComm())
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
);
|
||||
#else
|
||||
;
|
||||
#endif
|
||||
using PROS =
|
||||
Opm::ParallelRestrictedOverlappingSchwarz<Range,Domain,
|
||||
ParallelInfo,SeqPreconditioner>;
|
||||
return std::make_shared<PROS>(*SeqConstructionTraits::construct(args),
|
||||
args.getComm());
|
||||
}
|
||||
|
||||
/// \brief Deconstruct and free a parallel restricted overlapping schwarz preconditioner.
|
||||
|
@ -24,13 +24,8 @@
|
||||
|
||||
#include <opm/simulators/linalg/PreconditionerWithUpdate.hpp>
|
||||
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/istl/paamg/aggregates.hh>
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
#include <dune/istl/paamg/matrixhierarchy.hh>
|
||||
#else
|
||||
#include <dune/istl/paamg/hierarchy.hh>
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
#include <map>
|
||||
|
@ -320,11 +320,7 @@ struct StandardPreconditioners<Operator,Dune::Amg::SequentialInformation>
|
||||
F::addCreator("amg", [](const O& op, const P& prm, const std::function<V()>&, std::size_t) {
|
||||
const std::string smoother = prm.get<std::string>("smoother", "ParOverILU0");
|
||||
if (smoother == "ILU0" || smoother == "ParOverILU0") {
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
using Smoother = SeqILU<M, V, V>;
|
||||
#else
|
||||
using Smoother = SeqILU0<M, V, V>;
|
||||
#endif
|
||||
return AMGHelper<O,C,M,V>::template makeAmgPreconditioner<Smoother>(op, prm);
|
||||
} else if (smoother == "Jac") {
|
||||
using Smoother = SeqJac<M, V, V>;
|
||||
@ -336,11 +332,7 @@ struct StandardPreconditioners<Operator,Dune::Amg::SequentialInformation>
|
||||
using Smoother = SeqSSOR<M, V, V>;
|
||||
return AMGHelper<O,C,M,V>::template makeAmgPreconditioner<Smoother>(op, prm);
|
||||
} else if (smoother == "ILUn") {
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
using Smoother = SeqILU<M, V, V>;
|
||||
#else
|
||||
using Smoother = SeqILUn<M, V, V>;
|
||||
#endif
|
||||
return AMGHelper<O,C,M,V>::template makeAmgPreconditioner<Smoother>(op, prm);
|
||||
} else {
|
||||
OPM_THROW(std::invalid_argument,
|
||||
@ -350,11 +342,7 @@ struct StandardPreconditioners<Operator,Dune::Amg::SequentialInformation>
|
||||
F::addCreator("kamg", [](const O& op, const P& prm, const std::function<V()>&, std::size_t) {
|
||||
const std::string smoother = prm.get<std::string>("smoother", "ParOverILU0");
|
||||
if (smoother == "ILU0" || smoother == "ParOverILU0") {
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
using Smoother = SeqILU<M, V, V>;
|
||||
#else
|
||||
using Smoother = SeqILU0<M, V, V>;
|
||||
#endif
|
||||
return AMGHelper<O,C,M,V>::template makeAmgPreconditioner<Smoother>(op, prm, true);
|
||||
} else if (smoother == "Jac") {
|
||||
using Smoother = SeqJac<M, V, V>;
|
||||
@ -369,11 +357,7 @@ struct StandardPreconditioners<Operator,Dune::Amg::SequentialInformation>
|
||||
using Smoother = SeqSSOR<M, V, V>;
|
||||
return AMGHelper<O,C,M,V>::template makeAmgPreconditioner<Smoother>(op, prm, true);
|
||||
} else if (smoother == "ILUn") {
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
using Smoother = SeqILU<M, V, V>;
|
||||
#else
|
||||
using Smoother = SeqILUn<M, V, V>;
|
||||
#endif
|
||||
return AMGHelper<O,C,M,V>::template makeAmgPreconditioner<Smoother>(op, prm, true);
|
||||
} else {
|
||||
OPM_THROW(std::invalid_argument,
|
||||
|
@ -140,21 +140,12 @@ namespace Opm
|
||||
++createIter;
|
||||
}
|
||||
}
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
if constexpr (std::is_same_v<Communication, Dune::Amg::SequentialInformation>) {
|
||||
coarseLevelCommunication_ = std::make_shared<Communication>();
|
||||
} else {
|
||||
coarseLevelCommunication_ = std::make_shared<Communication>(
|
||||
communication_->communicator(), communication_->category(), false);
|
||||
}
|
||||
#else
|
||||
if constexpr (std::is_same_v<Communication, Dune::Amg::SequentialInformation>) {
|
||||
coarseLevelCommunication_ = std::make_shared<Communication>();
|
||||
} else {
|
||||
coarseLevelCommunication_ = std::make_shared<Communication>(
|
||||
communication_->communicator(), communication_->getSolverCategory(), false);
|
||||
}
|
||||
#endif
|
||||
if (prm_.get<bool>("add_wells")) {
|
||||
fineOperator.addWellPressureEquationsStruct(*coarseLevelMatrix_);
|
||||
coarseLevelMatrix_->compress(); // all elemenst should be set
|
||||
@ -167,13 +158,8 @@ namespace Opm
|
||||
this->lhs_.resize(this->coarseLevelMatrix_->M());
|
||||
this->rhs_.resize(this->coarseLevelMatrix_->N());
|
||||
using OperatorArgs = typename Dune::Amg::ConstructionTraits<CoarseOperator>::Arguments;
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
OperatorArgs oargs(coarseLevelMatrix_, *coarseLevelCommunication_);
|
||||
this->operator_ = Dune::Amg::ConstructionTraits<CoarseOperator>::construct(oargs);
|
||||
#else
|
||||
OperatorArgs oargs(*coarseLevelMatrix_, *coarseLevelCommunication_);
|
||||
this->operator_.reset(Dune::Amg::ConstructionTraits<CoarseOperator>::construct(oargs));
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual void calculateCoarseEntries(const FineOperator& fineOperator) override
|
||||
|
@ -87,13 +87,8 @@ public:
|
||||
this->lhs_.resize(this->coarseLevelMatrix_->M());
|
||||
this->rhs_.resize(this->coarseLevelMatrix_->N());
|
||||
using OperatorArgs = typename Dune::Amg::ConstructionTraits<CoarseOperator>::Arguments;
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
OperatorArgs oargs(coarseLevelMatrix_, *coarseLevelCommunication_);
|
||||
this->operator_ = Dune::Amg::ConstructionTraits<CoarseOperator>::construct(oargs);
|
||||
#else
|
||||
OperatorArgs oargs(*coarseLevelMatrix_, *coarseLevelCommunication_);
|
||||
this->operator_.reset(Dune::Amg::ConstructionTraits<CoarseOperator>::construct(oargs));
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual void calculateCoarseEntries(const FineOperator& fineOperator) override
|
||||
|
@ -256,7 +256,6 @@ namespace Dune
|
||||
* @param matrix The fine level matrix operator.
|
||||
* @param pinfo The fine level parallel information.
|
||||
*/
|
||||
#if DUNE_VERSION_NEWER( DUNE_ISTL, 2, 7 )
|
||||
template<class C>
|
||||
void createHierarchies(C& criterion, Operator& matrix,
|
||||
const PI& pinfo)
|
||||
@ -271,12 +270,6 @@ namespace Dune
|
||||
void createHierarchies(C& criterion, std::shared_ptr< Operator > matrix,
|
||||
std::shared_ptr< PI > pinfo );
|
||||
|
||||
#else
|
||||
template<class C>
|
||||
void createHierarchies(C& criterion, Operator& matrix,
|
||||
const PI& pinfo);
|
||||
#endif
|
||||
|
||||
void setupCoarseSolver();
|
||||
|
||||
/**
|
||||
@ -492,12 +485,8 @@ namespace Dune
|
||||
|
||||
template<class M, class X, class S, class PI, class A>
|
||||
template<class C>
|
||||
#if DUNE_VERSION_NEWER( DUNE_ISTL, 2, 7)
|
||||
void AMGCPR<M,X,S,PI,A>::createHierarchies(C& criterion, std::shared_ptr< Operator > matrix,
|
||||
std::shared_ptr< PI > pinfo )
|
||||
#else
|
||||
void AMGCPR<M,X,S,PI,A>::createHierarchies(C& criterion, Operator& matrix, const PI& pinfo )
|
||||
#endif
|
||||
{
|
||||
Timer watch;
|
||||
matrices_.reset(new OperatorHierarchy(matrix, pinfo));
|
||||
@ -538,15 +527,9 @@ namespace Dune
|
||||
cargs.setComm(*matrices_->parallelInformation().coarsest());
|
||||
}
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
coarseSmoother_ = ConstructionTraits<Smoother>::construct(cargs);
|
||||
#else
|
||||
coarseSmoother_.reset(ConstructionTraits<Smoother>::construct(cargs));
|
||||
#endif
|
||||
|
||||
scalarProduct_ = createScalarProduct<X>(cargs.getComm(),category());
|
||||
|
||||
|
||||
typedef DirectSolverSelector< typename M::matrix_type, X > SolverSelector;
|
||||
|
||||
// Use superlu if we are purely sequential or with only one processor on the coarsest level.
|
||||
@ -660,13 +643,8 @@ namespace Dune
|
||||
matrices_->parallelInformation().coarsest()->copyOwnerToAll(x,x);
|
||||
|
||||
|
||||
#if DUNE_VERSION_NEWER( DUNE_ISTL, 2, 7)
|
||||
typedef std::shared_ptr< Range > RangePtr ;
|
||||
typedef std::shared_ptr< Domain > DomainPtr;
|
||||
#else
|
||||
typedef Range* RangePtr;
|
||||
typedef Domain* DomainPtr;
|
||||
#endif
|
||||
|
||||
// Hierarchy takes ownership of pointers
|
||||
RangePtr copy( new Range(b) );
|
||||
|
@ -73,12 +73,7 @@ private:
|
||||
unsigned int getColIdx(unsigned int idx);
|
||||
|
||||
public:
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
using UMFPackIndex = SuiteSparse_long;
|
||||
#else
|
||||
using UMFPackIndex = int;
|
||||
#endif
|
||||
|
||||
#if HAVE_CUDA
|
||||
/// Set a cudaStream to be used
|
||||
|
@ -53,11 +53,7 @@ class WellContributions
|
||||
public:
|
||||
static std::unique_ptr<WellContributions> create(const std::string& accelerator_mode, bool useWellConn);
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
using UMFPackIndex = SuiteSparse_long;
|
||||
#else
|
||||
using UMFPackIndex = int;
|
||||
#endif
|
||||
/// StandardWell has C, D and B matrices that need to be copied
|
||||
enum class MatrixType {
|
||||
C,
|
||||
|
@ -299,12 +299,8 @@ void CPR<block_size>::create_preconditioner_amg(BlockedMatrix *mat_) {
|
||||
}
|
||||
|
||||
dune_op = std::make_shared<MatrixOperator>(*dune_coarse);
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
Dune::Amg::SequentialInformation seqinfo;
|
||||
dune_amg = std::make_unique<DuneAmg>(dune_op, Dune::stackobject_to_shared_ptr(seqinfo));
|
||||
#else
|
||||
dune_amg = std::make_unique<DuneAmg>(*dune_op);
|
||||
#endif
|
||||
|
||||
Opm::PropertyTree property_tree;
|
||||
property_tree.put("alpha", 0.333333333333);
|
||||
|
@ -22,12 +22,7 @@
|
||||
|
||||
#include <mutex>
|
||||
|
||||
#include <dune/common/version.hh>
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
#include <dune/istl/paamg/matrixhierarchy.hh>
|
||||
#else
|
||||
#include <dune/istl/paamg/hierarchy.hh>
|
||||
#endif
|
||||
#include <dune/istl/umfpack.hh>
|
||||
|
||||
#include <opm/simulators/linalg/bda/opencl/opencl.hpp>
|
||||
|
@ -23,16 +23,13 @@
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/common/parallel/mpihelper.hh>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
namespace Parallel
|
||||
{
|
||||
namespace Opm {
|
||||
namespace Parallel {
|
||||
|
||||
using MPIComm = typename Dune::MPIHelper::MPICommunicator;
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
|
||||
using Communication = Dune::Communication<MPIComm>;
|
||||
#else
|
||||
using Communication = Dune::CollectiveCommunication<MPIComm>;
|
||||
#endif
|
||||
|
||||
} // namespace Parallel
|
||||
} // end namespace Opm
|
||||
|
||||
#endif // OPM_PARALLELCOMMUNICATION_HEADER_INCLUDED
|
||||
|
@ -60,11 +60,7 @@ protected:
|
||||
using GroupRateMap =
|
||||
std::map<std::string, GroupRates>;
|
||||
using GroupIdxMap = std::map<std::string, int>;
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
|
||||
using Communication = Dune::Communication<Dune::MPIHelper::MPICommunicator>;
|
||||
#else
|
||||
using Communication = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>;
|
||||
#endif
|
||||
|
||||
// TODO: same definition with WellInterface, and
|
||||
// WellState eventually they should go to a common header file.
|
||||
|
@ -185,11 +185,7 @@ invDX(const MatrixType& D, VectorType x, DeferredLogger& deferred_logger)
|
||||
Dune::MatrixAdapter<MatrixType, VectorType, VectorType> linearOperator(D);
|
||||
|
||||
// Sequential incomplete LU decomposition as the preconditioner
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
Dune::SeqILU<MatrixType, VectorType, VectorType> preconditioner(D, 1.0);
|
||||
#else
|
||||
Dune::SeqILU0<MatrixType, VectorType, VectorType> preconditioner(D, 1.0);
|
||||
#endif
|
||||
// Dune::SeqILUn<MatrixType, VectorType, VectorType> preconditioner(D, 1, 0.92);
|
||||
// Dune::SeqGS<MatrixType, VectorType, VectorType> preconditioner(D, 1, 1);
|
||||
// Dune::SeqJac<MatrixType, VectorType, VectorType> preconditioner(D, 1, 1);
|
||||
|
@ -29,14 +29,8 @@
|
||||
#error "This file needs to compiled with MPI support!"
|
||||
#endif
|
||||
|
||||
#include <dune/common/version.hh>
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
|
||||
#include <dune/common/parallel/mpicommunication.hh>
|
||||
#include <dune/common/parallel/communication.hh>
|
||||
#else
|
||||
#include <dune/common/parallel/mpicollectivecommunication.hh>
|
||||
#include <dune/common/parallel/collectivecommunication.hh>
|
||||
#endif
|
||||
|
||||
#include <dune/common/parallel/indexset.hh>
|
||||
#include <dune/common/parallel/communicator.hh>
|
||||
|
@ -144,11 +144,7 @@
|
||||
template<class T>
|
||||
std::tuple<T,int,int> PackUnpack(T& in)
|
||||
{
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
|
||||
const auto& comm = Dune::MPIHelper::getCommunication();
|
||||
#else
|
||||
const auto& comm = Dune::MPIHelper::getCollectiveCommunication();
|
||||
#endif
|
||||
|
||||
Opm::EclMpiSerializer ser(comm);
|
||||
ser.pack(in);
|
||||
|
@ -31,12 +31,7 @@
|
||||
#include <dune/common/unused.hh>
|
||||
#include <dune/common/parallel/indexset.hh>
|
||||
#include <dune/common/parallel/plocalindex.hh>
|
||||
#include <dune/common/version.hh>
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
|
||||
#include <dune/common/parallel/communication.hh>
|
||||
#else
|
||||
#include <dune/common/parallel/collectivecommunication.hh>
|
||||
#endif
|
||||
#include <dune/istl/bcrsmatrix.hh>
|
||||
#include <dune/istl/owneroverlapcopy.hh>
|
||||
#include <dune/istl/schwarz.hh>
|
||||
@ -277,11 +272,7 @@ void runBlackoilAmgLaplace()
|
||||
typedef Dune::OwnerOverlapCopyCommunication<GlobalId> Communication;
|
||||
typedef Dune::OverlappingSchwarzOperator<BCRSMat,Vector,Vector,Communication> Operator;
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
|
||||
const auto& ccomm = Dune::MPIHelper::getCommunication();
|
||||
#else
|
||||
const auto& ccomm = Dune::MPIHelper::getCollectiveCommunication();
|
||||
#endif
|
||||
|
||||
Communication comm(ccomm);
|
||||
int n=0;
|
||||
|
@ -58,11 +58,7 @@ init_unit_test_func()
|
||||
|
||||
BOOST_AUTO_TEST_CASE(BroadCast)
|
||||
{
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
|
||||
const auto& cc = Dune::MPIHelper::getCommunication();
|
||||
#else
|
||||
const auto& cc = Dune::MPIHelper::getCollectiveCommunication();
|
||||
#endif
|
||||
|
||||
std::vector<double> d(3);
|
||||
if (cc.rank() == 1)
|
||||
|
@ -5,7 +5,6 @@
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/common/fvector.hh>
|
||||
#include <dune/istl/bcrsmatrix.hh>
|
||||
#include <dune/istl/matrixmarket.hh>
|
||||
@ -14,11 +13,7 @@
|
||||
|
||||
BOOST_AUTO_TEST_CASE(testcsrtocscoffsetmap){
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
|
||||
using Matrix = Dune::BCRSMatrix<double>;
|
||||
#else
|
||||
using Matrix = Dune::BCRSMatrix<Dune::FieldMatrix<double,1,1>>;
|
||||
#endif
|
||||
|
||||
Matrix matrix;
|
||||
{
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <dune/common/version.hh>
|
||||
#include <opm/simulators/utils/gatherDeferredLogger.hpp>
|
||||
#include <dune/common/parallel/mpihelper.hh>
|
||||
|
||||
@ -81,11 +80,7 @@ void initLogger(std::ostringstream& log_stream) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(NoMessages)
|
||||
{
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
|
||||
const auto& cc = Dune::MPIHelper::getCommunication();
|
||||
#else
|
||||
const auto& cc = Dune::MPIHelper::getCollectiveCommunication();
|
||||
#endif
|
||||
std::ostringstream log_stream;
|
||||
initLogger(log_stream);
|
||||
|
||||
@ -107,11 +102,7 @@ BOOST_AUTO_TEST_CASE(NoMessages)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(VariableNumberOfMessages)
|
||||
{
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
|
||||
const auto& cc = Dune::MPIHelper::getCommunication();
|
||||
#else
|
||||
const auto& cc = Dune::MPIHelper::getCollectiveCommunication();
|
||||
#endif
|
||||
|
||||
std::ostringstream log_stream;
|
||||
initLogger(log_stream);
|
||||
@ -149,11 +140,7 @@ BOOST_AUTO_TEST_CASE(VariableNumberOfMessages)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(AllHaveOneMessage)
|
||||
{
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
|
||||
const auto& cc = Dune::MPIHelper::getCommunication();
|
||||
#else
|
||||
const auto& cc = Dune::MPIHelper::getCollectiveCommunication();
|
||||
#endif
|
||||
|
||||
std::ostringstream log_stream;
|
||||
initLogger(log_stream);
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include<dune/istl/bcrsmatrix.hh>
|
||||
#include<dune/istl/bvector.hh>
|
||||
#include<dune/common/version.hh>
|
||||
#include<dune/common/fmatrix.hh>
|
||||
#include<dune/common/fvector.hh>
|
||||
#include<opm/simulators/linalg/ParallelOverlappingILU0.hpp>
|
||||
|
@ -103,11 +103,7 @@ struct GlobalFixture {
|
||||
Dune::MPIHelper::instance(argcDummy, argvDummy);
|
||||
#endif
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
|
||||
Opm::FlowMainEbos<Opm::Properties::TTag::EclFlowProblem>::setupParameters_(argcDummy, argvDummy, Dune::MPIHelper::getCommunication());
|
||||
#else
|
||||
Opm::FlowMainEbos<Opm::Properties::TTag::EclFlowProblem>::setupParameters_(argcDummy, argvDummy, Dune::MPIHelper::getCollectiveCommunication());
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user