]> https://gitweb.dealii.org/ - dealii.git/commitdiff
a short drive-by fixing
authorMatthias Maier <tamiko@43-1.org>
Thu, 3 May 2018 03:02:49 +0000 (22:02 -0500)
committerMatthias Maier <tamiko@43-1.org>
Thu, 3 May 2018 19:09:25 +0000 (14:09 -0500)
include/deal.II/lac/linear_operator.h

index 54ab1370f508784363818a1a82a0e62246691e19..874d795d5afab582c69b0f73a288e782a1226f81 100644 (file)
@@ -792,18 +792,8 @@ template <typename Range, typename Domain, typename Payload>
 LinearOperator<Range, Domain, Payload>
 identity_operator(const LinearOperator<Range, Domain, Payload> &op)
 {
-  const LinearOperator<Range, Domain, Payload> id_op
-    = identity_operator<Range,Payload>(op.reinit_range_vector);
-  LinearOperator<Range, Domain, Payload> return_op (
-    op.identity_payload()
-  );
-
-  return_op.reinit_range_vector = id_op.reinit_range_vector;
-  return_op.reinit_domain_vector = id_op.reinit_domain_vector;
-  return_op.vmult = id_op.vmult;
-  return_op.vmult_add = id_op.vmult_add;
-  return_op.Tvmult = id_op.Tvmult;
-  return_op.Tvmult_add = id_op.Tvmult_add;
+  auto return_op = identity_operator<Range, Payload>(op.reinit_range_vector);
+  static_cast<Payload &>(return_op) = op.identity_payload();
 
   return return_op;
 }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.