changed: explicitly instance with and without dune-fem

in preparation for making dune-fem typetag configurable
This commit is contained in:
Arne Morten Kvarving 2023-08-10 13:43:44 +02:00
parent 2529eec715
commit a6aa80668a
8 changed files with 100 additions and 96 deletions

View File

@ -35,6 +35,10 @@
namespace Opm { namespace Opm {
template class CollectDataToIORank<Dune::CpGrid,
Dune::CpGrid,
Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>>;
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
template class CollectDataToIORank<Dune::CpGrid, template class CollectDataToIORank<Dune::CpGrid,
Dune::CpGrid, Dune::CpGrid,
@ -46,10 +50,6 @@ template class CollectDataToIORank<Dune::CpGrid,
Dune::CpGrid, Dune::CpGrid,
Dune::PartitionIteratorType(4), Dune::PartitionIteratorType(4),
false> > >; false> > >;
#else // ! HAVE_DUNE_FEM #endif // HAVE_DUNE_FEM
template class CollectDataToIORank<Dune::CpGrid,
Dune::CpGrid,
Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>>;
#endif
} // end namespace Opm } // end namespace Opm

View File

@ -493,44 +493,44 @@ computeCellThickness(const typename GridView::template Codim<0>::Entity& element
zz2 /=4; zz2 /=4;
return zz2-zz1; return zz2-zz1;
} }
template class EclGenericCpGridVanguard<
Dune::MultipleCodimMultipleGeomTypeMapper<
Dune::GridView<
Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>>,
Dune::GridView<
Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>,
double>;
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
template class EclGenericCpGridVanguard< template class EclGenericCpGridVanguard<
Dune::MultipleCodimMultipleGeomTypeMapper< Dune::MultipleCodimMultipleGeomTypeMapper<
Dune::GridView<
Dune::Fem::GridPart2GridViewTraits<
Dune::Fem::AdaptiveLeafGridPart<
Dune::CpGrid,
Dune::PartitionIteratorType(4),
false>>>>,
Dune::GridView< Dune::GridView<
Dune::Fem::GridPart2GridViewTraits< Dune::Fem::GridPart2GridViewTraits<
Dune::Fem::AdaptiveLeafGridPart< Dune::Fem::AdaptiveLeafGridPart<
Dune::CpGrid, Dune::CpGrid,
Dune::PartitionIteratorType(4), Dune::PartitionIteratorType(4),
false>>>, false>>>>,
double>; Dune::GridView<
Dune::Fem::GridPart2GridViewTraits<
Dune::Fem::AdaptiveLeafGridPart<
Dune::CpGrid,
Dune::PartitionIteratorType(4),
false>>>,
double>;
template class EclGenericCpGridVanguard< template class EclGenericCpGridVanguard<
Dune::MultipleCodimMultipleGeomTypeMapper< Dune::MultipleCodimMultipleGeomTypeMapper<
Dune::Fem::GridPart2GridViewImpl<
Dune::Fem::AdaptiveLeafGridPart<
Dune::CpGrid,
Dune::PartitionIteratorType(4),
false>>>,
Dune::Fem::GridPart2GridViewImpl< Dune::Fem::GridPart2GridViewImpl<
Dune::Fem::AdaptiveLeafGridPart< Dune::Fem::AdaptiveLeafGridPart<
Dune::CpGrid, Dune::CpGrid,
Dune::PartitionIteratorType(4), Dune::PartitionIteratorType(4),
false> >, false>>>,
double>; Dune::Fem::GridPart2GridViewImpl<
#else Dune::Fem::AdaptiveLeafGridPart<
template class EclGenericCpGridVanguard< Dune::CpGrid,
Dune::MultipleCodimMultipleGeomTypeMapper< Dune::PartitionIteratorType(4),
Dune::GridView< false> >,
Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>>, double>;
Dune::GridView< #endif // HAVE_DUNE_FEM
Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>,
double>;
#endif
} // namespace Opm } // namespace Opm

View File

