3 #ifndef DUNE_DOTPRODUCT_HH 4 #define DUNE_DOTPRODUCT_HH 24 template<
class T,
class =
void>
38 template<
class A,
class B>
40 dot(
const A & a,
const B & b) ->
typename std::enable_if<!IsVector<A>::value && !std::is_same<typename FieldTraits<A>::field_type,
typename FieldTraits<A>::real_type> ::value, decltype(conj(a)*b)>::type
55 template<
class A,
class B>
57 dot(
const A & a,
const B & b) ->
typename std::enable_if<!IsVector<A>::value && std::is_same<typename FieldTraits<A>::field_type,
typename FieldTraits<A>::real_type>::value, decltype(a*b)>::type
71 template<
typename A,
typename B>
73 dot(
const A & a,
const B & b) ->
typename std::enable_if<IsVector<A>::value, decltype(a.dot(b))>::type
86 template<
class A,
class B>
88 dotT(
const A & a,
const B & b) -> decltype(a*b)
96 #endif // DUNE_DOTPRODUCT_HH T real_type
export the type representing the real type of the field
Definition: ftraits.hh:28
auto dot(const A &a, const B &b) -> typename std::enable_if<!IsVector< A >::value &&!std::is_same< typename FieldTraits< A >::field_type, typename FieldTraits< A >::real_type > ::value, decltype(conj(a) *b)>::type
computes the dot product for fundamental data types according to Petsc's VectDot function: dot(a...
Definition: dotproduct.hh:40
typename Impl::voider< Types... >::type void_t
Is void for all valid input types (see N3911). The workhorse for C++11 SFINAE-techniques.
Definition: typetraits.hh:39
Dune namespace.
Definition: alignedallocator.hh:9
auto dotT(const A &a, const B &b) -> decltype(a *b)
Computes an indefinite vector dot product for fundamental data types according to Petsc's VectTDot fu...
Definition: dotproduct.hh:88
Traits for type conversions and type information.
Type traits to determine the type of reals (when working with complex numbers)
Definition: dotproduct.hh:25