inline DEAL_II_ALWAYS_INLINE static
T1 contract2(const T2 &left, const T3 &right)
{
- T1 result = T1();
+ // Some auto-differentiable numbers need explicit
+ // zero initialization.
+ T1 result = dealii::internal::NumberType<T1>::value(0.0);
for (unsigned int i = 0; i < dim; ++i)
result += Contract2<no_contr - 1, dim>::template contract2<T1>(left[i], right[i]);
return result;
static inline
T1 contract3(const T2 &left, const T3 &middle, const T4 &right)
{
- T1 result = T1();
+ // Some auto-differentiable numbers need explicit
+ // zero initialization.
+ T1 result = dealii::internal::NumberType<T1>::value(0.0);
for (unsigned int i = 0; i < dim; ++i)
result += Contract3<rank_1 - 1, rank_2, dim>::template contract3<T1>(left[i], middle[i], right);
return result;
static inline
T1 contract3(const T2 &left, const T3 &middle, const T4 &right)
{
- T1 result = T1();
+ // Some auto-differentiable numbers need explicit
+ // zero initialization.
+ T1 result = dealii::internal::NumberType<T1>::value(0.0);
for (unsigned int i = 0; i < dim; ++i)
result += Contract3<0, rank_2 - 1, dim>::template contract3<T1>(left, middle[i], right[i]);
return result;