From: Denis Davydov Date: Mon, 28 Mar 2016 20:59:14 +0000 (+0200) Subject: partly extend mpi/p4est_save_03 to comple-valued PETSc X-Git-Tag: v8.5.0-rc1~1153^2~31 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=132d2a6e126a4bd092fc83f4e49dbc3bf409ace2;p=dealii.git partly extend mpi/p4est_save_03 to comple-valued PETSc --- diff --git a/tests/mpi/p4est_save_03.cc b/tests/mpi/p4est_save_03.cc index ac1dfac7cf..384776f972 100644 --- a/tests/mpi/p4est_save_03.cc +++ b/tests/mpi/p4est_save_03.cc @@ -90,8 +90,8 @@ void test() for (unsigned int i = 0; i < locally_owned_dofs.n_elements(); ++i) { unsigned int idx = locally_owned_dofs.nth_index_in_set (i); - x (idx) = idx; - x2 (idx) = 2 * idx; + x (idx) = static_cast(idx);; + x2 (idx) = static_cast(2 * idx); // std::cout << '[' << idx << ']' << ' ' << solution(idx) << std::endl; } @@ -138,7 +138,7 @@ void test() PETScWrappers::MPI::Vector solution2 (locally_owned_dofs, MPI_COMM_WORLD); parallel::distributed::SolutionTransfer soltrans (dh); parallel::distributed::SolutionTransfer soltrans2 (dh); - solution = 2; + solution = static_cast(2); soltrans.deserialize (solution); soltrans2.deserialize (solution2); @@ -146,8 +146,8 @@ void test() { unsigned int idx = locally_owned_dofs.nth_index_in_set (i); //std::cout << '[' << idx << ']' << ' ' << solution(idx) << std::endl; - AssertThrow (idx == solution (idx), ExcInternalError()); - AssertThrow (2*idx == solution2 (idx), ExcInternalError()); + AssertThrow (idx == PetscRealPart(solution (idx)), ExcInternalError()); + AssertThrow (2*idx == PetscRealPart(solution2 (idx)), ExcInternalError()); } double norm = solution.l1_norm();