From a674dd73149e9b5c7d8703ec253aac5b509fca98 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Mon, 2 Oct 2017 16:11:59 +0200 Subject: [PATCH] Disable some Sundials functions for complex-valued PETSc --- include/deal.II/sundials/copy.h | 2 ++ source/sundials/arkode.cc | 8 +++++--- source/sundials/copy.cc | 2 ++ source/sundials/ida.cc | 8 +++++--- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/include/deal.II/sundials/copy.h b/include/deal.II/sundials/copy.h index 63a67a0194..b4e25b37f9 100644 --- a/include/deal.II/sundials/copy.h +++ b/include/deal.II/sundials/copy.h @@ -50,10 +50,12 @@ namespace SUNDIALS #endif // DEAL_II_WITH_TRILINOS #ifdef DEAL_II_WITH_PETSC +#ifndef PETSC_USE_COMPLEX void copy(PETScWrappers::MPI::Vector &dst, const N_Vector &src); void copy(N_Vector &dst, const PETScWrappers::MPI::Vector &src); void copy(PETScWrappers::MPI::BlockVector &dst, const N_Vector &src); void copy(N_Vector &dst, const PETScWrappers::MPI::BlockVector &src); +#endif // PETSC_USE_COMPLEX #endif // DEAL_II_WITH_PETSC #endif diff --git a/source/sundials/arkode.cc b/source/sundials/arkode.cc index d3a488229c..b6a6dad4e8 100644 --- a/source/sundials/arkode.cc +++ b/source/sundials/arkode.cc @@ -472,14 +472,16 @@ namespace SUNDIALS #ifdef DEAL_II_WITH_TRILINOS template class ARKode; template class ARKode; -#endif +#endif // DEAL_II_WITH_TRILINOS #ifdef DEAL_II_WITH_PETSC +#ifndef PETSC_USE_COMPLEX template class ARKode; template class ARKode; -#endif +#endif // PETSC_USE_COMPLEX +#endif // DEAL_II_WITH_PETSC -#endif +#endif //DEAL_II_WITH_MPI } diff --git a/source/sundials/copy.cc b/source/sundials/copy.cc index fb3d6fc147..767c7f625e 100644 --- a/source/sundials/copy.cc +++ b/source/sundials/copy.cc @@ -105,6 +105,7 @@ namespace SUNDIALS #endif //DEAL_II_WITH_TRILINOS #ifdef DEAL_II_WITH_PETSC +#ifndef PETSC_USE_COMPLEX void copy(PETScWrappers::MPI::Vector &dst, const N_Vector &src) { @@ -148,6 +149,7 @@ namespace SUNDIALS } } +#endif //PETSC_USE_COMPLEX #endif //DEAL_II_WITH_PETSC #endif //mpi diff --git a/source/sundials/ida.cc b/source/sundials/ida.cc index 114b7dd231..228f7538a3 100644 --- a/source/sundials/ida.cc +++ b/source/sundials/ida.cc @@ -502,14 +502,16 @@ namespace SUNDIALS #ifdef DEAL_II_WITH_TRILINOS template class IDA; template class IDA; -#endif +#endif // DEAL_II_WITH_TRILINOS #ifdef DEAL_II_WITH_PETSC +#ifndef PETSC_USE_COMPLEX template class IDA; template class IDA; -#endif +#endif // PETSC_USE_COMPLEX +#endif // DEAL_II_WITH_PETSC -#endif +#endif //DEAL_II_WITH_MPI } -- 2.39.5