From: Denis Davydov Date: Mon, 28 Mar 2016 21:24:45 +0000 (+0200) Subject: extend mpi/ghost_01 to complex-valued PETSc X-Git-Tag: v8.5.0-rc1~1153^2~29 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b3d8b31c70b88ed412fa8839395c411ec568e5f;p=dealii.git extend mpi/ghost_01 to complex-valued PETSc --- diff --git a/tests/mpi/ghost_01.cc b/tests/mpi/ghost_01.cc index 1e46569a05..71578edf2b 100644 --- a/tests/mpi/ghost_01.cc +++ b/tests/mpi/ghost_01.cc @@ -59,18 +59,18 @@ void test () // check local values if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) { - deallog << myid*2 << ":" << v(myid*2) << std::endl; - deallog << myid*2+1 << ":" << v(myid*2+1) << std::endl; + deallog << myid*2 << ":" << PetscRealPart(v(myid*2)) << std::endl; + deallog << myid*2+1 << ":" << PetscRealPart(v(myid*2+1)) << std::endl; } - Assert(v(myid*2) == myid*4.0, ExcInternalError()); - Assert(v(myid*2+1) == myid*4.0+2.0, ExcInternalError()); + Assert(PetscRealPart(v(myid*2)) == myid*4.0, ExcInternalError()); + Assert(PetscRealPart(v(myid*2+1)) == myid*4.0+2.0, ExcInternalError()); // check ghost values if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0) - deallog << "ghost: " << v(1) << std::endl; - Assert(v(1) == 2.0, ExcInternalError()); + deallog << "ghost: " << PetscRealPart(v(1)) << std::endl; + Assert(PetscRealPart(v(1)) == 2.0, ExcInternalError()); // done if (myid==0)