Reference documentation for deal.II version Git cd4d0b9268 2020-11-30 14:25:08 -0500
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
config.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2012 - 2020 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_config_h
17 #define dealii_config_h
18 
19 
20 /***********************************************************************
21  * Information about deal.II:
22  */
23 
24 #define DEAL_II_PACKAGE_NAME "deal.II"
25 
26 #define DEAL_II_PACKAGE_VERSION "Git cd4d0b9268 2020-11-30 14:25:08 -0500"
27 
28 #define DEAL_II_VERSION_MAJOR Git cd4d0b9268 2020-11-30 14:25:08 -0500
29 #define DEAL_II_VERSION_MINOR Git cd4d0b9268 2020-11-30 14:25:08 -0500
30 #define DEAL_II_VERSION_SUBMINOR Git cd4d0b9268 2020-11-30 14:25:08 -0500
31 
32 
33 /***********************************************************************
34  * Configured deal.II features:
35  */
36 
37 /* #undef DEAL_II_WITH_64BIT_INDICES */
38 /* #undef DEAL_II_WITH_ADOLC */
39 /* #undef DEAL_II_WITH_ARPACK */
40 /* #undef DEAL_II_WITH_ASSIMP */
41 #define DEAL_II_WITH_COMPLEX_VALUES
42 /* #undef DEAL_II_WITH_CUDA */
43 /* #undef DEAL_II_WITH_GINKGO */
44 /* #undef DEAL_II_WITH_GSL */
45 /* #undef DEAL_II_WITH_GMSH */
46 /* #undef DEAL_II_WITH_HDF5 */
47 /* #undef DEAL_II_WITH_LAPACK */
48 /* #undef LAPACK_WITH_64BIT_BLAS_INDICES */
49 /* #undef DEAL_II_LAPACK_WITH_MKL */
50 /* #undef DEAL_II_WITH_METIS */
51 /* #undef DEAL_II_WITH_MPI */
52 #define DEAL_II_WITH_MUPARSER
53 /* #undef DEAL_II_WITH_OPENCASCADE */
54 /* #undef DEAL_II_WITH_P4EST */
55 /* #undef DEAL_II_WITH_PETSC */
56 /* #undef DEAL_II_WITH_SCALAPACK */
57 /* #undef DEAL_II_WITH_SIMPLEX_SUPPORT */
58 /* #undef DEAL_II_WITH_SLEPC */
59 /* #undef DEAL_II_WITH_SUNDIALS */
60 /* #undef DEAL_II_WITH_SYMENGINE */
61 #define DEAL_II_WITH_TASKFLOW
62 #define DEAL_II_WITH_TBB
63 /* #undef DEAL_II_WITH_TRILINOS */
64 /* #undef DEAL_II_WITH_UMFPACK */
65 /* #undef DEAL_II_WITH_ZLIB */
66 
67 #ifdef DEAL_II_WITH_TBB
68 /*
69  * Backward compatibility setting:
70  * FIXME: Update once transition to taskflow is complete
71  */
72 #define DEAL_II_WITH_THREADS
73 #define TBB_SUPPRESS_DEPRECATED_MESSAGES 1
74 #endif
75 
76 /***********************************************************************
77  * Compiler bugs:
78  *
79  * For documentation see cmake/checks/check_03_compiler_bugs.cmake
80  */
81 
82 /***********************************************************************
83  * Compiler features:
84  *
85  * For documentation see cmake/checks/check_01_compiler_features.cmake
86  */
87 
88 #define DEAL_II_COMPILER_USE_VECTOR_ARITHMETICS
89 /* #undef DEAL_II_VECTOR_ITERATOR_IS_POINTER */
90 #define DEAL_II_HAVE_BUILTIN_EXPECT
91 #define DEAL_II_HAVE_GLIBC_STACKTRACE
92 #define DEAL_II_HAVE_LIBSTDCXX_DEMANGLER
93 /* #undef __PRETTY_FUNCTION__ */
94 #define DEAL_II_ALWAYS_INLINE __attribute__((always_inline))
95 #define DEAL_II_RESTRICT __restrict
96 #define DEAL_II_COMPILER_HAS_DIAGNOSTIC_PRAGMA
97 
98 /*
99  * A variable to tell if the compiler used in the current compilation process
100  * understands CUDA code.
101  */
102 #if defined(DEAL_II_WITH_CUDA) && defined(__CUDACC__)
103 # define DEAL_II_COMPILER_CUDA_AWARE
104 #endif
105 
106 /***********************************************************************
107  * CPU features:
108  *
109  * For documentation see cmake/checks/check_01_cpu_features.cmake
110  */
111 
112 /* #undef DEAL_II_WORDS_BIGENDIAN */
113 
114 /*
115  * This sets the largest number of vectorization bits detected for the given
116  * compiler flags and hardware (e.g. 256 for AVX on x86-64 architectures) for
117  * use in deal.II's instrinsics-based VectorizedArray class.
118  */
119 #define DEAL_II_VECTORIZATION_WIDTH_IN_BITS 128
120 
121 /*
122  * Backward compatibility setting
123  */
124 #if DEAL_II_VECTORIZATION_WIDTH_IN_BITS == 512
125 #define DEAL_II_COMPILER_VECTORIZATION_LEVEL 3
126 #elif DEAL_II_VECTORIZATION_WIDTH_IN_BITS == 256
127 #define DEAL_II_COMPILER_VECTORIZATION_LEVEL 2
128 #elif DEAL_II_VECTORIZATION_WIDTH_IN_BITS == 128
129 #define DEAL_II_COMPILER_VECTORIZATION_LEVEL 1
130 #else
131 #define DEAL_II_COMPILER_VECTORIZATION_LEVEL 0
132 #endif
133 
134 #define DEAL_II_OPENMP_SIMD_PRAGMA _Pragma("omp simd")
135 
136 
137 /***********************************************************************
138  * Language features:
139  *
140  * For documentation see cmake/checks/check_01_cxx_features.cmake
141  */
142 
143 #define DEAL_II_HAVE_CXX14
144 /* #undef DEAL_II_HAVE_CXX17 */
145 /* #undef DEAL_II_HAVE_CXX20 */
146 
147 #define DEAL_II_HAVE_FP_EXCEPTIONS
148 /* #undef DEAL_II_HAVE_COMPLEX_OPERATOR_OVERLOADS */
149 /* #undef DEAL_II_HAVE_CXX17_BESSEL_FUNCTIONS */
150 /* #undef DEAL_II_CXX14_CONSTEXPR_BUG */
151 
152 #define DEAL_II_DEPRECATED [[deprecated]]
153 #define DEAL_II_FALLTHROUGH [[fallthrough]]
154 #define DEAL_II_CONSTEXPR constexpr
155 
156 // defined for backwards compatibility with older deal.II versions
157 #define DEAL_II_WITH_CXX11
158 #define DEAL_II_WITH_CXX14
159 #ifdef DEAL_II_HAVE_CXX17
160 # define DEAL_II_WITH_CXX17
161 #endif
162 
163 
164 /***********************************************************************
165  * System features:
166  *
167  * For documentation see cmake/checks/check_02_system_features.cmake
168  */
169 
170 #define DEAL_II_HAVE_SYS_RESOURCE_H
171 #define DEAL_II_HAVE_UNISTD_H
172 #define DEAL_II_HAVE_GETHOSTNAME
173 #define DEAL_II_HAVE_GETPID
174 /* #undef DEAL_II_HAVE_JN */
175 
176 /* #undef DEAL_II_MSVC */
177 
178 
179 /***********************************************************************
180  * Feature configuration
181  *
182  * For documentation see cmake/configure/configure_*.cmake and
183  * cmake/modules/Find*.cmake
184  */
185 
186 /* cmake/modules/FindADOLC.cmake */
187 /* #undef DEAL_II_ADOLC_WITH_ATRIG_ERF */
188 /* #undef DEAL_II_ADOLC_WITH_ADVANCED_BRANCHING */
189 /* #undef DEAL_II_ADOLC_WITH_TAPELESS_REFCOUNTING */
190 
191 /* cmake/modules/FindARPACK.cmake */
192 /* #undef DEAL_II_ARPACK_WITH_PARPACK */
193 
194 /* cmake/modules/FindPETSC.cmake */
195 /* #undef DEAL_II_PETSC_WITH_COMPLEX */
196 /* #undef DEAL_II_PETSC_WITH_HYPRE */
197 /* #undef DEAL_II_PETSC_WITH_MUMPS */
198 
199 /* cmake/modules/FindSUNDIALS.cmake */
200 /* #undef DEAL_II_SUNDIALS_WITH_IDAS */
201 
202 /* cmake/modules/FindSYMENGINE.cmake */
203 /* #undef DEAL_II_SYMENGINE_WITH_LLVM */
204 
205 /* cmake/configure/configure_2_trilinos.cmake */
206 /* #undef DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD */
207 /* #undef DEAL_II_TRILINOS_WITH_EPETRAEXT */
208 /* #undef DEAL_II_TRILINOS_WITH_MUELU */
209 /* #undef DEAL_II_TRILINOS_WITH_ROL */
210 /* #undef DEAL_II_TRILINOS_WITH_SACADO */
211 /* #undef DEAL_II_TRILINOS_WITH_SEACAS */
212 /* #undef DEAL_II_TRILINOS_WITH_TPETRA */
213 /* #undef DEAL_II_TRILINOS_WITH_ZOLTAN */
214 
215 
216 /***********************************************************************
217  * Various macros for version number query and comparison:
218  *
219  * These macros are defined to make testing for specific versions within
220  * the deal.II main code as simple as possible.
221  */
222 
223 /*
224  * deal.II:
225  */
226 
227 #define DEAL_II_VERSION_GTE(major,minor,subminor) \
228  ((DEAL_II_VERSION_MAJOR * 10000 + \
229  DEAL_II_VERSION_MINOR * 100 + \
230  DEAL_II_VERSION_SUBMINOR) \
231  >= \
232  (major)*10000 + (minor)*100 + (subminor))
233 
234 /*
235  * boost:
236  */
237 #define DEAL_II_BOOST_VERSION_MAJOR 1
238 #define DEAL_II_BOOST_VERSION_MINOR 70
239 #define DEAL_II_BOOST_VERSION_SUBMINOR 0
240 
241 /*
242  * Gmsh:
243  */
244 #ifdef DEAL_II_WITH_GMSH
245 # define DEAL_II_GMSH_EXECUTABLE_PATH ""
246 #endif
247 
248 /*
249  * p4est:
250  */
251 
252 #ifdef DEAL_II_WITH_P4EST
253 # define DEAL_II_P4EST_VERSION_MAJOR
254 # define DEAL_II_P4EST_VERSION_MINOR
255 # define DEAL_II_P4EST_VERSION_SUBMINOR
256 # define DEAL_II_P4EST_VERSION_PATCH
257 
258 # define DEAL_II_P4EST_VERSION_GTE(major,minor,subminor,patch) \
259  ((DEAL_II_P4EST_VERSION_MAJOR * 1000000 + \
260  DEAL_II_P4EST_VERSION_MINOR * 10000 + \
261  DEAL_II_P4EST_VERSION_SUBMINOR * 100 + \
262  DEAL_II_P4EST_VERSION_PATCH) \
263  >= \
264  (major)*1000000 + (minor)*10000 + (subminor)*100 + (patch))
265 #endif
266 
267 /*
268  * SUNDIALS:
269  */
270 
271 #ifdef DEAL_II_WITH_SUNDIALS
272  # define DEAL_II_SUNDIALS_VERSION_MAJOR 0
273  # define DEAL_II_SUNDIALS_VERSION_MINOR 0
274  # define DEAL_II_SUNDIALS_VERSION_PATCH 0
275 
276  #define DEAL_II_SUNDIALS_VERSION_GTE(major,minor,patch) \
277  ((DEAL_II_SUNDIALS_VERSION_MAJOR * 10000 + \
278  DEAL_II_SUNDIALS_VERSION_MINOR * 100 + \
279  DEAL_II_SUNDIALS_VERSION_PATCH) \
280  >= \
281  (major)*10000 + (minor)*100 + (patch))
282 
283  #define DEAL_II_SUNDIALS_VERSION_LT(major,minor,patch) \
284  ((DEAL_II_SUNDIALS_VERSION_MAJOR * 10000 + \
285  DEAL_II_SUNDIALS_VERSION_MINOR * 100 + \
286  DEAL_II_SUNDIALS_VERSION_PATCH) \
287  < \
288  (major)*10000 + (minor)*100 + (patch))
289 #endif
290 
291 /*
292  * PETSc:
293  *
294  * Note: The following definitions will be set in petscconf.h and
295  * petscversion.h, so we don't repeat them here.
296  *
297  * PETSC_VERSION_MAJOR
298  * PETSC_VERSION_MINOR
299  * PETSC_VERSION_SUBMINOR
300  * PETSC_VERSION_PATCH
301  * PETSC_VERSION_RELEASE
302  * PETSC_USE_COMPLEX
303  */
304 
305 #define DEAL_II_PETSC_VERSION_LT(major,minor,subminor) \
306  ((PETSC_VERSION_MAJOR * 10000 + \
307  PETSC_VERSION_MINOR * 100 + \
308  PETSC_VERSION_SUBMINOR) \
309  < \
310  (major)*10000 + (minor)*100 + (subminor))
311 
312 #define DEAL_II_PETSC_VERSION_GTE(major,minor,subminor) \
313  ((PETSC_VERSION_MAJOR * 10000 + \
314  PETSC_VERSION_MINOR * 100 + \
315  PETSC_VERSION_SUBMINOR) \
316  >= \
317  (major)*10000 + (minor)*100 + (subminor))
318 
319 /*
320  * SLEPC
321  * see slepcversion.h
322  */
323 #define DEAL_II_SLEPC_VERSION_GTE(major,minor,subminor) \
324  ((SLEPC_VERSION_MAJOR * 10000 + \
325  SLEPC_VERSION_MINOR * 100 + \
326  SLEPC_VERSION_SUBMINOR) \
327  >= \
328  (major)*10000 + (minor)*100 + (subminor))
329 
330 /*
331  * Trilinos:
332  */
333 
334 #ifdef DEAL_II_WITH_TRILINOS
335 # define DEAL_II_TRILINOS_VERSION_MAJOR
336 # define DEAL_II_TRILINOS_VERSION_MINOR
337 # define DEAL_II_TRILINOS_VERSION_SUBMINOR
338 
339 # define DEAL_II_TRILINOS_VERSION_GTE(major,minor,subminor) \
340  ((DEAL_II_TRILINOS_VERSION_MAJOR * 10000 + \
341  DEAL_II_TRILINOS_VERSION_MINOR * 100 + \
342  DEAL_II_TRILINOS_VERSION_SUBMINOR) \
343  >= \
344  (major)*10000 + (minor)*100 + (subminor))
345 #endif
346 
347 /*
348  * MPI
349  */
350 
351 #ifdef DEAL_II_WITH_MPI
352 # define DEAL_II_MPI_VERSION_MAJOR
353 # define DEAL_II_MPI_VERSION_MINOR
354 
355 # define DEAL_II_MPI_VERSION_GTE(major,minor) \
356  ((DEAL_II_MPI_VERSION_MAJOR * 100 + \
357  DEAL_II_MPI_VERSION_MINOR) \
358  >= \
359  (major)*100 + (minor))
360 #else
361 # define DEAL_II_MPI_VERSION_GTE(major,minor) false
362 #endif
363 
364 /* #undef DEAL_II_MPI_WITH_CUDA_SUPPORT */
365 
366 /***********************************************************************
367  * Two macro names that we put at the top and bottom of all deal.II files
368  * and that will be expanded to "namespace dealii {" and "}".
369  */
370 
371 #define DEAL_II_NAMESPACE_OPEN namespace dealii {
372 #define DEAL_II_NAMESPACE_CLOSE }
373 
374 /***********************************************************************
375  * Two macros to guard external header includes.
376  *
377  * Selectively disable diagnostics set by "-Wextra" (and similar flags) for
378  * GCC and compiler accepting GCC dialects (such as clang).
379  * "diagnostic push" is supported since gcc-4.6 and clang-3.3.
380  */
381 
382 #ifdef DEAL_II_COMPILER_HAS_DIAGNOSTIC_PRAGMA
383 
384 /* keep pragmas with an exclamation mark in order.. */
385 # define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS \
386 _Pragma("GCC diagnostic push") \
387 _Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"") \
388 _Pragma("GCC diagnostic ignored \"-Wpragmas\"") \
389 _Pragma("GCC diagnostic ignored \"-Wunknown-warning-option\"") \
390 _Pragma("GCC diagnostic ignored \"-Wunknown-warning\"") \
391 _Pragma("GCC diagnostic ignored \"-Wextra\"") \
392 _Pragma("GCC diagnostic ignored \"-Waddress-of-packed-member\"") \
393 _Pragma("GCC diagnostic ignored \"-Wdeprecated-copy\"") \
394 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \
395 _Pragma("GCC diagnostic ignored \"-Wexpansion-to-defined\"") \
396 _Pragma("GCC diagnostic ignored \"-Wexpansion-to-defined\"") \
397 _Pragma("GCC diagnostic ignored \"-Wignored-attributes\"") \
398 _Pragma("GCC diagnostic ignored \"-Wignored-qualifiers\"") \
399 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") \
400 _Pragma("GCC diagnostic ignored \"-Winfinite-recursion\"") \
401 _Pragma("GCC diagnostic ignored \"-Wint-in-bool-context\"") \
402 _Pragma("GCC diagnostic ignored \"-Wmisleading-indentation\"") \
403 _Pragma("GCC diagnostic ignored \"-Wmissing-field-initializers\"") \
404 _Pragma("GCC diagnostic ignored \"-Wnested-anon-types\"") \
405 _Pragma("GCC diagnostic ignored \"-Wnon-virtual-dtor\"") \
406 _Pragma("GCC diagnostic ignored \"-Woverflow\"") \
407 _Pragma("GCC diagnostic ignored \"-Woverloaded-virtual\"") \
408 _Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
409 _Pragma("GCC diagnostic ignored \"-Wsuggest-override\"") \
410 _Pragma("GCC diagnostic ignored \"-Wtautological-constant-out-of-range-compare\"") \
411 _Pragma("GCC diagnostic ignored \"-Wtautological-overlap-compare\"") \
412 _Pragma("GCC diagnostic ignored \"-Wtype-limits\"") \
413 _Pragma("GCC diagnostic ignored \"-Wundef\"") \
414 _Pragma("GCC diagnostic ignored \"-Wunused-but-set-parameter\"") \
415 _Pragma("GCC diagnostic ignored \"-Wunused-but-set-variable\"") \
416 _Pragma("GCC diagnostic ignored \"-Wunused-function\"") \
417 _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") \
418 _Pragma("GCC diagnostic ignored \"-Wunused-private-field\"") \
419 _Pragma("GCC diagnostic ignored \"-Wunused-variable\"") \
420 _Pragma("GCC diagnostic warning \"-Wpragmas\"")
421 
422 # define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS \
423 _Pragma("GCC diagnostic pop")
424 
425 #else
426 
427 # define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
428 # define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
429 
430 #endif
431 
432 /***********************************************************************
433  * Define a portable preprocessor macro that generates custom warnings
434  * reporting the line and the file where the warning appears. Taken from:
435  * http://goodliffe.blogspot.com/2009/07/c-how-to-say-warning-to-visual-studio-c.html
436  */
437 
438 #ifdef _MSC_VER
439  #define DEAL_II_STRINGIZE_HELPER(x) #x
440  #define DEAL_II_STRINGIZE(x) DEAL_II_STRINGIZE_HELPER(x)
441  #define DEAL_II_DO_PRAGMA(x) __pragma(x)
442  #define DEAL_II_WARNING(desc) DEAL_II_DO_PRAGMA(message(__FILE__ "(" DEAL_II_STRINGIZE(__LINE__) ") : warning: " #desc))
443 #else
444  #define DEAL_II_DO_PRAGMA(x) _Pragma(#x)
445  #define DEAL_II_WARNING(desc) DEAL_II_DO_PRAGMA(message(#desc))
446 #endif
447 
448 /***********************************************************************
449  * Final inclusions:
450  */
451 
452 /*
453  * Some systems require including mpi.h before stdio.h which happens in
454  * types.h
455  */
456 #if defined(DEAL_II_WITH_MPI) || defined(DEAL_II_WITH_PETSC)
458 # include <mpi.h>
460 #endif
461 
462 #include <deal.II/base/numbers.h>
463 #include <deal.II/base/types.h>
464 
465 /*
466  * Include the boost version header to do a quick version check in case, by
467  * accident, we have configured with one version of boost but are compiling
468  * either the library or an external application with a different version of
469  * boost.
470  */
471 #include <boost/version.hpp>
472 static_assert(
473  BOOST_VERSION == 100000 * DEAL_II_BOOST_VERSION_MAJOR +
476  "The version number of boost that you are compiling with does not match the "
477  "version number of boost found during deal.II's configuration step. This "
478  "leads to difficult to understand bugs and is not supported. Please check "
479  "that you have set up your application with the same version of boost as "
480  "deal.II.");
481 
482 #endif
#define DEAL_II_BOOST_VERSION_MAJOR
Definition: config.h:237
#define DEAL_II_BOOST_VERSION_SUBMINOR
Definition: config.h:239
#define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
Definition: config.h:385
#define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
Definition: config.h:422
#define DEAL_II_BOOST_VERSION_MINOR
Definition: config.h:238