From 132d2a6e126a4bd092fc83f4e49dbc3bf409ace2 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 28 Mar 2016 22:59:14 +0200 Subject: [PATCH] partly extend mpi/p4est_save_03 to comple-valued PETSc --- tests/mpi/p4est_save_03.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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(); -- 2.39.5