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