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

index 0453cd94d3e3dacc72b6463167f54d33e4cb3aff..926ea8559e892ae03472f274b980b7c9aad4c896 100644 (file)
@@ -53,7 +53,7 @@ void test (VectorType &vector)
   std::vector<typename VectorType::value_type> values1 (indices.size());
   vector.extract_subvector_to (indices, values1);
   for (unsigned int j=0; j<vector.size()/2; ++j)
-    AssertThrow (values1[j] == 2*j, ExcInternalError());
+    AssertThrow (get_real_assert_zero_imag(values1[j]) == 2*j, ExcInternalError());
 
   // do the same with the version of the function that takes iterators
   std::vector<typename VectorType::value_type> values2 (indices.size());
@@ -61,7 +61,7 @@ void test (VectorType &vector)
                                indices.end(),
                                values2.begin());
   for (unsigned int j=0; j<vector.size()/2; ++j)
-    AssertThrow (values2[j] == 2*j, ExcInternalError());
+    AssertThrow (get_real_assert_zero_imag(values2[j]) == 2*j, ExcInternalError());
 
   // done
   if (myid==0)

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.