3 #ifndef DUNE_DOTPRODUCT_HH 4 #define DUNE_DOTPRODUCT_HH 28 template<
class T,
class =
void>
42 template<
class A,
class B>
43 inline typename enable_if<!IsVector<A>::value && !is_same<typename FieldTraits<A>::field_type,
typename FieldTraits<A>::real_type> ::value,
typename PromotionTraits<A,B>::PromotedType>
::type 44 dot(
const A & a,
const B & b) {
58 template<
class A,
class B>
59 inline typename enable_if<!IsVector<A>::value && is_same<typename FieldTraits<A>::field_type,
typename FieldTraits<A>::real_type>::value,
typename PromotionTraits<A,B>::PromotedType>
::type 60 dot(
const A & a,
const B & b) {
74 template<
typename A,
typename B>
76 inline typename enable_if<IsVector<A>::value,
typename PromotionTraits<typename A::field_type, typename B::field_type >::PromotedType>
::type 77 dot(
const A & a,
const B & b) {
89 template<
class A,
class B>
90 inline typename enable_if<!IsVector<A>::value && !is_same<typename FieldTraits<A>::field_type,
typename FieldTraits<A>::real_type> ::value,
typename PromotionTraits<A,B>::PromotedType>
::type 91 dotT(
const A & a,
const B & b) {
102 template<
class A,
class B>
103 inline typename enable_if<IsVector<A>::value,
typename PromotionTraits<typename A::field_type, typename B::field_type >::PromotedType>
::type 104 dotT(
const A & a,
const B & b) {
111 #endif // DUNE_DOTPRODUCT_HH void type
Definition: dotproduct.hh:26
T real_type
export the type representing the real type of the field
Definition: ftraits.hh:27
Definition: dotproduct.hh:29
Traits for type conversions and type information.
Definition: dotproduct.hh:26
Type traits to determine the type of reals (when working with complex numbers)
enable_if<!IsVector< A >::value &&!is_same< typename FieldTraits< A >::field_type, typename FieldTraits< A >::real_type >::value, typename PromotionTraits< A, B >::PromotedType >::type dot(const A &a, const B &b)
computes the dot product for fundamental data types according to Petsc's VectDot function: dot(a...
Definition: dotproduct.hh:44
Provides some promotion traits.
enable_if<!IsVector< A >::value &&!is_same< typename FieldTraits< A >::field_type, typename FieldTraits< A >::real_type >::value, typename PromotionTraits< A, B >::PromotedType >::type dotT(const A &a, const B &b)
Computes an indefinite vector dot product for fundamental data types according to Petsc's VectTDot fu...
Definition: dotproduct.hh:91
Dune namespace.
Definition: alignment.hh:9