5#ifndef DUNE_DOTPRODUCT_HH
6#define DUNE_DOTPRODUCT_HH
26 template<
class T,
class =
void>
40 template<
class A,
class B>
57 template<
class A,
class B>
59 dot(
const A & a,
const B & b) ->
typename std::enable_if<IsNumber<A>::value && !IsVector<A>::value && std::is_same<typename FieldTraits<A>::field_type,
typename FieldTraits<A>::real_type>::value,
decltype(a*b)>::type
73 template<
typename A,
typename B>
75 dot(
const A & a,
const B & b) ->
typename std::enable_if<IsVector<A>::value,
decltype(a.dot(b))>::type
88 template<
class A,
class B>
90 dotT(
const A & a,
const B & b) ->
decltype(a*b)
Type traits to determine the type of reals (when working with complex numbers)
Traits for type conversions and type information.
auto dot(const A &a, const B &b) -> typename std::enable_if< IsNumber< A >::value &&!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:42
typename Impl::voider< Types... >::type void_t
Is void for all valid input types. The workhorse for C++11 SFINAE-techniques.
Definition typetraits.hh:40
Dune namespace.
Definition alignedallocator.hh:13
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:90
Definition dotproduct.hh:27
T real_type
export the type representing the real type of the field
Definition ftraits.hh:30