From d21b356adddb85c227eed2c626d982c6727e4677 Mon Sep 17 00:00:00 2001 From: Jonathan Lambrechts <jonathan.lambrechts@uclouvain.be> Date: Wed, 22 Dec 2010 15:36:46 +0000 Subject: [PATCH] linearSystemPETSc : disable linearSystemPETScBlockDouble if pestc uses complex numbers --- Solver/linearSystemPETSc.cpp | 3 ++- Solver/linearSystemPETSc.h | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Solver/linearSystemPETSc.cpp b/Solver/linearSystemPETSc.cpp index 5cc15f0b68..e99012e541 100644 --- a/Solver/linearSystemPETSc.cpp +++ b/Solver/linearSystemPETSc.cpp @@ -5,7 +5,7 @@ #include "fullMatrix.h" #include <stdlib.h> #include "GmshMessage.h" - +#if not defined(PETSC_USE_COMPLEX) void linearSystemPETScBlockDouble::_kspCreate() { KSPCreate(PETSC_COMM_WORLD, &_ksp); if (this->_parameters.count("petscPrefix")) @@ -205,6 +205,7 @@ double linearSystemPETScBlockDouble::normInfRightHandSide() const VecNorm(_b, NORM_INFINITY, &nor); return nor; } +#endif #include "Bindings.h" void linearSystemPETScRegisterBindings(binding *b) diff --git a/Solver/linearSystemPETSc.h b/Solver/linearSystemPETSc.h index 3afe836e92..c1c4625724 100644 --- a/Solver/linearSystemPETSc.h +++ b/Solver/linearSystemPETSc.h @@ -266,6 +266,7 @@ class linearSystemPETSc : public linearSystem<scalar> { class binding; void linearSystemPETScRegisterBindings(binding *b); +#if not defined(PETSC_USE_COMPLEX) class linearSystemPETScBlockDouble : public linearSystem<fullMatrix<double> > { bool _entriesPreAllocated, _isAllocated, _kspAllocated; sparsityPattern _sparsity; @@ -290,10 +291,11 @@ class linearSystemPETScBlockDouble : public linearSystem<fullMatrix<double> > { double normInfRightHandSide() const; linearSystemPETScBlockDouble(); }; +#endif #else -/*template <class scalar> +template <class scalar> class linearSystemPETSc : public linearSystem<scalar> { public : linearSystemPETSc() @@ -312,7 +314,7 @@ class linearSystemPETSc : public linearSystem<scalar> { virtual void zeroRightHandSide() {} virtual int systemSolve() { return 0; } virtual double normInfRightHandSide() const{return 0;} -};*/ +}; #endif -- GitLab