From: young Date: Mon, 30 Sep 2013 14:02:35 +0000 (+0000) Subject: tenporary fix for matrix. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86ed65c41640a342b1eac0196805646e1478ac3d;p=dealii-svn.git tenporary fix for matrix. git-svn-id: https://svn.dealii.org/branches/branch_petscscalar_complex@31035 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/numerics/matrix_tools.cc b/deal.II/source/numerics/matrix_tools.cc index ad3c1936a2..136fd5baee 100644 --- a/deal.II/source/numerics/matrix_tools.cc +++ b/deal.II/source/numerics/matrix_tools.cc @@ -2422,16 +2422,21 @@ namespace MatrixTools // find such an entry, take one #ifndef PETSC_USE_COMPLEX PetscScalar average_nonzero_diagonal_entry = 1; + for (types::global_dof_index i=local_range.first; i (1,1); -#endif - for (types::global_dof_index i=local_range.first; i (0,0)) + if (matrix.diag_element(i) != std::complex (0,0)) // PETSC_NULL? { average_nonzero_diagonal_entry = std::fabs(matrix.diag_element(i)); break; } +#endif // figure out which rows of the matrix we // have to eliminate on this processor