Merge pull request #5363 from akva2/support_dune_fem_2.9

fixed: build with dune-fem 2.9
This commit is contained in:
Bård Skaflestad 2024-05-21 11:22:40 +02:00 committed by GitHub
commit c5810d722b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 125 additions and 1 deletions

View File

@ -27,8 +27,11 @@
#include <opm/grid/CpGrid.hpp> #include <opm/grid/CpGrid.hpp>
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
#include <dune/common/version.hh>
#include <dune/fem/gridpart/adaptiveleafgridpart.hh> #include <dune/fem/gridpart/adaptiveleafgridpart.hh>
#if !DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
#include <dune/fem/gridpart/common/gridpart2gridview.hh> #include <dune/fem/gridpart/common/gridpart2gridview.hh>
#endif
#include <opm/simulators/flow/FemCpGridCompat.hpp> #include <opm/simulators/flow/FemCpGridCompat.hpp>
#endif // HAVE_DUNE_FEM #endif // HAVE_DUNE_FEM
@ -39,6 +42,14 @@ template class CollectDataOnIORank<Dune::CpGrid,
Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>>; Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>>;
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
#if DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
using GV = Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid,
(Dune::PartitionIteratorType)4,
false>;
template class CollectDataOnIORank<Dune::CpGrid,
Dune::CpGrid,
GV>;
#else
template class CollectDataOnIORank<Dune::CpGrid, template class CollectDataOnIORank<Dune::CpGrid,
Dune::CpGrid, Dune::CpGrid,
Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>>; Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>>;
@ -49,6 +60,7 @@ template class CollectDataOnIORank<Dune::CpGrid,
Dune::CpGrid, Dune::CpGrid,
Dune::PartitionIteratorType(4), Dune::PartitionIteratorType(4),
false> > >; false> > >;
#endif
#endif // HAVE_DUNE_FEM #endif // HAVE_DUNE_FEM
} // end namespace Opm } // end namespace Opm

View File

@ -30,8 +30,11 @@
#include <opm/simulators/flow/EclGenericWriter_impl.hpp> #include <opm/simulators/flow/EclGenericWriter_impl.hpp>
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
#include <dune/common/version.hh>
#include <dune/fem/gridpart/adaptiveleafgridpart.hh> #include <dune/fem/gridpart/adaptiveleafgridpart.hh>
#if !DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
#include <dune/fem/gridpart/common/gridpart2gridview.hh> #include <dune/fem/gridpart/common/gridpart2gridview.hh>
#endif
#include <opm/simulators/flow/FemCpGridCompat.hpp> #include <opm/simulators/flow/FemCpGridCompat.hpp>
#endif // HAVE_DUNE_FEM #endif // HAVE_DUNE_FEM
@ -44,6 +47,16 @@ template class EclGenericWriter<Dune::CpGrid,
double>; double>;
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
#if DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
using GV = Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid,
(Dune::PartitionIteratorType)4,
false>;
template class EclGenericWriter<Dune::CpGrid,
Dune::CpGrid,
GV,
Dune::MultipleCodimMultipleGeomTypeMapper<GV>,
double>;
#else
template class EclGenericWriter<Dune::CpGrid, template class EclGenericWriter<Dune::CpGrid,
Dune::CpGrid, Dune::CpGrid,
Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>, Dune::MultipleCodimMultipleGeomTypeMapper<Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>>, Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>, Dune::MultipleCodimMultipleGeomTypeMapper<Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>>,
@ -62,6 +75,7 @@ template class EclGenericWriter<Dune::CpGrid,
Dune::PartitionIteratorType(4), Dune::PartitionIteratorType(4),
false>>>, false>>>,
double>; double>;
#endif
#endif // HAVE_DUNE_FEM*/ #endif // HAVE_DUNE_FEM*/
} // namespace Opm } // namespace Opm

View File

