From 6f00d31c4fcc9e4d8bfe07abee163189c62f4207 Mon Sep 17 00:00:00 2001 From: Felix Schindler <felix.schindler@wwu.de> Date: Thu, 5 Feb 2015 19:32:22 +0100 Subject: [PATCH] [operators.elliptic-cg] update static checks --- dune/gdt/operators/elliptic-cg.hh | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/dune/gdt/operators/elliptic-cg.hh b/dune/gdt/operators/elliptic-cg.hh index 9a95df304..9e9b7532f 100644 --- a/dune/gdt/operators/elliptic-cg.hh +++ b/dune/gdt/operators/elliptic-cg.hh @@ -38,23 +38,14 @@ template <class DiffusionFactorType, class MatrixImp, class SourceSpaceImp, clas class DiffusionTensorType = void> class EllipticCGTraits { - static_assert(std::is_base_of<Stuff::Tags::LocalizableFunction, DiffusionFactorType>::value, + static_assert(Stuff::is_localizable_function<DiffusionFactorType>::value, "DiffusionFactorType has to be derived from Stuff::LocalizableFunctionInterface!"); - static_assert(std::is_base_of<Stuff::Tags::LocalizableFunction, DiffusionTensorType>::value + static_assert(Stuff::is_localizable_function<DiffusionTensorType>::value || std::is_same<void, DiffusionTensorType>::value, "DiffusionTensorType has to be void or derived from Stuff::LocalizableFunctionInterface!"); - static_assert( - std::is_base_of<Stuff::LA::MatrixInterface<typename MatrixImp::Traits, typename MatrixImp::Traits::ScalarType>, - MatrixImp>::value, - "MatrixImp has to be derived from Stuff::LA::MatrixInterface!"); - static_assert(std::is_base_of<SpaceInterface<typename SourceSpaceImp::Traits, SourceSpaceImp::dimDomain, - SourceSpaceImp::dimRange, SourceSpaceImp::dimRangeCols>, - SourceSpaceImp>::value, - "SourceSpaceImp has to be derived from SpaceInterface!"); - static_assert(std::is_base_of<SpaceInterface<typename RangeSpaceImp::Traits, RangeSpaceImp::dimDomain, - RangeSpaceImp::dimRange, RangeSpaceImp::dimRangeCols>, - RangeSpaceImp>::value, - "RangeSpaceImp has to be derived from SpaceInterface!"); + static_assert(Stuff::is_matrix<MatrixImp>::value, "MatrixImp has to be derived from Stuff::LA::MatrixInterface!"); + static_assert(is_space<SourceSpaceImp>::value, "SourceSpaceImp has to be derived from SpaceInterface!"); + static_assert(is_space<RangeSpaceImp>::value, "RangeSpaceImp has to be derived from SpaceInterface!"); public: typedef EllipticCG<DiffusionFactorType, MatrixImp, SourceSpaceImp, RangeSpaceImp, GridViewImp, DiffusionTensorType> @@ -65,6 +56,7 @@ public: typedef GridViewImp GridViewType; }; // class EllipticCGTraits + } // namespace internal -- GitLab