Transmissibility: optionally instantiate for float

This commit is contained in:
Arne Morten Kvarving 2024-04-12 13:11:09 +02:00
parent 174b73ebd1
commit e0deff8b1e

View File

@ -38,43 +38,71 @@
namespace Opm {
template class Transmissibility<Dune::CpGrid,
Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>,
Dune::MultipleCodimMultipleGeomTypeMapper<Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>>,
Dune::CartesianIndexMapper<Dune::CpGrid>,
double>;
#define INSTANTIATE_TYPE(T) \
template class Transmissibility<Dune::CpGrid, \
Dune::GridView< \
Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>, \
Dune::MultipleCodimMultipleGeomTypeMapper< \
Dune::GridView< \
Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>>, \
Dune::CartesianIndexMapper<Dune::CpGrid>, \
T>;
INSTANTIATE_TYPE(double)
#if FLOW_INSTANTIATE_FLOAT
INSTANTIATE_TYPE(float)
#endif
#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>;
#define INSTANTIATE_FEM_TYPE(T) \
template class Transmissibility<Dune::CpGrid, \
GV, \
Dune::MultipleCodimMultipleGeomTypeMapper<GV>, \
Dune::CartesianIndexMapper<Dune::CpGrid>, \
T>;
#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>>>>,
Dune::CartesianIndexMapper<Dune::CpGrid>,
double>;
template class Transmissibility<Dune::CpGrid,
Dune::Fem::GridPart2GridViewImpl<
Dune::Fem::AdaptiveLeafGridPart<
Dune::CpGrid,
Dune::PartitionIteratorType(4),
false> >,
Dune::MultipleCodimMultipleGeomTypeMapper<
Dune::Fem::GridPart2GridViewImpl<
Dune::Fem::AdaptiveLeafGridPart<
Dune::CpGrid,
Dune::PartitionIteratorType(4),
false> > >,
Dune::CartesianIndexMapper<Dune::CpGrid>,
double>;
#define INSTANTIATE_FEM_TYPE(T) \
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>>>>, \
Dune::CartesianIndexMapper<Dune::CpGrid>, \
T>; \
template class Transmissibility<Dune::CpGrid, \
Dune::Fem::GridPart2GridViewImpl< \
Dune::Fem::AdaptiveLeafGridPart< \
Dune::CpGrid, \
Dune::PartitionIteratorType(4), \
false> >, \
Dune::MultipleCodimMultipleGeomTypeMapper< \
Dune::Fem::GridPart2GridViewImpl< \
Dune::Fem::AdaptiveLeafGridPart< \
Dune::CpGrid, \
Dune::PartitionIteratorType(4), \
false> > >, \
Dune::CartesianIndexMapper<Dune::CpGrid>, \
T>;
#endif
INSTANTIATE_FEM_TYPE(double)
#if FLOW_INSTANTIATE_FLOAT
INSTANTIATE_FEM_TYPE(float)
#endif
#endif // HAVE_DUNE_FEM
} // namespace Opm