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