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