GenericCpGridVanguard: optionally instantiate for float

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

View File

@ -588,53 +588,67 @@ computeCellThickness(const typename GridView::template Codim<0>::Entity& element
zz2 /=4; zz2 /=4;
return zz2-zz1; return zz2-zz1;
} }
template class GenericCpGridVanguard<
Dune::MultipleCodimMultipleGeomTypeMapper< #define INSTANTIATE_TYPE(T) \
Dune::GridView< template class GenericCpGridVanguard< \
Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>>, Dune::MultipleCodimMultipleGeomTypeMapper< \
Dune::GridView< Dune::GridView< \
Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>, Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>>, \
double>; Dune::GridView< \
Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>, \
T>;
INSTANTIATE_TYPE(double)
#if FLOW_INSTANTIATE_FLOAT
INSTANTIATE_TYPE(float)
#endif
#if HAVE_DUNE_FEM #if HAVE_DUNE_FEM
#if DUNE_VERSION_GTE(DUNE_FEM, 2, 9) #if DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
using GV = Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, using GV = Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid,
(Dune::PartitionIteratorType)4, (Dune::PartitionIteratorType)4,
false>; false>;
template class GenericCpGridVanguard<Dune::MultipleCodimMultipleGeomTypeMapper<GV>, #define INSTANTIATE_FEM_TYPE(T) \
GV, template class GenericCpGridVanguard<Dune::MultipleCodimMultipleGeomTypeMapper<GV>, \
double>; GV, \
T>;
#else #else
template class GenericCpGridVanguard< #define INSTANTIATE_FEM_TYPE(T) \
Dune::MultipleCodimMultipleGeomTypeMapper< template class GenericCpGridVanguard< \
Dune::GridView< Dune::MultipleCodimMultipleGeomTypeMapper< \
Dune::Fem::GridPart2GridViewTraits< Dune::GridView< \
Dune::Fem::AdaptiveLeafGridPart< Dune::Fem::GridPart2GridViewTraits< \
Dune::CpGrid, Dune::Fem::AdaptiveLeafGridPart< \
Dune::PartitionIteratorType(4), Dune::CpGrid, \
false>>>>, Dune::PartitionIteratorType(4), \
Dune::GridView< false>>>>, \
Dune::Fem::GridPart2GridViewTraits< Dune::GridView< \
Dune::Fem::AdaptiveLeafGridPart< Dune::Fem::GridPart2GridViewTraits< \
Dune::CpGrid, Dune::Fem::AdaptiveLeafGridPart< \
Dune::PartitionIteratorType(4), Dune::CpGrid, \
false>>>, Dune::PartitionIteratorType(4), \
double>; false>>>, \
T>; \
template class GenericCpGridVanguard< template class GenericCpGridVanguard< \
Dune::MultipleCodimMultipleGeomTypeMapper< Dune::MultipleCodimMultipleGeomTypeMapper< \
Dune::Fem::GridPart2GridViewImpl< Dune::Fem::GridPart2GridViewImpl< \
Dune::Fem::AdaptiveLeafGridPart< Dune::Fem::AdaptiveLeafGridPart< \
Dune::CpGrid, Dune::CpGrid, \
Dune::PartitionIteratorType(4), Dune::PartitionIteratorType(4), \
false>>>, 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>; T>;
#endif #endif
INSTANTIATE_FEM_TYPE(double)
#if FLOW_INSTANTIATE_FLOAT
INSTANTIATE_FEM_TYPE(float)
#endif
#endif // HAVE_DUNE_FEM #endif // HAVE_DUNE_FEM
} // namespace Opm } // namespace Opm