@ -34,7 +34,9 @@
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
#include <dune/common/version.hh> #include <dune/common/version.hh>
#include <dune/fem/gridpart/common/gridpart.hh> #include <dune/fem/gridpart/common/gridpart.hh>
#if !DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
#include <dune/fem/misc/compatibility.hh> #include <dune/fem/misc/compatibility.hh>
#endif
#include <dune/fem/io/streams/streams.hh> #include <dune/fem/io/streams/streams.hh>
namespace Dune { namespace Dune {

View File

@ -33,8 +33,11 @@
#include <opm/simulators/flow/FlowGenericProblem_impl.hpp> #include <opm/simulators/flow/FlowGenericProblem_impl.hpp>
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
#include <dune/common/version.hh>
#include <dune/fem/gridpart/adaptiveleafgridpart.hh> #include <dune/fem/gridpart/adaptiveleafgridpart.hh>
#if !DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
#include <dune/fem/gridpart/common/gridpart2gridview.hh> #include <dune/fem/gridpart/common/gridpart2gridview.hh>
#endif
#include <opm/simulators/flow/FemCpGridCompat.hpp> #include <opm/simulators/flow/FemCpGridCompat.hpp>
#endif // HAVE_DUNE_FEM #endif // HAVE_DUNE_FEM
@ -44,6 +47,13 @@ template class FlowGenericProblem<Dune::GridView<Dune::DefaultLeafGridViewTraits
BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>>; BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>>;
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
#if DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
using GV = Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid,
(Dune::PartitionIteratorType)4,
false>;
template class FlowGenericProblem<GV,
BlackOilFluidSystem<double, BlackOilDefaultIndexTraits>>;
#else
template class FlowGenericProblem<Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>, template class FlowGenericProblem<Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>,
BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>>; BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>>;
template class FlowGenericProblem<Dune::Fem::GridPart2GridViewImpl< template class FlowGenericProblem<Dune::Fem::GridPart2GridViewImpl<
@ -52,6 +62,7 @@ template class FlowGenericProblem<Dune::Fem::GridPart2GridViewImpl<
Dune::PartitionIteratorType(4), Dune::PartitionIteratorType(4),
false> >, false> >,
BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>>; BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>>;
#endif
#endif // HAVE_DUNE_FEM #endif // HAVE_DUNE_FEM
} // end namespace Opm } // end namespace Opm

View File

@ -48,7 +48,9 @@
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
#include <dune/fem/gridpart/adaptiveleafgridpart.hh> #include <dune/fem/gridpart/adaptiveleafgridpart.hh>
#if !DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
#include <dune/fem/gridpart/common/gridpart2gridview.hh> #include <dune/fem/gridpart/common/gridpart2gridview.hh>
#endif
#include <opm/simulators/flow/FemCpGridCompat.hpp> #include <opm/simulators/flow/FemCpGridCompat.hpp>
#endif //HAVE_DUNE_FEM #endif //HAVE_DUNE_FEM
@ -588,6 +590,14 @@ template class GenericCpGridVanguard<
double>; double>;
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
#if DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
using GV = Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid,
(Dune::PartitionIteratorType)4,
false>;
template class GenericCpGridVanguard<Dune::MultipleCodimMultipleGeomTypeMapper<GV>,
GV,
double>;
#else
template class GenericCpGridVanguard< template class GenericCpGridVanguard<
Dune::MultipleCodimMultipleGeomTypeMapper< Dune::MultipleCodimMultipleGeomTypeMapper<
Dune::GridView< Dune::GridView<
@ -617,6 +627,7 @@ template class GenericCpGridVanguard<
Dune::PartitionIteratorType(4), Dune::PartitionIteratorType(4),
false> >, false> >,
double>; double>;
#endif
#endif // HAVE_DUNE_FEM #endif // HAVE_DUNE_FEM
} // namespace Opm } // namespace Opm

View File

