]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add a test with complex<double> 5016/head
authorDenis Davydov <davydden@gmail.com>
Mon, 4 Sep 2017 15:02:48 +0000 (17:02 +0200)
committerDenis Davydov <davydden@gmail.com>
Mon, 4 Sep 2017 15:46:55 +0000 (17:46 +0200)
source/base/mpi.inst.in
tests/mpi/collective_full_matrix.cc
tests/mpi/collective_full_matrix.mpirun=1.output
tests/mpi/collective_full_matrix.mpirun=10.output
tests/mpi/collective_full_matrix.mpirun=3.output

index 56cb0c2850db4cf7271cf21bc6bbba1c8c7a1d96..d642d664127f83783d082e7ade05e4d92a887c50 100644 (file)
@@ -68,6 +68,9 @@ for (S : COMPLEX_SCALARS)
     template
     void sum<S> (const Vector<S> &, const MPI_Comm &, Vector<S> &);
 
+    template
+    void sum<S> (const FullMatrix<S> &, const MPI_Comm &, FullMatrix<S> &);
+
     template
     S sum<S> (const S &, const MPI_Comm &);
 
index 3d8730d27a8d7caefcbe34db3a1b47b50425c2df..1971ac182cc3d4325bc4422e5bf607a3d819055a 100644 (file)
@@ -43,7 +43,7 @@ void test(const unsigned int m = 13, const unsigned int n = 5)
   const unsigned int numprocs = Utilities::MPI::n_mpi_processes (MPI_COMM_WORLD);
   for (unsigned int i = 0; i < full_matrix.m(); ++i)
     for (unsigned int j = 0; j < full_matrix.n(); ++j)
-      Assert (full_matrix(i,j) == full_matrix_original(i,j) * numprocs, ExcInternalError());
+      Assert (full_matrix(i,j) == full_matrix_original(i,j) * double(numprocs), ExcInternalError());
 
   if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0)
     deallog << "Ok" << std::endl;
@@ -63,11 +63,15 @@ int main(int argc, char *argv[])
       deallog.push("double");
       test<double>();
       deallog.pop();
+      deallog.push("complex<double>");
+      test<std::complex<double>>();
+      deallog.pop();
     }
   else
     {
       test<float>();
       test<double>();
+      test<std::complex<double>>();
     }
 
 }
index 1d1ebcece83e93e196970d1b4958caecced04f1e..cbe7b3a2de3f06efea7dd09537ad9dbd4e6187e5 100644 (file)
@@ -1,3 +1,4 @@
 
 DEAL:float::Ok
 DEAL:double::Ok
+DEAL:complex<double>::Ok
index 1d1ebcece83e93e196970d1b4958caecced04f1e..cbe7b3a2de3f06efea7dd09537ad9dbd4e6187e5 100644 (file)
@@ -1,3 +1,4 @@
 
 DEAL:float::Ok
 DEAL:double::Ok
+DEAL:complex<double>::Ok
index 1d1ebcece83e93e196970d1b4958caecced04f1e..cbe7b3a2de3f06efea7dd09537ad9dbd4e6187e5 100644 (file)
@@ -1,3 +1,4 @@
 
 DEAL:float::Ok
 DEAL:double::Ok
+DEAL:complex<double>::Ok

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.