]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Provide a function that returns the version string.
authorWolfgang Bangerth <bangerth@colostate.edu>
Sat, 10 Mar 2018 05:34:58 +0000 (22:34 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sun, 11 Mar 2018 01:32:33 +0000 (18:32 -0700)
include/deal.II/base/utilities.h
source/base/utilities.cc

index d6009340f55cd02071e2d7e42b1daf5b7bfcda99..fd1399f83c1b724d7a98ac5601d7836de2b78063 100644 (file)
@@ -61,6 +61,13 @@ DEAL_II_NAMESPACE_OPEN
  */
 namespace Utilities
 {
+  /**
+   * Return a string of the form "deal.II version x.y.z" where "x.y.z"
+   * identifies the version of deal.II you are using. This information
+   * is also provided by the DEAL_II_PACKAGE_NAME and
+   * DEAL_II_PACKAGE_VERSION preprocessor variables.
+   */
+  std::string dealii_version_string ();
 
   /**
    * Convert a number @p value to a string, with as many digits as given to
index 6a1f250b8d641019fa9b6303a41b109e990b468e..a192cfc3ab1d479e666e7765bc42c036b7c338f6 100644 (file)
@@ -85,12 +85,23 @@ namespace Utilities
                   << "Can't convert the string " << arg1
                   << " to the desired type");
 
+
+  std::string
+  dealii_version_string ()
+  {
+    return DEAL_II_PACKAGE_NAME " version " DEAL_II_PACKAGE_VERSION;
+  }
+
+
+
   std::string
   int_to_string (const unsigned int value, const unsigned int digits)
   {
     return to_string(value,digits);
   }
 
+
+
   template <typename number>
   std::string
   to_string (const number value, const unsigned int digits)

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.