From 04f91f4bb8169727c8770683a612444bc4ff22c2 Mon Sep 17 00:00:00 2001 From: guido Date: Wed, 25 Aug 2004 21:17:48 +0000 Subject: [PATCH] make umfpack optional git-svn-id: https://svn.dealii.org/trunk@9578 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/sparse_direct.h | 3 ++- deal.II/lac/source/sparse_direct.cc | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/deal.II/lac/include/lac/sparse_direct.h b/deal.II/lac/include/lac/sparse_direct.h index a3281797bc..98e983f807 100644 --- a/deal.II/lac/include/lac/sparse_direct.h +++ b/deal.II/lac/include/lac/sparse_direct.h @@ -990,6 +990,7 @@ class SparseDirectMA47 : public Subscriptor +#ifdef HAVE_UMFPACK /** * This class provides an interface to the sparse direct solver UMFPACK (see @@ -1141,7 +1142,7 @@ class SparseDirectUMFPACK : public Subscriptor std::vector control; }; - +#endif /*@}*/ diff --git a/deal.II/lac/source/sparse_direct.cc b/deal.II/lac/source/sparse_direct.cc index 74c8bff551..fe616cbb72 100644 --- a/deal.II/lac/source/sparse_direct.cc +++ b/deal.II/lac/source/sparse_direct.cc @@ -42,13 +42,12 @@ # include #endif - -// include UMFPACK file. annoyingly the UMFPACK files don't seem to have -// extern "C" wrapped around their headers... +// include UMFPACK file. +#ifdef HAVE_UMFPACK extern "C" { # include } - +#endif // if the HSL functions are not there, define them empty and throw an // exception @@ -1582,6 +1581,7 @@ call_ma47cd (const unsigned int *n_rows, //scalar +#ifdef HAVE_UMFPACK SparseDirectUMFPACK::SparseDirectUMFPACK () : @@ -1808,7 +1808,7 @@ SparseDirectUMFPACK::solve (const SparseMatrix &matrix, solve (rhs_and_solution); } - +#endif // explicit instantiations -- 2.39.5