@ -28,8 +28,11 @@
#include <opm/simulators/flow/GenericThresholdPressure_impl.hpp> #include <opm/simulators/flow/GenericThresholdPressure_impl.hpp>
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
#include <dune/common/version.hh>
#include <dune/fem/gridpart/adaptiveleafgridpart.hh> #include <dune/fem/gridpart/adaptiveleafgridpart.hh>
#if !DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
#include <dune/fem/gridpart/common/gridpart2gridview.hh> #include <dune/fem/gridpart/common/gridpart2gridview.hh>
#endif
#include <opm/simulators/flow/FemCpGridCompat.hpp> #include <opm/simulators/flow/FemCpGridCompat.hpp>
#endif // HAVE_DUNE_FEM #endif // HAVE_DUNE_FEM
@ -41,6 +44,15 @@ template class GenericThresholdPressure<Dune::CpGrid,
double>; double>;
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
#if DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
using GV = Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid,
(Dune::PartitionIteratorType)4,
false>;
template class GenericThresholdPressure<Dune::CpGrid,
GV,
Dune::MultipleCodimMultipleGeomTypeMapper<GV>,
double>;
#else
template class GenericThresholdPressure<Dune::CpGrid, template class GenericThresholdPressure<Dune::CpGrid,
Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>, Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>,
Dune::MultipleCodimMultipleGeomTypeMapper<Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>>, Dune::MultipleCodimMultipleGeomTypeMapper<Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>>,
@ -58,6 +70,7 @@ template class GenericThresholdPressure<Dune::CpGrid,
Dune::PartitionIteratorType(4), Dune::PartitionIteratorType(4),
false>>>, false>>>,
double>; double>;
#endif
#endif // HAVE_DUNE_FEM #endif // HAVE_DUNE_FEM
} // namespace Opm } // namespace Opm

View File

@ -25,8 +25,11 @@
#include <opm/simulators/flow/GenericTracerModel_impl.hpp> #include <opm/simulators/flow/GenericTracerModel_impl.hpp>
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
#include <dune/common/version.hh>
#include <dune/fem/gridpart/adaptiveleafgridpart.hh> #include <dune/fem/gridpart/adaptiveleafgridpart.hh>
#if !DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
#include <dune/fem/gridpart/common/gridpart2gridview.hh> #include <dune/fem/gridpart/common/gridpart2gridview.hh>
#endif
#include <opm/simulators/flow/FemCpGridCompat.hpp> #include <opm/simulators/flow/FemCpGridCompat.hpp>
#endif // HAVE_DUNE_FEM #endif // HAVE_DUNE_FEM
@ -39,6 +42,16 @@ template class GenericTracerModel<Dune::CpGrid,
double>; double>;
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
#if DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
using GV = Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid,
(Dune::PartitionIteratorType)4,
false>;
template class GenericTracerModel<Dune::CpGrid,
GV,
Dune::MultipleCodimMultipleGeomTypeMapper<GV>,
EcfvStencil<double, GV, false, false>,
double>;
#else
template class GenericTracerModel<Dune::CpGrid, template class GenericTracerModel<Dune::CpGrid,
Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>, Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>,
Dune::MultipleCodimMultipleGeomTypeMapper<Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>>, Dune::MultipleCodimMultipleGeomTypeMapper<Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>>,
@ -53,6 +66,7 @@ template class GenericTracerModel<Dune::CpGrid,
Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false> >, Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false> >,
false, false>, false, false>,
double>; double>;
#endif
#endif // HAVE_DUNE_FEM #endif // HAVE_DUNE_FEM
} // namespace Opm } // namespace Opm

View File

