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