From 9c360f5483253614f1de8950bc50a658b09b17a7 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 29 Mar 2016 07:20:22 +0200 Subject: [PATCH] extend gla/vec_02 to complex-valued PETSc --- tests/gla/vec_02.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/gla/vec_02.cc b/tests/gla/vec_02.cc index f84dc3ebd4..3b92a29236 100644 --- a/tests/gla/vec_02.cc +++ b/tests/gla/vec_02.cc @@ -68,26 +68,26 @@ 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 << ":" << get_real_assert_zero_imag(v(myid*2)) << std::endl; + deallog << myid*2+1 << ":" << get_real_assert_zero_imag(v(myid*2+1)) << std::endl; } //assignment from ghosted to ghosted v2 = v; - Assert(v2(1) == 2.0, ExcInternalError()); - Assert(v2(myid*2) == myid*4.0, ExcInternalError()); - Assert(v2(myid*2+1) == myid*4.0+2.0, ExcInternalError()); + Assert(get_real_assert_zero_imag(v2(1)) == 2.0, ExcInternalError()); + Assert(get_real_assert_zero_imag(v2(myid*2)) == myid*4.0, ExcInternalError()); + Assert(get_real_assert_zero_imag(v2(myid*2+1)) == myid*4.0+2.0, ExcInternalError()); - Assert(v(myid*2) == myid*4.0, ExcInternalError()); - Assert(v(myid*2+1) == myid*4.0+2.0, ExcInternalError()); + Assert(get_real_assert_zero_imag(v(myid*2)) == myid*4.0, ExcInternalError()); + Assert(get_real_assert_zero_imag(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: " << get_real_assert_zero_imag(v(1)) << std::endl; + Assert(get_real_assert_zero_imag(v(1)) == 2.0, ExcInternalError()); // done if (myid==0) -- 2.39.5