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