From: Denis Davydov Date: Mon, 4 Sep 2017 15:02:48 +0000 (+0200) Subject: add a test with complex X-Git-Tag: v9.0.0-rc1~1128^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d19a89d4f09ae38ea9b4578420e388b3e1ad989;p=dealii.git add a test with complex --- diff --git a/source/base/mpi.inst.in b/source/base/mpi.inst.in index 56cb0c2850..d642d66412 100644 --- a/source/base/mpi.inst.in +++ b/source/base/mpi.inst.in @@ -68,6 +68,9 @@ for (S : COMPLEX_SCALARS) template void sum (const Vector &, const MPI_Comm &, Vector &); + template + void sum (const FullMatrix &, const MPI_Comm &, FullMatrix &); + template S sum (const S &, const MPI_Comm &); diff --git a/tests/mpi/collective_full_matrix.cc b/tests/mpi/collective_full_matrix.cc index 3d8730d27a..1971ac182c 100644 --- a/tests/mpi/collective_full_matrix.cc +++ b/tests/mpi/collective_full_matrix.cc @@ -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(); deallog.pop(); + deallog.push("complex"); + test>(); + deallog.pop(); } else { test(); test(); + test>(); } } diff --git a/tests/mpi/collective_full_matrix.mpirun=1.output b/tests/mpi/collective_full_matrix.mpirun=1.output index 1d1ebcece8..cbe7b3a2de 100644 --- a/tests/mpi/collective_full_matrix.mpirun=1.output +++ b/tests/mpi/collective_full_matrix.mpirun=1.output @@ -1,3 +1,4 @@ DEAL:float::Ok DEAL:double::Ok +DEAL:complex::Ok diff --git a/tests/mpi/collective_full_matrix.mpirun=10.output b/tests/mpi/collective_full_matrix.mpirun=10.output index 1d1ebcece8..cbe7b3a2de 100644 --- a/tests/mpi/collective_full_matrix.mpirun=10.output +++ b/tests/mpi/collective_full_matrix.mpirun=10.output @@ -1,3 +1,4 @@ DEAL:float::Ok DEAL:double::Ok +DEAL:complex::Ok diff --git a/tests/mpi/collective_full_matrix.mpirun=3.output b/tests/mpi/collective_full_matrix.mpirun=3.output index 1d1ebcece8..cbe7b3a2de 100644 --- a/tests/mpi/collective_full_matrix.mpirun=3.output +++ b/tests/mpi/collective_full_matrix.mpirun=3.output @@ -1,3 +1,4 @@ DEAL:float::Ok DEAL:double::Ok +DEAL:complex::Ok