@ -28,8 +28,11 @@
#include <opm/simulators/flow/Transmissibility_impl.hpp> #include <opm/simulators/flow/Transmissibility_impl.hpp>
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
#include <dune/common/version.hh>
#include <dune/fem/gridpart/adaptiveleafgridpart.hh> #include <dune/fem/gridpart/adaptiveleafgridpart.hh>
#if !DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
#include <dune/fem/gridpart/common/gridpart2gridview.hh> #include <dune/fem/gridpart/common/gridpart2gridview.hh>
#endif
#include <opm/simulators/flow/FemCpGridCompat.hpp> #include <opm/simulators/flow/FemCpGridCompat.hpp>
#endif #endif
@ -42,6 +45,16 @@ template class Transmissibility<Dune::CpGrid,
double>; double>;
#ifdef HAVE_DUNE_FEM #ifdef HAVE_DUNE_FEM
#if DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
using GV = Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid,
(Dune::PartitionIteratorType)4,
false>;
template class Transmissibility<Dune::CpGrid,
GV,
Dune::MultipleCodimMultipleGeomTypeMapper<GV>,
Dune::CartesianIndexMapper<Dune::CpGrid>,
double>;
#else
template class Transmissibility<Dune::CpGrid, template class Transmissibility<Dune::CpGrid,
Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>, Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>,
Dune::MultipleCodimMultipleGeomTypeMapper<Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>>, Dune::MultipleCodimMultipleGeomTypeMapper<Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>>,
@ -61,6 +74,7 @@ template class Transmissibility<Dune::CpGrid,
false> > >, false> > >,
Dune::CartesianIndexMapper<Dune::CpGrid>, Dune::CartesianIndexMapper<Dune::CpGrid>,
double>; double>;
#endif
#endif // HAVE_DUNE_FEM #endif // HAVE_DUNE_FEM
} // namespace Opm } // namespace Opm

View File

@ -27,8 +27,11 @@
#include <opm/grid/CpGrid.hpp> #include <opm/grid/CpGrid.hpp>
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
#include <dune/common/version.hh>
#include <dune/fem/gridpart/adaptiveleafgridpart.hh> #include <dune/fem/gridpart/adaptiveleafgridpart.hh>
#if !DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
#include <dune/fem/gridpart/common/gridpart2gridview.hh> #include <dune/fem/gridpart/common/gridpart2gridview.hh>
#endif
#include <opm/simulators/flow/FemCpGridCompat.hpp> #include <opm/simulators/flow/FemCpGridCompat.hpp>
#endif #endif
@ -63,11 +66,17 @@ using Mapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
INSTANCE_COMP(GridView, Mapper) INSTANCE_COMP(GridView, Mapper)
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
#if DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
using GridViewFem = Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid,
(Dune::PartitionIteratorType)4,
false>;
#else
using GridViewFem = Dune::Fem::GridPart2GridViewImpl< using GridViewFem = Dune::Fem::GridPart2GridViewImpl<
Dune::Fem::AdaptiveLeafGridPart< Dune::Fem::AdaptiveLeafGridPart<
Dune::CpGrid, Dune::CpGrid,
Dune::PartitionIteratorType(4), Dune::PartitionIteratorType(4),
false>>; false>>;
#endif
using MapperFem = Dune::MultipleCodimMultipleGeomTypeMapper<GridViewFem>; using MapperFem = Dune::MultipleCodimMultipleGeomTypeMapper<GridViewFem>;
INSTANCE_COMP(GridViewFem, MapperFem) INSTANCE_COMP(GridViewFem, MapperFem)
#endif // HAVE_DUNE_FEM #endif // HAVE_DUNE_FEM

View File

