Skip to content
Snippets Groups Projects
Commit 9f2d3d3c authored by Max Kahnt's avatar Max Kahnt
Browse files

Add DefaultBitVector type for FieldVector. Add warning on fail.

parent 925895c6
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include <dune/common/bitsetvector.hh> #include <dune/common/bitsetvector.hh>
#include <dune/common/fvector.hh> #include <dune/common/fvector.hh>
#include <dune/common/typetraits.hh>
#include <dune/istl/bvector.hh> #include <dune/istl/bvector.hh>
#include <dune/istl/multitypeblockvector.hh> #include <dune/istl/multitypeblockvector.hh>
...@@ -20,9 +21,16 @@ namespace Imp { ...@@ -20,9 +21,16 @@ namespace Imp {
template<class Vector> template<class Vector>
struct DefaultBitVector struct DefaultBitVector
{ {
static_assert(AlwaysFalse<Vector>::value, "No DefaultBitVector known for this type.");
using type = void; using type = void;
}; };
template<class T, int i>
struct DefaultBitVector<FieldVector<T,i>>
{
using type = std::bitset<i>;
};
template<class T, class A> template<class T, class A>
struct DefaultBitVector<BlockVector<T,A>> struct DefaultBitVector<BlockVector<T,A>>
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment