]> https://gitweb.dealii.org/ - dealii.git/commitdiff
minor complex-valued related cleanup of mpi/p4est_save_0x tests
authorDenis Davydov <davydden@gmail.com>
Mon, 28 Mar 2016 21:52:28 +0000 (23:52 +0200)
committerDenis Davydov <davydden@gmail.com>
Tue, 29 Mar 2016 18:48:46 +0000 (20:48 +0200)
tests/mpi/p4est_save_02.cc
tests/mpi/p4est_save_03.cc
tests/mpi/p4est_save_04.cc

index fe4725e53f6e01b21c35b307a48940d040af3564..26592aab9ad353a0d9bea7bdb87bedf855d6bc37 100644 (file)
@@ -86,11 +86,7 @@ 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);
-#ifdef PETSC_USE_COMPLEX
-        x(idx)=std::complex<double>(idx,0);
-#else
         x(idx)=idx;
-#endif
 
 //  std::cout << '[' << idx << ']' << ' ' << solution(idx) << std::endl;
       }
@@ -131,11 +127,7 @@ void test()
 
     PETScWrappers::MPI::Vector solution(locally_owned_dofs, MPI_COMM_WORLD);
     parallel::distributed::SolutionTransfer<dim,PETScWrappers::MPI::Vector> soltrans(dh);
-#if PETSC_USE_COMPLEX
-    solution = std::complex<double>(2,0);
-#else
-    solution = 2;
-#endif
+    solution = 2.0;
     soltrans.deserialize(solution);
 
     for (unsigned int i=0; i<locally_owned_dofs.n_elements(); ++i)
index 384776f972968a32ecda048e13dda1ff80af6511..723556e71f4af44b375f49c0602d838edbd14f29 100644 (file)
@@ -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) = static_cast<PETScWrappers::MPI::Vector::value_type>(idx);;
-        x2 (idx) = static_cast<PETScWrappers::MPI::Vector::value_type>(2 * idx);
+        x (idx) = idx;
+        x2 (idx) = 2 * idx;
 
 //  std::cout << '[' << idx << ']' << ' ' << solution(idx) << std::endl;
       }
index 53a621dccb105eca4044cca95742b75b42879fd7..57d9f278ba28bec10fb35eee835b92c71c679ccb 100644 (file)
@@ -87,11 +87,7 @@ 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);
-#ifdef PETSC_USE_COMPLEX
-          x (idx) = std::complex<double>(idx,0);
-#else
           x (idx) = idx;
-#endif
           deallog << '[' << idx << ']' << ' ' << PetscRealPart(x(idx)) << std::endl;
         }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.