From: young Date: Sun, 20 Oct 2013 16:35:51 +0000 (+0000) Subject: Not a bug, but a feature of unsigned int. Let remaining (commented) tests on petsc... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67d66d106146c7998519e0a1f6d790b3bb1c260b;p=dealii-svn.git Not a bug, but a feature of unsigned int. Let remaining (commented) tests on petsc-complex go through. git-svn-id: https://svn.dealii.org/branches/branch_petscscalar_complex@31342 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/petsc_scalar_complex/13.cc b/tests/petsc_scalar_complex/13.cc index 0335f2e04b..d9c7ff0236 100644 --- a/tests/petsc_scalar_complex/13.cc +++ b/tests/petsc_scalar_complex/13.cc @@ -32,17 +32,17 @@ void test (PETScWrappers::Vector &v) std::vector pattern (v.size(), false); for (unsigned int i=0; i (1.,1.)) ) || - ( (pattern[i]==false) ), + Assert ( ( (pattern[i]==true) && (v(i).real()==i) && (v(i).imag()==i) ) || + //&& (v(i)==std::complex (1.,1.)) ) || + ( (pattern[i]==false) && (v(i).real()==0.) && (v(i).imag()==0.) ), ExcInternalError()); deallog << "OK" << std::endl; diff --git a/tests/petsc_scalar_complex/13/cmp/generic b/tests/petsc_scalar_complex/13/cmp/generic new file mode 100644 index 0000000000..0fd8fc12f0 --- /dev/null +++ b/tests/petsc_scalar_complex/13/cmp/generic @@ -0,0 +1,2 @@ + +DEAL::OK diff --git a/tests/petsc_scalar_complex/element_access_02.cc b/tests/petsc_scalar_complex/element_access_02.cc index 62d79cd28b..89e1210aff 100644 --- a/tests/petsc_scalar_complex/element_access_02.cc +++ b/tests/petsc_scalar_complex/element_access_02.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- -// $Id: +// $Id: element_access_02.cc // // Copyright (C) 2013 by the deal.II authors // @@ -24,32 +24,25 @@ #include #include -#include - -// test read/write access to matrices AS IS (no cast). -// - -// Note: this test fails where an -1.*(unsigned integer) is used as -// the input value to a matrix element. This needs to be fixed. - // sparse matrix elements -void test_matrix (PETScWrappers::SparseMatrix &m) +void test (PETScWrappers::SparseMatrix &m) { deallog << "Check matrix access" << std::endl; // fill up a matrix with some numbers for (unsigned int k=0; kl) + m.set (k,l, PetscScalar (k+l,-1.*(k+l))); + m.compress (VectorOperation::add); - // This fails, because the write above fails - see output file + // check the matrix is correctly filled for (unsigned int k=0; k @@ -47,9 +45,9 @@ void test () for (unsigned int k=0; k +#include #include #include #include @@ -42,9 +39,9 @@ void test () for (unsigned int k=0; k