From: Matthias Maier Date: Mon, 11 May 2015 21:49:56 +0000 (+0200) Subject: Use operator= to set vectors to zero X-Git-Tag: v8.3.0-rc1~178^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25b1cebbb5508d131a348fce0ad9f932f6029cea;p=dealii.git Use operator= to set vectors to zero --- diff --git a/include/deal.II/lac/linear_operator.h b/include/deal.II/lac/linear_operator.h index e465955f7a..d02f153fe8 100644 --- a/include/deal.II/lac/linear_operator.h +++ b/include/deal.II/lac/linear_operator.h @@ -382,11 +382,11 @@ operator*(typename Range::value_type number, // the trivial case: number is zero - if (number == 0) + if (number == 0.) { return_op.vmult = [] (Range &v, const Domain &) { - v *= 0; + v = 0.; }; return_op.vmult_add = [] (Range &, const Domain &) @@ -395,7 +395,7 @@ operator*(typename Range::value_type number, return_op.Tvmult = [](Domain &v, const Range &) { - v *= 0; + v = 0.; }; return_op.Tvmult_add = [](Domain &, const Range &) @@ -404,7 +404,6 @@ operator*(typename Range::value_type number, } else { - // ensure to have valid computation objects by catching number and op by // value