Reference documentation for deal.II version Git 54662f1c23 2021-02-26 09:51:10 -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 54662f1c23 2021-02-26 09:51:10 -0500"
27 
28 #define DEAL_II_VERSION_MAJOR Git 54662f1c23 2021-02-26 09:51:10 -0500
29 #define DEAL_II_VERSION_MINOR Git 54662f1c23 2021-02-26 09:51:10 -0500
30 #define DEAL_II_VERSION_SUBMINOR Git 54662f1c23 2021-02-26 09:51:10 -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 
156 #define DEAL_II_DEPRECATED [[deprecated]]
157 
164 #define DEAL_II_DEPRECATED_EARLY
165 #define DEAL_II_FALLTHROUGH [[fallthrough]]
166 #define DEAL_II_CONSTEXPR constexpr
167 
168 // defined for backwards compatibility with older deal.II versions
169 #define DEAL_II_WITH_CXX11
170 #define DEAL_II_WITH_CXX14
171 #ifdef DEAL_II_HAVE_CXX17
172 # define DEAL_II_WITH_CXX17
173 #endif
174 
175 
176 /***********************************************************************
177  * System features:
178  *
179  * For documentation see cmake/checks/check_02_system_features.cmake
180  */
181 
182 #define DEAL_II_HAVE_SYS_RESOURCE_H
183 #define DEAL_II_HAVE_UNISTD_H
184 #define DEAL_II_HAVE_GETHOSTNAME
185 #define DEAL_II_HAVE_GETPID
186 /* #undef DEAL_II_HAVE_JN */
187 
188 /* #undef DEAL_II_MSVC */
189 
190 
191 /***********************************************************************
192  * Feature configuration
193  *
194  * For documentation see cmake/configure/configure_*.cmake and
195  * cmake/modules/Find*.cmake
196  */
197 
198 /* cmake/modules/FindADOLC.cmake */
199 /* #undef DEAL_II_ADOLC_WITH_ATRIG_ERF */
200 /* #undef DEAL_II_ADOLC_WITH_ADVANCED_BRANCHING */
201 /* #undef DEAL_II_ADOLC_WITH_TAPELESS_REFCOUNTING */
202 
203 /* cmake/modules/FindARPACK.cmake */
204 /* #undef DEAL_II_ARPACK_WITH_PARPACK */
205 
206 /* cmake/modules/FindGMSH.cmake */
207 /* #undef DEAL_II_GMSH_WITH_API */
208 
209 /* cmake/modules/FindPETSC.cmake */
210 /* #undef DEAL_II_PETSC_WITH_COMPLEX */
211 /* #undef DEAL_II_PETSC_WITH_HYPRE */
212 /* #undef DEAL_II_PETSC_WITH_MUMPS */
213 
214 /* cmake/modules/FindSUNDIALS.cmake */
215 /* #undef DEAL_II_SUNDIALS_WITH_IDAS */
216 
217 /* cmake/modules/FindSYMENGINE.cmake */
218 /* #undef DEAL_II_SYMENGINE_WITH_LLVM */
219 
220 /* cmake/configure/configure_2_trilinos.cmake */
221 /* #undef DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD */
222 /* #undef DEAL_II_TRILINOS_WITH_EPETRAEXT */
223 /* #undef DEAL_II_TRILINOS_WITH_MUELU */
224 /* #undef DEAL_II_TRILINOS_WITH_ROL */
225 /* #undef DEAL_II_TRILINOS_WITH_SACADO */
226 /* #undef DEAL_II_TRILINOS_WITH_SEACAS */
227 /* #undef DEAL_II_TRILINOS_WITH_TPETRA */
228 /* #undef DEAL_II_TRILINOS_WITH_ZOLTAN */
229 
230 
231 /***********************************************************************
232  * Various macros for version number query and comparison:
233  *
234  * These macros are defined to make testing for specific versions within
235  * the deal.II main code as simple as possible.
236  */
237 
238 /*
239  * deal.II:
240  */
241 
242 #define DEAL_II_VERSION_GTE(major,minor,subminor) \
243  ((DEAL_II_VERSION_MAJOR * 10000 + \
244  DEAL_II_VERSION_MINOR * 100 + \
245  DEAL_II_VERSION_SUBMINOR) \
246  >= \
247  (major)*10000 + (minor)*100 + (subminor))
248 
249 /*
250  * boost:
251  */
252 #define DEAL_II_BOOST_VERSION_MAJOR 1
253 #define DEAL_II_BOOST_VERSION_MINOR 70
254 #define DEAL_II_BOOST_VERSION_SUBMINOR 0
255 
256 #define DEAL_II_BOOST_VERSION_GTE(major,minor,subminor) \
257  ((DEAL_II_BOOST_VERSION_MAJOR * 100000 + \
258  DEAL_II_BOOST_VERSION_MINOR * 100 + \
259  DEAL_II_BOOST_VERSION_SUBMINOR) \
260  >= \
261  (major)*100000 + (minor)*100 + (subminor))
262 
263 /*
264  * Gmsh:
265  */
266 #ifdef DEAL_II_WITH_GMSH
267 # define DEAL_II_GMSH_EXECUTABLE_PATH ""
268 #endif
269 
270 /*
271  * p4est:
272  */
273 
274 #ifdef DEAL_II_WITH_P4EST
275 # define DEAL_II_P4EST_VERSION_MAJOR
276 # define DEAL_II_P4EST_VERSION_MINOR
277 # define DEAL_II_P4EST_VERSION_SUBMINOR
278 # define DEAL_II_P4EST_VERSION_PATCH
279 
280 # define DEAL_II_P4EST_VERSION_GTE(major,minor,subminor,patch) \
281  ((DEAL_II_P4EST_VERSION_MAJOR * 1000000 + \
282  DEAL_II_P4EST_VERSION_MINOR * 10000 + \
283  DEAL_II_P4EST_VERSION_SUBMINOR * 100 + \
284  DEAL_II_P4EST_VERSION_PATCH) \
285  >= \
286  (major)*1000000 + (minor)*10000 + (subminor)*100 + (patch))
287 #endif
288 
289 /*
290  * SUNDIALS:
291  */
292 
293 #ifdef DEAL_II_WITH_SUNDIALS
294  # define DEAL_II_SUNDIALS_VERSION_MAJOR 0
295  # define DEAL_II_SUNDIALS_VERSION_MINOR 0
296  # define DEAL_II_SUNDIALS_VERSION_PATCH 0
297 
298  #define DEAL_II_SUNDIALS_VERSION_GTE(major,minor,patch) \
299  ((DEAL_II_SUNDIALS_VERSION_MAJOR * 10000 + \
300  DEAL_II_SUNDIALS_VERSION_MINOR * 100 + \
301  DEAL_II_SUNDIALS_VERSION_PATCH) \
302  >= \
303  (major)*10000 + (minor)*100 + (patch))
304 
305  #define DEAL_II_SUNDIALS_VERSION_LT(major,minor,patch) \
306  ((DEAL_II_SUNDIALS_VERSION_MAJOR * 10000 + \
307  DEAL_II_SUNDIALS_VERSION_MINOR * 100 + \
308  DEAL_II_SUNDIALS_VERSION_PATCH) \
309  < \
310  (major)*10000 + (minor)*100 + (patch))
311 #endif
312 
313 /*
314  * PETSc:
315  *
316  * Note: The following definitions will be set in petscconf.h and
317  * petscversion.h, so we don't repeat them here.
318  *
319  * PETSC_VERSION_MAJOR
320  * PETSC_VERSION_MINOR
321  * PETSC_VERSION_SUBMINOR
322  * PETSC_VERSION_PATCH
323  * PETSC_VERSION_RELEASE
324  * PETSC_USE_COMPLEX
325  */
326 
327 #define DEAL_II_PETSC_VERSION_LT(major,minor,subminor) \
328  ((PETSC_VERSION_MAJOR * 10000 + \
329  PETSC_VERSION_MINOR * 100 + \
330  PETSC_VERSION_SUBMINOR) \
331  < \
332  (major)*10000 + (minor)*100 + (subminor))
333 
334 #define DEAL_II_PETSC_VERSION_GTE(major,minor,subminor) \
335  ((PETSC_VERSION_MAJOR * 10000 + \
336  PETSC_VERSION_MINOR * 100 + \
337  PETSC_VERSION_SUBMINOR) \
338  >= \
339  (major)*10000 + (minor)*100 + (subminor))
340 
341 /*
342  * SLEPC
343  * see slepcversion.h
344  */
345 #define DEAL_II_SLEPC_VERSION_GTE(major,minor,subminor) \
346  ((SLEPC_VERSION_MAJOR * 10000 + \
347  SLEPC_VERSION_MINOR * 100 + \
348  SLEPC_VERSION_SUBMINOR) \
349  >= \
350  (major)*10000 + (minor)*100 + (subminor))
351 
352 /*
353  * Trilinos:
354  */
355 
356 #ifdef DEAL_II_WITH_TRILINOS
357 # define DEAL_II_TRILINOS_VERSION_MAJOR
358 # define DEAL_II_TRILINOS_VERSION_MINOR
359 # define DEAL_II_TRILINOS_VERSION_SUBMINOR
360 
361 # define DEAL_II_TRILINOS_VERSION_GTE(major,minor,subminor) \
362  ((DEAL_II_TRILINOS_VERSION_MAJOR * 10000 + \
363  DEAL_II_TRILINOS_VERSION_MINOR * 100 + \
364  DEAL_II_TRILINOS_VERSION_SUBMINOR) \
365  >= \
366  (major)*10000 + (minor)*100 + (subminor))
367 #endif
368 
369 /*
370  * MPI
371  */
372 
373 #ifdef DEAL_II_WITH_MPI
374 # define DEAL_II_MPI_VERSION_MAJOR
375 # define DEAL_II_MPI_VERSION_MINOR
376 
377 # define DEAL_II_MPI_VERSION_GTE(major,minor) \
378  ((DEAL_II_MPI_VERSION_MAJOR * 100 + \
379  DEAL_II_MPI_VERSION_MINOR) \
380  >= \
381  (major)*100 + (minor))
382 #else
383 # define DEAL_II_MPI_VERSION_GTE(major,minor) false
384 #endif
385 
386 /* #undef DEAL_II_MPI_WITH_CUDA_SUPPORT */
387 
388 /***********************************************************************
389  * Two macro names that we put at the top and bottom of all deal.II files
390  * and that will be expanded to "namespace dealii {" and "}".
391  */
392 
393 #define DEAL_II_NAMESPACE_OPEN namespace dealii {
394 #define DEAL_II_NAMESPACE_CLOSE }
395 
396 /***********************************************************************
397  * Two macros to guard external header includes.
398  *
399  * Selectively disable diagnostics set by "-Wextra" (and similar flags) for
400  * GCC and compiler accepting GCC dialects (such as clang).
401  * "diagnostic push" is supported since gcc-4.6 and clang-3.3.
402  */
403 
404 #ifdef DEAL_II_COMPILER_HAS_DIAGNOSTIC_PRAGMA
405 
406 /* keep pragmas with an exclamation mark in order.. */
407 # define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS \
408 _Pragma("GCC diagnostic push") \
409 _Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"") \
410 _Pragma("GCC diagnostic ignored \"-Wpragmas\"") \
411 _Pragma("GCC diagnostic ignored \"-Wunknown-warning-option\"") \
412 _Pragma("GCC diagnostic ignored \"-Wunknown-warning\"") \
413 _Pragma("GCC diagnostic ignored \"-Wextra\"") \
414 _Pragma("GCC diagnostic ignored \"-Waddress-of-packed-member\"") \
415 _Pragma("GCC diagnostic ignored \"-Wdeprecated-copy\"") \
416 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \
417 _Pragma("GCC diagnostic ignored \"-Wdeprecated-volatile\"") \
418 _Pragma("GCC diagnostic ignored \"-Wexpansion-to-defined\"") \
419 _Pragma("GCC diagnostic ignored \"-Wignored-attributes\"") \
420 _Pragma("GCC diagnostic ignored \"-Wignored-qualifiers\"") \
421 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") \
422 _Pragma("GCC diagnostic ignored \"-Winfinite-recursion\"") \
423 _Pragma("GCC diagnostic ignored \"-Wint-in-bool-context\"") \
424 _Pragma("GCC diagnostic ignored \"-Wmisleading-indentation\"") \
425 _Pragma("GCC diagnostic ignored \"-Wmissing-field-initializers\"") \
426 _Pragma("GCC diagnostic ignored \"-Wnested-anon-types\"") \
427 _Pragma("GCC diagnostic ignored \"-Wnon-virtual-dtor\"") \
428 _Pragma("GCC diagnostic ignored \"-Woverflow\"") \
429 _Pragma("GCC diagnostic ignored \"-Woverloaded-virtual\"") \
430 _Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
431 _Pragma("GCC diagnostic ignored \"-Wsuggest-override\"") \
432 _Pragma("GCC diagnostic ignored \"-Wtautological-constant-out-of-range-compare\"") \
433 _Pragma("GCC diagnostic ignored \"-Wtautological-overlap-compare\"") \
434 _Pragma("GCC diagnostic ignored \"-Wtype-limits\"") \
435 _Pragma("GCC diagnostic ignored \"-Wundef\"") \
436 _Pragma("GCC diagnostic ignored \"-Wunused-but-set-parameter\"") \
437 _Pragma("GCC diagnostic ignored \"-Wunused-but-set-variable\"") \
438 _Pragma("GCC diagnostic ignored \"-Wunused-function\"") \
439 _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") \
440 _Pragma("GCC diagnostic ignored \"-Wunused-private-field\"") \
441 _Pragma("GCC diagnostic ignored \"-Wunused-variable\"") \
442 _Pragma("GCC diagnostic warning \"-Wpragmas\"")
443 
444 # define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS \
445 _Pragma("GCC diagnostic pop")
446 
447 #else
448 
449 # define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
450 # define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
451 
452 #endif
453 
454 /***********************************************************************
455  * Define macros for picking the correct C linkage name for a Fortran function.
456  * See cmake/configure/configure_fortran_mangling.cmake for more information.
457  */
458 
459 #define DEAL_II_FORTRAN_MANGLE(name, NAME) name ## _
460 
461 #define DEAL_II_FORTRAN_MANGLE_UNDERSCORE(name, NAME) name ## _
462 
463 /***********************************************************************
464  * Define a portable preprocessor macro that generates custom warnings
465  * reporting the line and the file where the warning appears. Taken from:
466  * http://goodliffe.blogspot.com/2009/07/c-how-to-say-warning-to-visual-studio-c.html
467  */
468 
469 #ifdef _MSC_VER
470  #define DEAL_II_STRINGIZE_HELPER(x) #x
471  #define DEAL_II_STRINGIZE(x) DEAL_II_STRINGIZE_HELPER(x)
472  #define DEAL_II_DO_PRAGMA(x) __pragma(x)
473  #define DEAL_II_WARNING(desc) DEAL_II_DO_PRAGMA(message(__FILE__ "(" DEAL_II_STRINGIZE(__LINE__) ") : warning: " #desc))
474 #else
475  #define DEAL_II_DO_PRAGMA(x) _Pragma(#x)
476  #define DEAL_II_WARNING(desc) DEAL_II_DO_PRAGMA(message(#desc))
477 #endif
478 
479 /***********************************************************************
480  * Final inclusions:
481  */
482 
483 /*
484  * Some systems require including mpi.h before stdio.h which happens in
485  * types.h
486  */
487 #if defined(DEAL_II_WITH_MPI) || defined(DEAL_II_WITH_PETSC)
489 # include <mpi.h>
491 #endif
492 
493 #include <deal.II/base/numbers.h>
494 #include <deal.II/base/types.h>
495 
496 /*
497  * Include the boost version header to do a quick version check in case, by
498  * accident, we have configured with one version of boost but are compiling
499  * either the library or an external application with a different version of
500  * boost.
501  */
502 #include <boost/version.hpp>
503 static_assert(
504  BOOST_VERSION == 100000 * DEAL_II_BOOST_VERSION_MAJOR +
507  "The version number of boost that you are compiling with does not match the "
508  "version number of boost found during deal.II's configuration step. This "
509  "leads to difficult to understand bugs and is not supported. Please check "
510  "that you have set up your application with the same version of boost as "
511  "deal.II.");
512 
513 #endif
#define DEAL_II_BOOST_VERSION_MAJOR
Definition: config.h:252
#define DEAL_II_BOOST_VERSION_SUBMINOR
Definition: config.h:254
#define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
Definition: config.h:407
#define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
Definition: config.h:444
#define DEAL_II_BOOST_VERSION_MINOR
Definition: config.h:253