MFEM  v3.3.2
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
version.cpp
Go to the documentation of this file.
1 // Copyright (c) 2010, Lawrence Livermore National Security, LLC. Produced at
2 // the Lawrence Livermore National Laboratory. LLNL-CODE-443211. All Rights
3 // reserved. See file COPYRIGHT for details.
4 //
5 // This file is part of the MFEM library. For more information and source code
6 // availability see http://mfem.org.
7 //
8 // MFEM is free software; you can redistribute it and/or modify it under the
9 // terms of the GNU Lesser General Public License (as published by the Free
10 // Software Foundation) version 2.1 dated February 1999.
11 
12 #include "../config/config.hpp"
13 #include "version.hpp"
14 
15 #define QUOTE(str) #str
16 #define EXPAND_AND_QUOTE(str) QUOTE(str)
17 
18 namespace mfem
19 {
20 
21 
23 {
24  return MFEM_VERSION;
25 }
26 
27 
29 {
30  return MFEM_VERSION_MAJOR;
31 }
32 
33 
35 {
36  return MFEM_VERSION_MINOR;
37 }
38 
39 
41 {
42  return MFEM_VERSION_PATCH;
43 }
44 
45 
46 const char *GetVersionStr()
47 {
48 #if MFEM_VERSION_TYPE == MFEM_VERSION_TYPE_RELEASE
49 #define MFEM_VERSION_TYPE_STR " (release)"
50 #elif MFEM_VERSION_TYPE == MFEM_VERSION_TYPE_DEVELOPMENT
51 #define MFEM_VERSION_TYPE_STR " (development)"
52 #endif
53  static const char *version_str =
54  "MFEM v" MFEM_VERSION_STRING MFEM_VERSION_TYPE_STR;
55  return version_str;
56 }
57 
58 
59 const char *GetGitStr()
60 {
61  static const char *git_str = MFEM_GIT_STRING;
62  return git_str;
63 }
64 
65 
66 const char *GetConfigStr()
67 {
68  static const char *config_str =
69  ""
70 #ifdef MFEM_USE_MPI
71  "MFEM_USE_MPI\n"
72 #endif
73 #ifdef MFEM_USE_METIS
74  "MFEM_USE_METIS\n"
75 #endif
76 #ifdef MFEM_USE_METIS_5
77  "MFEM_USE_METIS_5\n"
78 #endif
79 #ifdef MFEM_DEBUG
80  "MFEM_DEBUG\n"
81 #endif
82 #ifdef MFEM_USE_GZSTREAM
83  "MFEM_USE_GZSTREAM\n"
84 #endif
85 #ifdef MFEM_USE_LIBUNWIND
86  "MFEM_USE_LIBUNWIND\n"
87 #endif
88 #ifdef MFEM_USE_LAPACK
89  "MFEM_USE_LAPACK\n"
90 #endif
91 #ifdef MFEM_THREAD_SAFE
92  "MFEM_THREAD_SAFE\n"
93 #endif
94 #ifdef MFEM_USE_OPENMP
95  "MFEM_USE_OPENMP\n"
96 #endif
97 #ifdef MFEM_USE_MEMALLOC
98  "MFEM_USE_MEMALLOC\n"
99 #endif
100 #ifdef MFEM_USE_SUNDIALS
101  "MFEM_USE_SUNDIALS\n"
102 #endif
103 #ifdef MFEM_USE_MESQUITE
104  "MFEM_USE_MESQUITE\n"
105 #endif
106 #ifdef MFEM_USE_SUITESPARSE
107  "MFEM_USE_SUITESPARSE\n"
108 #endif
109 #ifdef MFEM_USE_SUPERLU
110  "MFEM_USE_SUPERLU\n"
111 #endif
112 #ifdef MFEM_USE_STRUMPACK
113  "MFEM_USE_STRUMPACK\n"
114 #endif
115 #ifdef MFEM_USE_GECKO
116  "MFEM_USE_GECKO\n"
117 #endif
118 #ifdef MFEM_USE_GNUTLS
119  "MFEM_USE_GNUTLS\n"
120 #endif
121 #ifdef MFEM_USE_NETCDF
122  "MFEM_USE_NETCDF\n"
123 #endif
124 #ifdef MFEM_USE_PETSC
125  "MFEM_USE_PETSC\n"
126 #endif
127 #ifdef MFEM_USE_MPFR
128  "MFEM_USE_MPFR\n"
129 #endif
130 #ifdef MFEM_USE_SIDRE
131  "MFEM_USE_SIDRE\n"
132 #endif
133  "MFEM_TIMER_TYPE = " EXPAND_AND_QUOTE(MFEM_TIMER_TYPE)
134  ;
135 
136  return config_str;
137 }
138 
139 }
int GetVersionMajor()
Definition: version.cpp:28
const char * GetConfigStr()
Definition: version.cpp:66
const char * GetVersionStr()
Definition: version.cpp:46
const char * GetGitStr()
Definition: version.cpp:59
int GetVersion()
Definition: version.cpp:22
int GetVersionMinor()
Definition: version.cpp:34
int GetVersionPatch()
Definition: version.cpp:40