]> https://gitweb.dealii.org/ - dealii.git/commitdiff
extend gla/mat_05 to complex-valued PETSc
authorDenis Davydov <davydden@gmail.com>
Tue, 29 Mar 2016 06:48:19 +0000 (08:48 +0200)
committerDenis Davydov <davydden@gmail.com>
Tue, 29 Mar 2016 18:48:46 +0000 (20:48 +0200)
tests/gla/mat_05.cc

index a3b091d3ab45db84d51fff77b20360c5483f4836..0d49b48ec319121784815349baed37c3079114a4 100644 (file)
@@ -71,7 +71,7 @@ void test ()
 
   deallog << "l1-norm: " << mat.l1_norm() << std::endl;
   if (myid==0)
-    deallog << "mat(0,1): " << mat(0,1) << std::endl;
+    deallog << "mat(0,1): " << get_real_assert_zero_imag(mat(0,1)) << std::endl;
 
   {
     // disabled:
@@ -89,11 +89,11 @@ void test ()
     mat2.reinit(mat);
     deallog << "l1-norm: " << mat2.l1_norm() << std::endl;
     if (myid==0)
-      deallog << "mat(0,1): " << mat2(0,1) << std::endl;
+      deallog << "mat(0,1): " << get_real_assert_zero_imag(mat2(0,1)) << std::endl;
     mat2.add(0,1,0.3);
     mat2.compress(VectorOperation::add);
     if (myid==0)
-      deallog << "after adding mat(0,1): " << mat2(0,1) << std::endl;
+      deallog << "after adding mat(0,1): " << get_real_assert_zero_imag(mat2(0,1)) << std::endl;
   }
   {
     deallog << "* copy_from():" << std::endl;
@@ -103,11 +103,11 @@ void test ()
     mat2.copy_from(mat);
     deallog << "l1-norm: " << mat2.l1_norm() << std::endl;
     if (myid==0)
-      deallog << "mat(0,1): " << mat2(0,1) << std::endl;
+      deallog << "mat(0,1): " << get_real_assert_zero_imag(mat2(0,1)) << std::endl;
     mat2.add(0,1,0.3);
     mat2.compress(VectorOperation::add);
     if (myid==0)
-      deallog << "after adding mat(0,1): " << mat2(0,1) << std::endl;
+      deallog << "after adding mat(0,1): " << get_real_assert_zero_imag(mat2(0,1)) << std::endl;
   }
 
   // done

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.