diff --git a/dune/solvers/test/energynormtest.cc b/dune/solvers/test/energynormtest.cc index 39ef10f76a45e6f78f612a7a35dbbc1f6c8787c7..0e4633006c1134484292b484504e948e7771cdfe 100644 --- a/dune/solvers/test/energynormtest.cc +++ b/dune/solvers/test/energynormtest.cc @@ -136,14 +136,14 @@ bool testWith(const M& m, const V& v, Field normValue, const char* s) { } template<class... Args> -struct NestableMultiTypeBlockVector : public Dune::MultiTypeBlockVector<Args...> { +struct CustomMultiTypeBlockVector : public Dune::MultiTypeBlockVector<Args...> { constexpr static size_t blocklevel = 1; // fake value need for BlockVector nesting template<class K, typename = std::enable_if_t<Dune::IsNumber<K>::value>> void operator=(K v) { Dune::Hybrid::forEach(*this, [v](auto& m) { m = v; }); } // allow init by scalar }; template<class... Args> -struct NestableMultiTypeBlockMatrix : public Dune::MultiTypeBlockMatrix<Args...> { +struct CustomMultiTypeBlockMatrix : public Dune::MultiTypeBlockMatrix<Args...> { constexpr static size_t blocklevel = 1; // fake value needed for BCRSMatrix nesting template<class K, typename = std::enable_if_t<Dune::IsNumber<K>::value>> void operator*=(K v) { Dune::Hybrid::forEach(*this, [v](auto& b) { b *= v; }); } // allow multiplication by scalar @@ -152,7 +152,7 @@ struct NestableMultiTypeBlockMatrix : public Dune::MultiTypeBlockMatrix<Args...> // inject field traits for custom multi type block vector to be used by the norms namespace Dune { template<class T, class... TT> -struct FieldTraits<NestableMultiTypeBlockVector<T, TT...>> { +struct FieldTraits<CustomMultiTypeBlockVector<T, TT...>> { using field_type = typename FieldTraits<T>::field_type; using real_type = typename FieldTraits<T>::real_type; }; @@ -161,7 +161,7 @@ struct FieldTraits<NestableMultiTypeBlockVector<T, TT...>> { // inject fake(!) default bit vector for custom multi type block vector namespace Dune { namespace Solvers { namespace Imp { template<class T, class... TT> -struct DefaultBitVector<NestableMultiTypeBlockVector<T, TT...>> { +struct DefaultBitVector<CustomMultiTypeBlockVector<T, TT...>> { using type = T; }; }}} @@ -227,10 +227,10 @@ int main() try /// test with multi blocked vectors // types - using MVector = MultiTypeBlockVector<BVector, BVector>; - using MMatrix0 = MultiTypeBlockMatrix<BMatrix, BMatrix>; - using MMatrix1 = MultiTypeBlockMatrix<BMatrix, BMatrix>; - using MMatrix = MultiTypeBlockMatrix<MMatrix0, MMatrix1>; + using MVector = CustomMultiTypeBlockVector<BVector, BVector>; + using MMatrix0 = CustomMultiTypeBlockMatrix<BMatrix, BMatrix>; + using MMatrix1 = CustomMultiTypeBlockMatrix<BMatrix, BMatrix>; + using MMatrix = CustomMultiTypeBlockMatrix<MMatrix0, MMatrix1>; // instance setup using namespace Dune::Hybrid; MVector mVector; @@ -242,10 +242,10 @@ int main() try /// test with blocked multitype vectors // types - using NVector = NestableMultiTypeBlockVector<FVector, FVector>; - using NMatrix0 = NestableMultiTypeBlockMatrix<FMatrix, FMatrix>; - using NMatrix1 = NestableMultiTypeBlockMatrix<FMatrix, FMatrix>; - using NMatrix = NestableMultiTypeBlockMatrix<NMatrix0, NMatrix1>; + using NVector = CustomMultiTypeBlockVector<FVector, FVector>; + using NMatrix0 = CustomMultiTypeBlockMatrix<FMatrix, FMatrix>; + using NMatrix1 = CustomMultiTypeBlockMatrix<FMatrix, FMatrix>; + using NMatrix = CustomMultiTypeBlockMatrix<NMatrix0, NMatrix1>; constexpr size_t bnSize = 4; using BNVector = BlockVector<NVector>; using BNMatrix = BCRSMatrix<NMatrix>;