From: Wolfgang Bangerth Date: Wed, 1 Nov 2017 16:17:52 +0000 (-0600) Subject: Make a few more things work with std::complex types. X-Git-Tag: v9.0.0-rc1~826^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=857f8ccdeeabc709240dd417889f190c7bcaa644;p=dealii.git Make a few more things work with std::complex types. --- diff --git a/include/deal.II/lac/full_matrix.templates.h b/include/deal.II/lac/full_matrix.templates.h index 38ec19d056..f8aed2d7b9 100644 --- a/include/deal.II/lac/full_matrix.templates.h +++ b/include/deal.II/lac/full_matrix.templates.h @@ -282,10 +282,10 @@ void FullMatrix::forward (Vector &dst, size_type nu = ( (m()::type s = src(i); for (j=0; j::type(dst(j)) * (*this)(i,j); + dst(i) = number2(s)/number2((*this)(i,i)); AssertIsFinite(dst(i)); } } @@ -303,10 +303,10 @@ void FullMatrix::backward (Vector &dst, size_type nu = (m()=0; --i) { - number2 s = src(i); + typename ProductType::type s = src(i); for (j=i+1; j::type(dst(j)) * (*this)(i,j); + dst(i) = number2(s)/number2((*this)(i,i)); AssertIsFinite(dst(i)); } } @@ -903,13 +903,13 @@ FullMatrix::matrix_norm_square (const Vector &v) const for (size_type row=0; row::conjugate(v(row))); + sum += s * numbers::NumberTraits::conjugate(v(row)); } return sum; @@ -934,13 +934,13 @@ FullMatrix::matrix_scalar_product (const Vector &u, for (size_type row=0; row