From a776207b28f86d30ec6ed7db0e91165bbd7f5e78 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 22 Feb 2016 13:46:50 +0100 Subject: [PATCH] add extra ifndef to disable BoomerAMG for complex-valued PETSc --- source/lac/petsc_precondition.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/lac/petsc_precondition.cc b/source/lac/petsc_precondition.cc index 8906e0c466..7dd465f16e 100644 --- a/source/lac/petsc_precondition.cc +++ b/source/lac/petsc_precondition.cc @@ -479,6 +479,7 @@ namespace PETScWrappers void PreconditionBoomerAMG::initialize () { +#ifndef PETSC_USE_COMPLEX int ierr; ierr = PCSetType (pc, const_cast(PCHYPRE)); AssertThrow (ierr == 0, ExcPETScError(ierr)); @@ -517,6 +518,9 @@ namespace PETScWrappers ierr = PCSetFromOptions (pc); AssertThrow (ierr == 0, ExcPETScError(ierr)); +#else + Assert(false, ExcMessage("Complex-valued PETSc does not support BoomerAMG preconditioner.")); +#endif } void -- 2.39.5