Merge pull request #4789 from akva2/no_dunefem_default

Changed: Do not use dune-fem in default simulators even if it is available
This commit is contained in:
Atgeirr Flø Rasmussen 2023-08-11 09:31:23 +02:00 committed by GitHub
commit 659d5efa3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 117 additions and 96 deletions

View File

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

View File

@ -493,9 +493,16 @@ computeCellThickness(const typename GridView::template Codim<0>::Entity& element
zz2 /=4;
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
template class EclGenericCpGridVanguard<
template class EclGenericCpGridVanguard<
Dune::MultipleCodimMultipleGeomTypeMapper<
Dune::GridView<
Dune::Fem::GridPart2GridViewTraits<
@ -511,7 +518,7 @@ computeCellThickness(const typename GridView::template Codim<0>::Entity& element
false>>>,
double>;
template class EclGenericCpGridVanguard<
template class EclGenericCpGridVanguard<
Dune::MultipleCodimMultipleGeomTypeMapper<
Dune::Fem::GridPart2GridViewImpl<
Dune::Fem::AdaptiveLeafGridPart<
@ -524,13 +531,6 @@ computeCellThickness(const typename GridView::template Codim<0>::Entity& element
Dune::PartitionIteratorType(4),
false> >,
double>;
#else
template class EclGenericCpGridVanguard<
Dune::MultipleCodimMultipleGeomTypeMapper<
Dune::GridView<
Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>>,
Dune::GridView<
Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>,
double>;
#endif
#endif // HAVE_DUNE_FEM
} // namespace Opm

View File

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

View File

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

View File

@ -31,6 +31,12 @@
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
template class EclGenericTracerModel<Dune::CpGrid,
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> >,
false, false>,
double>;
#else
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
#endif // HAVE_DUNE_FEM
} // namespace Opm

View File

@ -38,6 +38,12 @@
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
template class EclGenericWriter<Dune::CpGrid,
Dune::CpGrid,
@ -57,12 +63,6 @@ template class EclGenericWriter<Dune::CpGrid,
Dune::PartitionIteratorType(4),
false>>>,
double>;
#else // !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
#endif // HAVE_DUNE_FEM*/
} // namespace Opm

View File

@ -170,6 +170,23 @@ struct LocalLinearizerSplice<TypeTag, TTag::EclBaseProblem> {
using type = TTag::AutoDiffLocalLinearizer;
};
template<class TypeTag>
struct BaseDiscretizationType<TypeTag, TTag::EclBaseProblem> {
using type = FvBaseDiscretizationNoAdapt<TypeTag>;
};
template<class TypeTag>
struct DiscreteFunction<TypeTag, TTag::EclBaseProblem> {
using BaseDiscretization = FvBaseDiscretization<TypeTag>;
using type = typename BaseDiscretization::BlockVectorWrapper;
};
template<class TypeTag>
struct GridView<TypeTag, TTag::EclBaseProblem>
{
using type = typename GetPropType<TypeTag, Properties::Grid>::LeafGridView;
};
// Set the material law for fluid fluxes
template<class TypeTag>
struct MaterialLaw<TypeTag, TTag::EclBaseProblem>

View File

@ -35,6 +35,12 @@
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
template class EclTransmissibility<Dune::CpGrid,
Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>,
@ -55,12 +61,6 @@ template class EclTransmissibility<Dune::CpGrid,
false> > >,
Dune::CartesianIndexMapper<Dune::CpGrid>,
double>;
#else // !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
#endif // HAVE_DUNE_FEM
} // namespace Opm

View File

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