]> https://gitweb.dealii.org/ - dealii.git/commitdiff
extend mpi/petsc_bug_ghost_vector_01 to complex-valued PETSc
authorDenis Davydov <davydden@gmail.com>
Mon, 28 Mar 2016 20:45:42 +0000 (22:45 +0200)
committerDenis Davydov <davydden@gmail.com>
Tue, 29 Mar 2016 18:48:46 +0000 (20:48 +0200)
tests/mpi/petsc_bug_ghost_vector_01.cc

index d5c7fe1bd8e9de0599f56a910b6fe03054221bd0..38d56d85856dbea49fb2cf11f736ce1b5186c3df 100644 (file)
@@ -229,14 +229,14 @@ void test ()
     // zero. check this first for the locally owned elements...
     for (unsigned int i=0; i<handler.n_dofs(); ++i)
       if (locally_owned_dofs.is_element(i))
-        AssertThrow (vector(i) == 0,
+        AssertThrow (PetscRealPart(vector(i)) == 0,
                      ExcInternalError());
     // ...end then also for the ghost elements
     for (unsigned int i=0; i<handler.n_dofs(); ++i)
       if (locally_relevant_dofs.is_element(i)
           &&
           !locally_owned_dofs.is_element(i))
-        AssertThrow (vector(i) == 0,
+        AssertThrow (PetscRealPart(vector(i)) == 0,
                      ExcInternalError());
   }
 }

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.