mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #5363 from akva2/support_dune_fem_2.9
fixed: build with dune-fem 2.9
This commit is contained in:
commit
c5810d722b
@ -27,8 +27,11 @@
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
|
||||
#if HAVE_DUNE_FEM
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/fem/gridpart/adaptiveleafgridpart.hh>
|
||||
#if !DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
|
||||
#include <dune/fem/gridpart/common/gridpart2gridview.hh>
|
||||
#endif
|
||||
#include <opm/simulators/flow/FemCpGridCompat.hpp>
|
||||
#endif // HAVE_DUNE_FEM
|
||||
|
||||
@ -39,6 +42,14 @@ template class CollectDataOnIORank<Dune::CpGrid,
|
||||
Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>>;
|
||||
|
||||
#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,
|
||||
Dune::CpGrid,
|
||||
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::PartitionIteratorType(4),
|
||||
false> > >;
|
||||
#endif
|
||||
#endif // HAVE_DUNE_FEM
|
||||
|
||||
} // end namespace Opm
|
||||
|
@ -30,8 +30,11 @@
|
||||
#include <opm/simulators/flow/EclGenericWriter_impl.hpp>
|
||||
|
||||
#if HAVE_DUNE_FEM
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/fem/gridpart/adaptiveleafgridpart.hh>
|
||||
#if !DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
|
||||
#include <dune/fem/gridpart/common/gridpart2gridview.hh>
|
||||
#endif
|
||||
#include <opm/simulators/flow/FemCpGridCompat.hpp>
|
||||
#endif // HAVE_DUNE_FEM
|
||||
|
||||
@ -44,6 +47,16 @@ template class EclGenericWriter<Dune::CpGrid,
|
||||
double>;
|
||||
|
||||
#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,
|
||||
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>>>>,
|
||||
@ -62,6 +75,7 @@ template class EclGenericWriter<Dune::CpGrid,
|
||||
Dune::PartitionIteratorType(4),
|
||||
false>>>,
|
||||
double>;
|
||||
#endif
|
||||
#endif // HAVE_DUNE_FEM*/
|
||||
|
||||
} // namespace Opm
|
||||
|
@ -34,7 +34,9 @@
|
||||
#if HAVE_DUNE_FEM
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/fem/gridpart/common/gridpart.hh>
|
||||
#if !DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
|
||||
#include <dune/fem/misc/compatibility.hh>
|
||||
#endif
|
||||
#include <dune/fem/io/streams/streams.hh>
|
||||
|
||||
namespace Dune {
|
||||
|
@ -33,8 +33,11 @@
|
||||
#include <opm/simulators/flow/FlowGenericProblem_impl.hpp>
|
||||
|
||||
#if HAVE_DUNE_FEM
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/fem/gridpart/adaptiveleafgridpart.hh>
|
||||
#if !DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
|
||||
#include <dune/fem/gridpart/common/gridpart2gridview.hh>
|
||||
#endif
|
||||
#include <opm/simulators/flow/FemCpGridCompat.hpp>
|
||||
#endif // HAVE_DUNE_FEM
|
||||
|
||||
@ -44,6 +47,13 @@ template class FlowGenericProblem<Dune::GridView<Dune::DefaultLeafGridViewTraits
|
||||
BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>>;
|
||||
|
||||
#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>>>,
|
||||
BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>>;
|
||||
template class FlowGenericProblem<Dune::Fem::GridPart2GridViewImpl<
|
||||
@ -52,6 +62,7 @@ template class FlowGenericProblem<Dune::Fem::GridPart2GridViewImpl<
|
||||
Dune::PartitionIteratorType(4),
|
||||
false> >,
|
||||
BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>>;
|
||||
#endif
|
||||
#endif // HAVE_DUNE_FEM
|
||||
|
||||
} // end namespace Opm
|
||||
|
@ -48,7 +48,9 @@
|
||||
|
||||
#if HAVE_DUNE_FEM
|
||||
#include <dune/fem/gridpart/adaptiveleafgridpart.hh>
|
||||
#if !DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
|
||||
#include <dune/fem/gridpart/common/gridpart2gridview.hh>
|
||||
#endif
|
||||
#include <opm/simulators/flow/FemCpGridCompat.hpp>
|
||||
#endif //HAVE_DUNE_FEM
|
||||
|
||||
@ -588,6 +590,14 @@ template class GenericCpGridVanguard<
|
||||
double>;
|
||||
|
||||
#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<
|
||||
Dune::MultipleCodimMultipleGeomTypeMapper<
|
||||
Dune::GridView<
|
||||
@ -617,6 +627,7 @@ template class GenericCpGridVanguard<
|
||||
Dune::PartitionIteratorType(4),
|
||||
false> >,
|
||||
double>;
|
||||
#endif
|
||||
#endif // HAVE_DUNE_FEM
|
||||
|
||||
} // namespace Opm
|
||||
|
@ -28,8 +28,11 @@
|
||||
#include <opm/simulators/flow/GenericThresholdPressure_impl.hpp>
|
||||
|
||||
#if HAVE_DUNE_FEM
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/fem/gridpart/adaptiveleafgridpart.hh>
|
||||
#if !DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
|
||||
#include <dune/fem/gridpart/common/gridpart2gridview.hh>
|
||||
#endif
|
||||
#include <opm/simulators/flow/FemCpGridCompat.hpp>
|
||||
#endif // HAVE_DUNE_FEM
|
||||
|
||||
@ -41,6 +44,15 @@ template class GenericThresholdPressure<Dune::CpGrid,
|
||||
double>;
|
||||
|
||||
#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,
|
||||
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),
|
||||
false>>>,
|
||||
double>;
|
||||
#endif
|
||||
#endif // HAVE_DUNE_FEM
|
||||
|
||||
} // namespace Opm
|
||||
|
@ -25,8 +25,11 @@
|
||||
#include <opm/simulators/flow/GenericTracerModel_impl.hpp>
|
||||
|
||||
#if HAVE_DUNE_FEM
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/fem/gridpart/adaptiveleafgridpart.hh>
|
||||
#if !DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
|
||||
#include <dune/fem/gridpart/common/gridpart2gridview.hh>
|
||||
#endif
|
||||
#include <opm/simulators/flow/FemCpGridCompat.hpp>
|
||||
#endif // HAVE_DUNE_FEM
|
||||
|
||||
@ -39,6 +42,16 @@ template class GenericTracerModel<Dune::CpGrid,
|
||||
double>;
|
||||
|
||||
#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,
|
||||
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> >,
|
||||
false, false>,
|
||||
double>;
|
||||
#endif
|
||||
#endif // HAVE_DUNE_FEM
|
||||
|
||||
} // namespace Opm
|
||||
|
@ -28,8 +28,11 @@
|
||||
#include <opm/simulators/flow/Transmissibility_impl.hpp>
|
||||
|
||||
#if HAVE_DUNE_FEM
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/fem/gridpart/adaptiveleafgridpart.hh>
|
||||
#if !DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
|
||||
#include <dune/fem/gridpart/common/gridpart2gridview.hh>
|
||||
#endif
|
||||
#include <opm/simulators/flow/FemCpGridCompat.hpp>
|
||||
#endif
|
||||
|
||||
@ -42,6 +45,16 @@ template class Transmissibility<Dune::CpGrid,
|
||||
double>;
|
||||
|
||||
#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,
|
||||
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> > >,
|
||||
Dune::CartesianIndexMapper<Dune::CpGrid>,
|
||||
double>;
|
||||
#endif
|
||||
#endif // HAVE_DUNE_FEM
|
||||
|
||||
} // namespace Opm
|
||||
|
@ -27,8 +27,11 @@
|
||||
#include <opm/grid/CpGrid.hpp>
|
||||
|
||||
#if HAVE_DUNE_FEM
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/fem/gridpart/adaptiveleafgridpart.hh>
|
||||
#if !DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
|
||||
#include <dune/fem/gridpart/common/gridpart2gridview.hh>
|
||||
#endif
|
||||
#include <opm/simulators/flow/FemCpGridCompat.hpp>
|
||||
#endif
|
||||
|
||||
@ -63,11 +66,17 @@ using Mapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
|
||||
INSTANCE_COMP(GridView, Mapper)
|
||||
|
||||
#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<
|
||||
Dune::Fem::AdaptiveLeafGridPart<
|
||||
Dune::CpGrid,
|
||||
Dune::PartitionIteratorType(4),
|
||||
false>>;
|
||||
#endif
|
||||
using MapperFem = Dune::MultipleCodimMultipleGeomTypeMapper<GridViewFem>;
|
||||
INSTANCE_COMP(GridViewFem, MapperFem)
|
||||
#endif // HAVE_DUNE_FEM
|
||||
|
@ -24,8 +24,11 @@
|
||||
#include <opm/simulators/utils/DamarisVar.hpp>
|
||||
|
||||
#if HAVE_DUNE_FEM
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/fem/gridpart/adaptiveleafgridpart.hh>
|
||||
#if !DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
|
||||
#include <dune/fem/gridpart/common/gridpart2gridview.hh>
|
||||
#endif
|
||||
#include <opm/simulators/flow/FemCpGridCompat.hpp>
|
||||
#endif // HAVE_DUNE_FEM
|
||||
|
||||
@ -47,8 +50,15 @@ template<class T> using DV = DamarisOutput::DamarisVar<T>;
|
||||
INSTANCE(1, Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>)
|
||||
|
||||
#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::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
} // namespace Opm::GridDataOutput
|
||||
|
@ -256,10 +256,17 @@ BOOST_AUTO_TEST_CASE(FlowGenericProblemFem)
|
||||
Opm::EclipseState eclState;
|
||||
Opm::Schedule schedule;
|
||||
Dune::CpGrid grid;
|
||||
#if DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
|
||||
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 gridView = GridView(static_cast<GridView>(gridPart));
|
||||
#endif
|
||||
auto data_out
|
||||
= Opm::FlowGenericProblem<GridView, Opm::BlackOilFluidSystem<double, Opm::BlackOilDefaultIndexTraits>>::
|
||||
serializationTestObject(eclState, schedule, gridView);
|
||||
@ -451,10 +458,17 @@ BOOST_AUTO_TEST_CASE(FlowGenericTracerModelFem)
|
||||
Opm::EclipseState eclState;
|
||||
Dune::CartesianIndexMapper<Dune::CpGrid> mapper(grid);
|
||||
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 GridView = Dune::GridView<Dune::Fem::GridPart2GridViewTraits<GridPart>>;
|
||||
auto gridPart = GridPart(grid);
|
||||
auto gridView = GridView(static_cast<GridView>(gridPart));
|
||||
#endif
|
||||
Dune::MultipleCodimMultipleGeomTypeMapper<GridView> dofMapper(gridView, Dune::mcmgElementLayout());
|
||||
auto data_out = GenericTracerModelTest<Dune::CpGrid,
|
||||
GridView,
|
||||
|
Loading…
Reference in New Issue
Block a user