12#ifndef DUMUX_LINEAR_DUNE_VECTORS_HH
13#define DUMUX_LINEAR_DUNE_VECTORS_HH
16#include <dune/common/typetraits.hh>
17#include <dune/common/std/type_traits.hh>
19#include <dune/common/fvector.hh>
20#include <dune/istl/bvector.hh>
21#include <dune/istl/multitypeblockvector.hh>
26template<
class T, std::enable_if_t<Dune::IsNumber<std::decay_t<T>>::value,
int> = 0>
29template<
class T, std::enable_if_t<!Dune::IsNumber<std::decay_t<T>>::value,
int> = 0>
30constexpr std::size_t
blockSize() {
return std::decay_t<T>::size(); }
32template<
class C>
using StateDetector =
decltype(std::declval<C>()[0].state());
39template<
class V,
bool hasState>
47 using Scalar = std::decay_t<decltype(std::declval<V>()[0][0])>;
48 static constexpr auto blockSize = Detail::DuneVectors::blockSize<decltype(std::declval<V>()[0])>();
49 using BlockType = Dune::FieldVector<Scalar, blockSize>;
50 using type = Dune::BlockVector<BlockType>;
58 V, Dune::Std::is_detected<Detail::DuneVectors::StateDetector, V>{}
63template<
class... Args>
Definition: variablesbackend.hh:31
Definition: dunevectors.hh:24
constexpr std::size_t blockSize()
Definition: dunevectors.hh:27
decltype(std::declval< C >()[0].state()) StateDetector
Definition: dunevectors.hh:32
Distance implementation details.
Definition: cvfelocalresidual.hh:25
Definition: common/pdesolver.hh:24
Definition: dunevectors.hh:56
typename NativeDuneVectorTypeImpl< V, Dune::Std::is_detected< Detail::DuneVectors::StateDetector, V >{} >::type type
Definition: dunevectors.hh:59
Dune::BlockVector< BlockType > type
Definition: dunevectors.hh:50
std::decay_t< decltype(std::declval< V >()[0][0])> Scalar
Definition: dunevectors.hh:47
Dune::FieldVector< Scalar, blockSize > BlockType
Definition: dunevectors.hh:49
Definition: dunevectors.hh:41
V type
Definition: dunevectors.hh:41