Skip to content
Snippets Groups Projects

Add utility to convert a preBasis to a flat preBasis

Merged Praetorius, Simon requested to merge feature/flat_pre_basis into master
Files
6
@@ -59,7 +59,6 @@ namespace AMDiS
template <class PB>
static type create(PB const& preBasis)
{
warning("Currently only flat index-merging strategies supported.");
auto node = preBasis.makeNode();
node.bind(*preBasis.gridView().template begin<0>());
return {preBasis.gridView(), (unsigned int)(polynomialDegree(node))};
@@ -131,12 +130,12 @@ namespace AMDiS
template <class PreBasis, std::size_t... I>
static type create(PreBasis const& preBasis, std::index_sequence<I...>)
{
warning("Currently only flat index-merging strategies supported.");
test_warning(std::is_same_v<IMS,FIMS>, "Basis converted into flat index-merging strategy.");
return {FlatPreBasis<SPB, MultiIndex>::create(Impl::subPreBasis(preBasis,Dune::index_constant<I>{}))...};
}
};
// specialization for power bases
// specialization for flat power bases
template <class MI, class IMS, class SPB, std::size_t C, class MultiIndex>
struct FlatPreBasis<Dune::Functions::PowerPreBasis<MI, IMS, SPB, C>, MultiIndex>
{
@@ -145,12 +144,11 @@ namespace AMDiS
template <class PreBasis>
static type create(PreBasis const& preBasis)
{
warning("Currently only flat index-merging strategies supported.");
return {FlatPreBasis<SPB, MultiIndex>::create(Impl::subPreBasis(preBasis))};
}
};
// specialization for power bases
// specialization for blocked power bases
template <class MI, class SPB, std::size_t C, class MultiIndex>
struct FlatPreBasis<Dune::Functions::PowerPreBasis
<MI, Dune::Functions::BasisFactory::BlockedInterleaved, SPB, C>, MultiIndex>
@@ -161,10 +159,12 @@ namespace AMDiS
template <class PreBasis>
static type create(PreBasis const& preBasis)
{
warning("Basis converted into flat index-merging strategy.");
return {FlatPreBasis<SPB, MultiIndex>::create(Impl::subPreBasis(preBasis))};
}
};
// specialization for blocked power bases
template <class MI, class SPB, std::size_t C, class MultiIndex>
struct FlatPreBasis<Dune::Functions::PowerPreBasis
<MI, Dune::Functions::BasisFactory::BlockedLexicographic, SPB, C>, MultiIndex>
@@ -175,7 +175,7 @@ namespace AMDiS
template <class PreBasis>
static type create(PreBasis const& preBasis)
{
warning("Currently only flat index-merging strategies supported.");
warning("Basis converted into flat index-merging strategy.");
return {FlatPreBasis<SPB, MultiIndex>::create(Impl::subPreBasis(preBasis))};
}
};
Loading