3 #ifndef DUNE_DOTPRODUCT_HH 4 #define DUNE_DOTPRODUCT_HH 27 template<
class T,
class =
void>
41 template<
class A,
class B>
43 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 58 template<
class A,
class B>
60 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 74 template<
typename A,
typename B>
76 dot(
const A & a,
const B & b) ->
typename std::enable_if<IsVector<A>::value, decltype(a.dot(b))>::
type 89 template<
class A,
class B>
91 dotT(
const A & a,
const B & b) -> decltype(a*b)
99 #endif // DUNE_DOTPRODUCT_HH 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:43
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:91
Definition: dotproduct.hh:25
Dune namespace.
Definition: alignment.hh:10
Traits for type conversions and type information.
T real_type
export the type representing the real type of the field
Definition: ftraits.hh:28
void type
Definition: dotproduct.hh:25
Definition: dotproduct.hh:28
Type traits to determine the type of reals (when working with complex numbers)