From ba15da4118772c4a14ce3eb39a6e0bc343b98956 Mon Sep 17 00:00:00 2001 From: young Date: Thu, 3 Oct 2013 14:46:04 +0000 Subject: [PATCH] Fix divide error by cast-from-int (as it already is in the parallel case). git-svn-id: https://svn.dealii.org/branches/branch_petscscalar_complex@31089 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/lac/petsc_vector_base.cc | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/deal.II/source/lac/petsc_vector_base.cc b/deal.II/source/lac/petsc_vector_base.cc index f3365e78a4..d464bc05dd 100644 --- a/deal.II/source/lac/petsc_vector_base.cc +++ b/deal.II/source/lac/petsc_vector_base.cc @@ -425,12 +425,8 @@ namespace PETScWrappers PetscScalar sum; ierr = VecSum(vector, &sum); AssertThrow (ierr == 0, ExcPETScError(ierr)); -// @whattodo - // return sum/size(); - - Assert ((false), - ExcMessage ("Your PETSc/SLEPc installation was configured with scalar-type complex " - "but this function is not defined for complex types.")); +// @whattodo-done-check! + return sum/static_cast(size()); } // get a representation of the vector and @@ -471,11 +467,6 @@ namespace PETScWrappers AssertThrow (ierr == 0, ExcPETScError(ierr)); return mean; - - - Assert ((false), - ExcMessage ("Your PETSc/SLEPc installation was configured with scalar-type complex " - "but this function is not defined for complex types.")); } -- 2.39.5