]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix petsc_complex/17 test 2816/head
authorDenis Davydov <davydden@gmail.com>
Tue, 12 Jul 2016 14:17:46 +0000 (16:17 +0200)
committerDenis Davydov <davydden@gmail.com>
Tue, 12 Jul 2016 14:17:46 +0000 (16:17 +0200)
tests/petsc_complex/17.cc

index d01b30e6f6e97395157120480a009dff08ec9f63..408d5b7659480788abe5fd2e41561d10de5521ab 100644 (file)
@@ -30,8 +30,9 @@ void test (PETScWrappers::Vector &v)
   double norm = 0;
   for (unsigned int k=0; k<v.size(); k+=1+k)
     {
-      v(k) = PetscScalar (k,2.*k);
-      norm += std::fabs (1.*k+2.*k);
+      const PetscScalar  s(1.*k,2.*k);
+      v(k) = s;
+      norm += std::abs (s);
     }
   v.compress (VectorOperation::insert);
 

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.