@ -24,8 +24,11 @@
#include <opm/simulators/utils/DamarisVar.hpp> #include <opm/simulators/utils/DamarisVar.hpp>
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
#include <dune/common/version.hh>
#include <dune/fem/gridpart/adaptiveleafgridpart.hh> #include <dune/fem/gridpart/adaptiveleafgridpart.hh>
#if !DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
#include <dune/fem/gridpart/common/gridpart2gridview.hh> #include <dune/fem/gridpart/common/gridpart2gridview.hh>
#endif
#include <opm/simulators/flow/FemCpGridCompat.hpp> #include <opm/simulators/flow/FemCpGridCompat.hpp>
#endif // HAVE_DUNE_FEM #endif // HAVE_DUNE_FEM
@ -47,8 +50,15 @@ template<class T> using DV = DamarisOutput::DamarisVar<T>;
INSTANCE(1, Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>) INSTANCE(1, Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>)
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
#if DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
using GV = Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid,
(Dune::PartitionIteratorType)4,
false>;
INSTANCE(1, GV)
#else
INSTANCE(1, Dune::Fem::GridPart2GridViewImpl<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, (Dune::PartitionIteratorType)4, false> >) INSTANCE(1, Dune::Fem::GridPart2GridViewImpl<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, (Dune::PartitionIteratorType)4, false> >)
INSTANCE(1, Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>) INSTANCE(1, Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>)
#endif #endif
#endif
} // namespace Opm::GridDataOutput } // namespace Opm::GridDataOutput

View File

@ -256,10 +256,17 @@ BOOST_AUTO_TEST_CASE(FlowGenericProblemFem)
Opm::EclipseState eclState; Opm::EclipseState eclState;
Opm::Schedule schedule; Opm::Schedule schedule;
Dune::CpGrid grid; Dune::CpGrid grid;
#if DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
using GridPart = Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>; using GridPart = Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>;
using GridView = Dune::GridView<GridPart>; using GridView = GridPart::GridViewType;
auto gridPart = GridPart(grid);
auto gridView = gridPart.gridView();
#else
using GridPart = Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>;
using GridView = Dune::GridView<Dune::Fem::GridPart2GridViewTraits<GridPart>>;
auto gridPart = GridPart(grid); auto gridPart = GridPart(grid);
auto gridView = GridView(static_cast<GridView>(gridPart)); auto gridView = GridView(static_cast<GridView>(gridPart));
#endif
auto data_out auto data_out
= Opm::FlowGenericProblem<GridView, Opm::BlackOilFluidSystem<double, Opm::BlackOilDefaultIndexTraits>>:: = Opm::FlowGenericProblem<GridView, Opm::BlackOilFluidSystem<double, Opm::BlackOilDefaultIndexTraits>>::
serializationTestObject(eclState, schedule, gridView); serializationTestObject(eclState, schedule, gridView);
@ -451,10 +458,17 @@ BOOST_AUTO_TEST_CASE(FlowGenericTracerModelFem)
Opm::EclipseState eclState; Opm::EclipseState eclState;
Dune::CartesianIndexMapper<Dune::CpGrid> mapper(grid); Dune::CartesianIndexMapper<Dune::CpGrid> mapper(grid);
auto centroids = [](int) { return std::array<double,Dune::CpGrid::dimensionworld>{}; }; auto centroids = [](int) { return std::array<double,Dune::CpGrid::dimensionworld>{}; };
#if DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
using GridPart = Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>;
using GridView = GridPart::GridViewType;
auto gridPart = GridPart(grid);
auto gridView = gridPart.gridView();
#else
using GridPart = Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>; using GridPart = Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>;
using GridView = Dune::GridView<Dune::Fem::GridPart2GridViewTraits<GridPart>>; using GridView = Dune::GridView<Dune::Fem::GridPart2GridViewTraits<GridPart>>;
auto gridPart = GridPart(grid); auto gridPart = GridPart(grid);
auto gridView = GridView(static_cast<GridView>(gridPart)); auto gridView = GridView(static_cast<GridView>(gridPart));
#endif
Dune::MultipleCodimMultipleGeomTypeMapper<GridView> dofMapper(gridView, Dune::mcmgElementLayout()); Dune::MultipleCodimMultipleGeomTypeMapper<GridView> dofMapper(gridView, Dune::mcmgElementLayout());
auto data_out = GenericTracerModelTest<Dune::CpGrid, auto data_out = GenericTracerModelTest<Dune::CpGrid,
GridView, GridView,