mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-26 19:46:24 -06:00
Merge pull request #4169 from blattms/dune-2.9-fix-deprecations
Dune 2.9 fix deprecations
This commit is contained in:
commit
1eec214c89
@ -64,15 +64,18 @@ public:
|
||||
return codim == 0;
|
||||
}
|
||||
|
||||
#if DUNE_VERSION_LT(DUNE_GRID, 2, 8)
|
||||
bool fixedsize(int /* dim */, int /* codim */) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
|
||||
bool fixedSize(int /* dim */, int /* codim */) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
template<class EntityType>
|
||||
std::size_t size(const EntityType /* entity */) const
|
||||
{
|
||||
|
@ -130,7 +130,12 @@
|
||||
template<class T>
|
||||
std::tuple<T,int,int> PackUnpack(T& in)
|
||||
{
|
||||
auto comm = Dune::MPIHelper::getCollectiveCommunication();
|
||||
#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);
|
||||
size_t pos1 = ser.position();
|
||||
|
@ -75,7 +75,7 @@ void fillValues(int N, M& mat, int overlapStart, int overlapEnd, int start, int
|
||||
|
||||
template<class M, class G, class L, class C, int n>
|
||||
M setupAnisotropic2d(int N, Dune::ParallelIndexSet<G,L,n>& indices,
|
||||
const Dune::CollectiveCommunication<C>& p, int *nout, typename M::block_type::value_type eps=1.0);
|
||||
const C& p, int *nout, typename M::block_type::value_type eps=1.0);
|
||||
|
||||
|
||||
template<class M, class G, class L, int s>
|
||||
@ -218,7 +218,7 @@ void setBoundary(V& lhs, V& rhs, const G& N)
|
||||
}
|
||||
|
||||
template<class M, class G, class L, class C, int s>
|
||||
M setupAnisotropic2d(int N, Dune::ParallelIndexSet<G,L,s>& indices, const Dune::CollectiveCommunication<C>& p, int *nout, typename M::block_type::value_type eps)
|
||||
M setupAnisotropic2d(int N, Dune::ParallelIndexSet<G,L,s>& indices, const C& p, int *nout, typename M::block_type::value_type eps)
|
||||
{
|
||||
int procs=p.size(), rank=p.rank();
|
||||
|
||||
@ -278,7 +278,12 @@ void runBlackoilAmgLaplace()
|
||||
typedef Dune::OverlappingSchwarzOperator<BCRSMat,Vector,Vector,Communication> Operator;
|
||||
int argc;
|
||||
char** argv;
|
||||
const auto& ccomm = Dune::MPIHelper::instance(argc, argv).getCollectiveCommunication();
|
||||
|
||||
#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,7 +58,11 @@ init_unit_test_func()
|
||||
|
||||
BOOST_AUTO_TEST_CASE(BroadCast)
|
||||
{
|
||||
auto cc = Dune::MPIHelper::getCollectiveCommunication();
|
||||
#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)
|
||||
|
@ -81,8 +81,11 @@ void initLogger(std::ostringstream& log_stream) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(NoMessages)
|
||||
{
|
||||
auto cc = Dune::MPIHelper::getCollectiveCommunication();
|
||||
|
||||
#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);
|
||||
|
||||
@ -104,7 +107,11 @@ BOOST_AUTO_TEST_CASE(NoMessages)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(VariableNumberOfMessages)
|
||||
{
|
||||
const Opm::Parallel::Communication& cc = Dune::MPIHelper::getCollectiveCommunication();
|
||||
#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);
|
||||
@ -142,7 +149,11 @@ BOOST_AUTO_TEST_CASE(VariableNumberOfMessages)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(AllHaveOneMessage)
|
||||
{
|
||||
const Opm::Parallel::Communication& cc = Dune::MPIHelper::getCollectiveCommunication();
|
||||
#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);
|
||||
|
@ -102,7 +102,11 @@ 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