]> https://gitweb.dealii.org/ - dealii.git/commitdiff
AssertLIB macros for blas, lapack and umfpack
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Tue, 22 Mar 2005 16:03:04 +0000 (16:03 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Tue, 22 Mar 2005 16:03:04 +0000 (16:03 +0000)
git-svn-id: https://svn.dealii.org/trunk@10203 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/exceptions.h

index 6c7a2a3b047a231f84931b849a31b05e7f142209..ff5f22a09d592d1ded5531fe89438a3477da7469 100644 (file)
@@ -1042,7 +1042,7 @@ namespace StandardExceptions
                                    * <tt>--with-umfpack</tt> and check
                                    * if it is actually included.
                                    */
-  DeclException0 (ExcNeedsUMFPack);
+  DeclException0 (ExcNeedsUMFPACK);
   
                                   /**
                                    * This function requires the METIS
@@ -1060,11 +1060,46 @@ namespace StandardExceptions
                                    * <tt>--with-petsc</tt> and check
                                    * if it is actually included.
                                    */
-  DeclException0 (ExcNeedsPetsc);
+  DeclException0 (ExcNeedsPETSC);
   
 //@}
 }
 
+/*
+ * Unfortunately, the following must be repeated for each library,
+ * since we cannot have ifdefs in macros.
+ */
+
+/**
+ * Assert support for the BLAS library
+ */
+#ifdef HAVE_LIBBLAS
+#  define AssertBLAS {}
+#else
+#  define AssertBLAS Assert(false, ExcNeedsBLAS())
+#endif
+
+
+/**
+ * Assert support for the LAPACK library
+ */
+#ifdef HAVE_LIBLAPACK
+#  define AssertLAPACK {}
+#else
+#  define AssertLAPACK Assert(false, ExcNeedsLAPACK())
+#endif
+
+
+/**
+ * Assert support for the UMFPACK library
+ */
+#ifdef HAVE_LIBUMFPACK
+#  define AssertUMFPACK {}
+#else
+#  define AssertUMFPACK Assert(false, ExcNeedsUMFPACK())
+#endif
+
+
 
 using namespace StandardExceptions;
 

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


Typeset in Trocchi and Trocchi Bold Sans Serif.