From: Denis Davydov Date: Tue, 29 Mar 2016 05:33:03 +0000 (+0200) Subject: extend gla/mat_01 to complex-valued PETSc X-Git-Tag: v8.5.0-rc1~1153^2~16 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d29fc4e0eadcfdcaf02824aa074124c5ef48f87;p=dealii.git extend gla/mat_01 to complex-valued PETSc --- diff --git a/tests/gla/mat_01.cc b/tests/gla/mat_01.cc index 199bafda83..a690c32e11 100644 --- a/tests/gla/mat_01.cc +++ b/tests/gla/mat_01.cc @@ -72,9 +72,9 @@ void test () // check local values if (myid==0) { - deallog << myid*2 << ": " << mat(myid*2,myid*2) << std::endl; - deallog << myid*2+1 << ": " << mat(myid*2+1,myid*2+1) << std::endl; - deallog << "0,1 : " << mat(0,1) << std::endl; + deallog << myid*2 << ": " << get_real_assert_zero_imag(mat(myid*2,myid*2)) << std::endl; + deallog << myid*2+1 << ": " << get_real_assert_zero_imag(mat(myid*2+1,myid*2+1)) << std::endl; + deallog << "0,1 : " << get_real_assert_zero_imag(mat(0,1)) << std::endl; } // done diff --git a/tests/tests.h b/tests/tests.h index 3525a34384..086ef88cab 100644 --- a/tests/tests.h +++ b/tests/tests.h @@ -77,6 +77,13 @@ PetscReal get_real_assert_zero_imag(const PETScWrappers::internal::VectorReferen } #endif +template +number get_real_assert_zero_imag(const std::complex &a) +{ + Assert (a.imag() == 0.0, ExcInternalError()); + return a.real(); +} + template number get_real_assert_zero_imag(const number &a) {