MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
version.cpp
Go to the documentation of this file.
1// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
2// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
3// LICENSE and NOTICE for details. LLNL-CODE-806117.
4//
5// This file is part of the MFEM library. For more information and source code
6// availability visit https://mfem.org.
7//
8// MFEM is free software; you can redistribute it and/or modify it under the
9// terms of the BSD-3 license. We welcome feedback and contributions, see file
10// CONTRIBUTING.md for details.
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
18namespace 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
46const 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
59const char *GetGitStr()
60{
61 static const char *git_str = MFEM_GIT_STRING;
62 return git_str;
63}
64
65
66const char *GetConfigStr()
67{
68 static const char *config_str =
69 ""
70#ifdef MFEM_USE_ADIOS2
71 "MFEM_USE_ADIOS2\n"
72#endif
73#ifdef MFEM_USE_AMGX
74 "MFEM_USE_AMGX\n"
75#endif
76#ifdef MFEM_USE_CEED
77 "MFEM_USE_CEED\n"
78#endif
79#ifdef MFEM_USE_CONDUIT
80 "MFEM_USE_CONDUIT\n"
81#endif
82#ifdef MFEM_USE_CUDA
83 "MFEM_USE_CUDA\n"
84#endif
85#ifdef MFEM_USE_DOUBLE
86 "MFEM_USE_DOUBLE\n"
87#endif
88#ifdef MFEM_USE_EXCEPTIONS
89 "MFEM_USE_EXCEPTIONS\n"
90#endif
91#ifdef MFEM_USE_GINKGO
92 "MFEM_USE_GINKGO\n"
93#endif
94#ifdef MFEM_USE_GNUTLS
95 "MFEM_USE_GNUTLS\n"
96#endif
97#ifdef MFEM_USE_GSLIB
98 "MFEM_USE_GSLIB\n"
99#endif
100#ifdef MFEM_USE_HIOP
101 "MFEM_USE_HIOP\n"
102#endif
103#ifdef MFEM_USE_HIP
104 "MFEM_USE_HIP\n"
105#endif
106#ifdef MFEM_USE_LAPACK
107 "MFEM_USE_LAPACK\n"
108#endif
109#ifdef MFEM_USE_LEGACY_OPENMP
110 "MFEM_USE_LEGACY_OPENMP\n"
111#endif
112#ifdef MFEM_USE_LIBUNWIND
113 "MFEM_USE_LIBUNWIND\n"
114#endif
115#ifdef MFEM_USE_MEMALLOC
116 "MFEM_USE_MEMALLOC\n"
117#endif
118#ifdef MFEM_USE_METIS
119 "MFEM_USE_METIS\n"
120#endif
121#ifdef MFEM_USE_METIS_5
122 "MFEM_USE_METIS_5\n"
123#endif
124#ifdef MFEM_USE_MKL_CPARDISO
125 "MFEM_USE_MKL_CPARDISO\n"
126#endif
127#ifdef MFEM_USE_MPFR
128 "MFEM_USE_MPFR\n"
129#endif
130#ifdef MFEM_USE_MPI
131 "MFEM_USE_MPI\n"
132#endif
133#ifdef MFEM_USE_MUMPS
134 "MFEM_USE_MUMPS\n"
135#endif
136#ifdef MFEM_USE_NETCDF
137 "MFEM_USE_NETCDF\n"
138#endif
139#ifdef MFEM_USE_OCCA
140 "MFEM_USE_OCCA\n"
141#endif
142#ifdef MFEM_USE_OPENMP
143 "MFEM_USE_OPENMP\n"
144#endif
145#ifdef MFEM_USE_PETSC
146 "MFEM_USE_PETSC\n"
147#endif
148#ifdef MFEM_USE_PUMI
149 "MFEM_USE_PUMI\n"
150#endif
151#ifdef MFEM_USE_RAJA
152 "MFEM_USE_RAJA\n"
153#endif
154#ifdef MFEM_USE_SIDRE
155 "MFEM_USE_SIDRE\n"
156#endif
157#ifdef MFEM_USE_SIMD
158 "MFEM_USE_SIMD\n"
159#endif
160#ifdef MFEM_USE_SINGLE
161 "MFEM_USE_SINGLE\n"
162#endif
163#ifdef MFEM_USE_SLEPC
164 "MFEM_USE_SLEPC\n"
165#endif
166#ifdef MFEM_USE_STRUMPACK
167 "MFEM_USE_STRUMPACK\n"
168#endif
169#ifdef MFEM_USE_SUITESPARSE
170 "MFEM_USE_SUITESPARSE\n"
171#endif
172#ifdef MFEM_USE_SUNDIALS
173 "MFEM_USE_SUNDIALS\n"
174#endif
175#ifdef MFEM_USE_SUPERLU
176 "MFEM_USE_SUPERLU\n"
177#endif
178#ifdef MFEM_USE_SUPERLU5
179 "MFEM_USE_SUPERLU5\n"
180#endif
181#ifdef MFEM_USE_UMPIRE
182 "MFEM_USE_UMPIRE\n"
183#endif
184#ifdef MFEM_USE_ZLIB
185 "MFEM_USE_ZLIB\n"
186#endif
187 "MFEM_TIMER_TYPE = " EXPAND_AND_QUOTE(MFEM_TIMER_TYPE)
188 ;
189
190 return config_str;
191}
192
193}
const char * GetVersionStr()
Return the MFEM version number as a string.
Definition version.cpp:46
const char * GetConfigStr()
Return the MFEM configuration as a string.
Definition version.cpp:66
int GetVersionPatch()
Return the MFEM version patch number as an integer.
Definition version.cpp:40
int GetVersion()
Return the MFEM version number as a single integer.
Definition version.cpp:22
const char * GetGitStr()
Return the MFEM Git hash as a string.
Definition version.cpp:59
int GetVersionMinor()
Return the MFEM minor version number as an integer.
Definition version.cpp:34
int GetVersionMajor()
Return the MFEM major version number as an integer.
Definition version.cpp:28