From afdd832449943daef4de17c906a71d440e6a42b8 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 28 Mar 2016 21:12:58 +0200 Subject: [PATCH] partly extend tests/mpi/p4est_save_02.cc to complex-valued PETSc --- tests/mpi/p4est_save_02.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/mpi/p4est_save_02.cc b/tests/mpi/p4est_save_02.cc index 05770bbca1..fe4725e53f 100644 --- a/tests/mpi/p4est_save_02.cc +++ b/tests/mpi/p4est_save_02.cc @@ -86,7 +86,11 @@ void test() for (unsigned int i=0; i(idx,0); +#else x(idx)=idx; +#endif // std::cout << '[' << idx << ']' << ' ' << solution(idx) << std::endl; } @@ -127,14 +131,18 @@ void test() PETScWrappers::MPI::Vector solution(locally_owned_dofs, MPI_COMM_WORLD); parallel::distributed::SolutionTransfer soltrans(dh); +#if PETSC_USE_COMPLEX + solution = std::complex(2,0); +#else solution = 2; +#endif soltrans.deserialize(solution); for (unsigned int i=0; i