@ -40,6 +40,10 @@
namespace Opm { namespace Opm {
template class EclGenericProblem<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>,
BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,
double>;
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
template class EclGenericProblem<Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>, template class EclGenericProblem<Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>,
BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>, BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,
@ -51,10 +55,6 @@ template class EclGenericProblem<Dune::Fem::GridPart2GridViewImpl<
false> >, false> >,
BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>, BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,
double>; double>;
#else #endif // HAVE_DUNE_FEM
template class EclGenericProblem<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>,
BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,
double>;
#endif
} // end namespace Opm } // end namespace Opm

View File

@ -36,6 +36,11 @@
namespace Opm { namespace Opm {
template class EclGenericThresholdPressure<Dune::CpGrid,
Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>,
Dune::MultipleCodimMultipleGeomTypeMapper<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>>,
double>;
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
template class EclGenericThresholdPressure<Dune::CpGrid, template class EclGenericThresholdPressure<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>>>,
@ -54,12 +59,6 @@ template class EclGenericThresholdPressure<Dune::CpGrid,
Dune::PartitionIteratorType(4), Dune::PartitionIteratorType(4),
false>>>, false>>>,
double>; double>;
#else #endif // HAVE_DUNE_FEM
template class EclGenericThresholdPressure<Dune::CpGrid,
Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>,
Dune::MultipleCodimMultipleGeomTypeMapper<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>>,
double>;
#endif
} // namespace Opm } // namespace Opm

View File

@ -31,6 +31,12 @@
namespace Opm { namespace Opm {
template class EclGenericTracerModel<Dune::CpGrid,
Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>,
Dune::MultipleCodimMultipleGeomTypeMapper<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>>,
Opm::EcfvStencil<double,Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>,false,false>,
double>;
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
template class EclGenericTracerModel<Dune::CpGrid, template class EclGenericTracerModel<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>>>,
@ -46,12 +52,6 @@ template class EclGenericTracerModel<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>;
#else #endif // HAVE_DUNE_FEM
template class EclGenericTracerModel<Dune::CpGrid,
Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>,
Dune::MultipleCodimMultipleGeomTypeMapper<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>>,
Opm::EcfvStencil<double,Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>,false,false>,
double>;
#endif //HAVE_DUNE_FEM
} // namespace Opm } // namespace Opm

View File

@ -38,6 +38,12 @@
namespace Opm { namespace Opm {
template class EclGenericWriter<Dune::CpGrid,
Dune::CpGrid,
Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>,
Dune::MultipleCodimMultipleGeomTypeMapper<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>>,
double>;
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
template class EclGenericWriter<Dune::CpGrid, template class EclGenericWriter<Dune::CpGrid,
Dune::CpGrid, Dune::CpGrid,
@ -57,12 +63,6 @@ template class EclGenericWriter<Dune::CpGrid,
Dune::PartitionIteratorType(4), Dune::PartitionIteratorType(4),
false>>>, false>>>,
double>; double>;
#else // !HAVE_DUNE_FEM #endif // HAVE_DUNE_FEM*/
template class EclGenericWriter<Dune::CpGrid,
Dune::CpGrid,
Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>,
Dune::MultipleCodimMultipleGeomTypeMapper<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>>,
double>;
#endif // HAVE_DUNE_FEM
} // namespace Opm } // namespace Opm

View File

@ -35,6 +35,12 @@
namespace Opm { namespace Opm {
template class EclTransmissibility<Dune::CpGrid,
Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>,
Dune::MultipleCodimMultipleGeomTypeMapper<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>>,
Dune::CartesianIndexMapper<Dune::CpGrid>,
double>;
#ifdef HAVE_DUNE_FEM #ifdef HAVE_DUNE_FEM
template class EclTransmissibility<Dune::CpGrid, template class EclTransmissibility<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>>>,
@ -55,12 +61,6 @@ template class EclTransmissibility<Dune::CpGrid,
false> > >, false> > >,
Dune::CartesianIndexMapper<Dune::CpGrid>, Dune::CartesianIndexMapper<Dune::CpGrid>,
double>; double>;
#else // !DUNE_FEM #endif // HAVE_DUNE_FEM
template class EclTransmissibility<Dune::CpGrid,
Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>,
Dune::MultipleCodimMultipleGeomTypeMapper<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>>,
Dune::CartesianIndexMapper<Dune::CpGrid>,
double>;
#endif //HAVE_DUNE_FEM
} // namespace Opm } // namespace Opm

View File

@ -37,37 +37,42 @@ namespace Opm {
namespace EQUIL { namespace EQUIL {
namespace DeckDependent { namespace DeckDependent {
#if HAVE_DUNE_FEM
using GridView = Dune::Fem::GridPart2GridViewImpl<
Dune::Fem::AdaptiveLeafGridPart<
Dune::CpGrid,
Dune::PartitionIteratorType(4),
false>>;
#else
using GridView = Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>;
#endif
using Mapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
template class InitialStateComputer<BlackOilFluidSystem<double>,
Dune::CpGrid,
GridView,
Mapper,
Dune::CartesianIndexMapper<Dune::CpGrid>>;
using MatLaw = EclMaterialLawManager<ThreePhaseMaterialTraits<double,0,1,2>>; using MatLaw = EclMaterialLawManager<ThreePhaseMaterialTraits<double,0,1,2>>;
template InitialStateComputer<BlackOilFluidSystem<double>,
Dune::CpGrid, #define INSTANCE_COMP(GridView, Mapper) \
GridView, template class InitialStateComputer<BlackOilFluidSystem<double>, \
Mapper, Dune::CpGrid, \
Dune::CartesianIndexMapper<Dune::CpGrid>>:: GridView, \
InitialStateComputer(MatLaw&, Mapper, \
const EclipseState&, Dune::CartesianIndexMapper<Dune::CpGrid>>; \
const Dune::CpGrid&, template InitialStateComputer<BlackOilFluidSystem<double>, \
const GridView&, Dune::CpGrid, \
const Dune::CartesianIndexMapper<Dune::CpGrid>&, GridView, \
const double, Mapper, \
const int, Dune::CartesianIndexMapper<Dune::CpGrid>>::\
const bool); InitialStateComputer(MatLaw&, \
const EclipseState&, \
const Dune::CpGrid&, \
const GridView&, \
const Dune::CartesianIndexMapper<Dune::CpGrid>&, \
const double, \
const int, \
const bool);
using GridView = Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>;
using Mapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
INSTANCE_COMP(GridView, Mapper)
#if HAVE_DUNE_FEM
using GridViewFem = Dune::Fem::GridPart2GridViewImpl<
Dune::Fem::AdaptiveLeafGridPart<
Dune::CpGrid,
Dune::PartitionIteratorType(4),
false>>;
using MapperFem = Dune::MultipleCodimMultipleGeomTypeMapper<GridViewFem>;
INSTANCE_COMP(GridViewFem, MapperFem)
#endif // HAVE_DUNE_FEM
} // namespace DeckDependent } // namespace DeckDependent
namespace Details { namespace Details {