*/
real_type norm_sqr () const;
-#ifndef PETSC_USE_COMPLEX
/**
* Return the mean value of the elements of this vector.
*/
PetscScalar mean_value () const;
-#endif
/**
* $l_1$-norm of the vector.
// @todo does not build with PETSc complex scalar types.
// :425:25: error: no match for ‘operator/’ in ‘sum / dealii::PETScWrappers::VectorBase::size()’
-#ifndef PETSC_USE_COMPLEX
PetscScalar
VectorBase::mean_value () const
{
+#ifndef PETSC_USE_COMPLEX
int ierr;
// We can only use our more efficient
AssertThrow (ierr == 0, ExcPETScError(ierr));
return mean;
- }
+
+#else // PETSC_USE_COMPLEX
+ Assert ((false),
+ ExcMessage ("Your PETSc/SLEPc installation was configured with scalar-type complex "
+ "but this function is not defined for complex types."));
+
+ // Prevent compiler warning about no return value
+ PetscScalar dummy;
+ return dummy;
#endif
+ }
VectorBase::real_type
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