]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Provide simpler macros to test for PETSc versions.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 25 Feb 2010 15:44:02 +0000 (15:44 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 25 Feb 2010 15:44:02 +0000 (15:44 +0000)
git-svn-id: https://svn.dealii.org/trunk@20692 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/config.h.in

index e7c2c80b68e35b79dba4afbab658004510abbaff..e8474650ba3b573bc8b787d9920bffff57de560d 100644 (file)
 #  define DEAL_VOLATILE
 #endif
 
+
+/**
+ * Have macros that should make testing for PETSc versions
+ * much simpler.
+ */
+#define DEAL_II_PETSC_VERSION_LT(major,minor,subminor) \
+  ((PETSC_VERSION_MAJOR * 10000 + \
+    PETSC_VERSION_MINOR * 100) + \
+    PETSC_VERSION_SUBMINOR \
+    <  \
+    major*10000 + minor*100 + subminor)
+
+#define DEAL_II_PETSC_VERSION_GE(major,minor,subminor) \
+  ((PETSC_VERSION_MAJOR * 10000 + \
+    PETSC_VERSION_MINOR * 100) + \
+    PETSC_VERSION_SUBMINOR \
+    >=  \
+    major*10000 + minor*100 + subminor)
+
+
 #include <base/numbers.h>
 
 /**

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.