Reference documentation for deal.II version 9.2.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 - 2020 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.2.0"
27 
28 #define DEAL_II_VERSION_MAJOR 9
29 #define DEAL_II_VERSION_MINOR 2
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 #define DEAL_II_WITH_ASSIMP
41 #define DEAL_II_WITH_COMPLEX_VALUES
42 /* #undef DEAL_II_WITH_CUDA */
43 #define DEAL_II_WITH_CXX14
44 #define DEAL_II_WITH_CXX17
45 #define DEAL_II_WITH_GINKGO
46 #define DEAL_II_WITH_GSL
47 #define DEAL_II_WITH_GMSH
48 /* #undef DEAL_II_WITH_HDF5 */
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 /* #undef DEAL_II_WITH_MPI */
54 #define DEAL_II_WITH_MUPARSER
55 #define DEAL_II_WITH_NANOFLANN
56 #define DEAL_II_WITH_NETCDF
57 #define DEAL_II_WITH_OPENCASCADE
58 /* #undef DEAL_II_WITH_P4EST */
59 /* #undef DEAL_II_WITH_PETSC */
60 /* #undef DEAL_II_WITH_SCALAPACK */
61 /* #undef DEAL_II_WITH_SLEPC */
62 #define DEAL_II_WITH_SUNDIALS
63 #define DEAL_II_WITH_SYMENGINE
64 #define DEAL_II_WITH_THREADS
65 /* #undef DEAL_II_WITH_TRILINOS */
66 #define DEAL_II_WITH_UMFPACK
67 #define DEAL_II_WITH_ZLIB
68 
69 // defined for backwards compatibility with pre-C++11
70 #define DEAL_II_WITH_CXX11
71 #define DEAL_II_NOEXCEPT noexcept
72 
73 /***********************************************************************
74  * Compiler bugs:
75  *
76  * For documentation see cmake/checks/check_03_compiler_bugs.cmake
77  */
78 
79 /* #undef DEAL_II_TEMPL_SPEC_FRIEND_BUG */
80 /* #undef DEAL_II_MEMBER_ARRAY_SPECIALIZATION_BUG */
81 /* #undef DEAL_II_CONST_MEMBER_DEDUCTION_BUG */
82 /* #undef DEAL_II_BIND_NO_CONST_OP_PARENTHESES */
83 /* #undef DEAL_II_CONSTEXPR_BUG */
84 
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_DEPRECATED [[deprecated]]
99 #define DEAL_II_ALWAYS_INLINE __attribute__((always_inline))
100 #define DEAL_II_RESTRICT __restrict
101 #define DEAL_II_COMPILER_HAS_DIAGNOSTIC_PRAGMA
102 #define DEAL_II_CONSTEXPR constexpr
103 
104 /*
105  * A variable to tell if the compiler used in the current compilation process
106  * understands CUDA code.
107  */
108 #if defined(DEAL_II_WITH_CUDA) && defined(__CUDACC__)
109 # define DEAL_II_COMPILER_CUDA_AWARE
110 #endif
111 
112 /***********************************************************************
113  * CPU features:
114  *
115  * For documentation see cmake/checks/check_01_cpu_features.cmake
116  */
117 
118 /* #undef DEAL_II_WORDS_BIGENDIAN */
119 
120 /*
121  * This sets the largest number of vectorization bits detected for the given
122  * compiler flags and hardware (e.g. 256 for AVX on x86-64 architectures) for
123  * use in deal.II's instrinsics-based VectorizedArray class.
124  */
125 #define DEAL_II_VECTORIZATION_WIDTH_IN_BITS 128
126 
127 /*
128  * Backward compatibility setting
129  */
130 #if DEAL_II_VECTORIZATION_WIDTH_IN_BITS == 512
131 #define DEAL_II_COMPILER_VECTORIZATION_LEVEL 3
132 #elif DEAL_II_VECTORIZATION_WIDTH_IN_BITS == 256
133 #define DEAL_II_COMPILER_VECTORIZATION_LEVEL 2
134 #elif DEAL_II_VECTORIZATION_WIDTH_IN_BITS == 128
135 #define DEAL_II_COMPILER_VECTORIZATION_LEVEL 1
136 #else
137 #define DEAL_II_COMPILER_VECTORIZATION_LEVEL 0
138 #endif
139 
140 #define DEAL_II_OPENMP_SIMD_PRAGMA _Pragma("omp simd")
141 
142 
143 /***********************************************************************
144  * Language features:
145  *
146  * For documentation see cmake/checks/check_01_cxx_features.cmake
147  */
148 
149 #define DEAL_II_HAVE_CXX11_IS_TRIVIALLY_COPYABLE
150 #define DEAL_II_HAVE_CXX14_CONSTEXPR
151 #define DEAL_II_HAVE_FP_EXCEPTIONS
152 /* #undef DEAL_II_HAVE_COMPLEX_OPERATOR_OVERLOADS */
153 #define DEAL_II_FALLTHROUGH [[fallthrough]]
154 
155 
156 /***********************************************************************
157  * System features:
158  *
159  * For documentation see cmake/checks/check_02_system_features.cmake
160  */
161 
162 #define DEAL_II_HAVE_SYS_RESOURCE_H
163 #define DEAL_II_HAVE_UNISTD_H
164 #define DEAL_II_HAVE_GETHOSTNAME
165 #define DEAL_II_HAVE_GETPID
166 /* #undef DEAL_II_HAVE_JN */
167 
168 /* #undef DEAL_II_MSVC */
169 
170 
171 /***********************************************************************
172  * Feature configuration
173  *
174  * For documentation see cmake/configure/configure_*.cmake and
175  * cmake/modules/Find*.cmake
176  */
177 
178 /* cmake/modules/FindADOLC.cmake */
179 #define DEAL_II_ADOLC_WITH_ATRIG_ERF
180 #define DEAL_II_ADOLC_WITH_ADVANCED_BRANCHING
181 /* #undef DEAL_II_ADOLC_WITH_TAPELESS_REFCOUNTING */
182 
183 /* cmake/modules/FindARPACK.cmake */
184 /* #undef DEAL_II_ARPACK_WITH_PARPACK */
185 
186 /* cmake/modules/FindPETSC.cmake */
187 /* #undef DEAL_II_PETSC_WITH_COMPLEX */
188 #define DEAL_II_PETSC_WITH_HYPRE
189 /* #undef DEAL_II_PETSC_WITH_MUMPS */
190 
191 /* cmake/modules/FindSUNDIALS.cmake */
192 #define DEAL_II_SUNDIALS_WITH_IDAS
193 
194 /* cmake/modules/FindSYMENGINE.cmake */
195 /* #undef DEAL_II_SYMENGINE_WITH_LLVM */
196 
197 /* cmake/configure/configure_1_threads.cmake */
198 #define DEAL_II_USE_MT_POSIX
199 /* #undef DEAL_II_USE_MT_POSIX_NO_BARRIERS */
200 
201 /* cmake/configure/configure_2_trilinos.cmake */
202 /* #undef DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD */
203 /* #undef DEAL_II_TRILINOS_WITH_EPETRAEXT */
204 /* #undef DEAL_II_TRILINOS_WITH_ROL */
205 /* #undef DEAL_II_TRILINOS_WITH_SACADO */
206 /* #undef DEAL_II_TRILINOS_WITH_TPETRA */
207 /* #undef DEAL_II_TRILINOS_WITH_MUELU */
208 /* #undef DEAL_II_TRILINOS_WITH_ZOLTAN */
209 
210 
211 /***********************************************************************
212  * Various macros for version number query and comparison:
213  *
214  * These macros are defined to make testing for specific versions within
215  * the deal.II main code as simple as possible.
216  */
217 
218 /*
219  * deal.II:
220  */
221 
222 #define DEAL_II_VERSION_GTE(major,minor,subminor) \
223  ((DEAL_II_VERSION_MAJOR * 10000 + \
224  DEAL_II_VERSION_MINOR * 100 + \
225  DEAL_II_VERSION_SUBMINOR) \
226  >= \
227  (major)*10000 + (minor)*100 + (subminor))
228 
229 
230 /*
231  * Gmsh:
232  */
233 #ifdef DEAL_II_WITH_GMSH
234 # define DEAL_II_GMSH_EXECUTABLE_PATH "/usr/sbin/gmsh"
235 #endif
236 
237 /*
238  * p4est:
239  */
240 
241 #ifdef DEAL_II_WITH_P4EST
242 # define DEAL_II_P4EST_VERSION_MAJOR
243 # define DEAL_II_P4EST_VERSION_MINOR
244 # define DEAL_II_P4EST_VERSION_SUBMINOR
245 # define DEAL_II_P4EST_VERSION_PATCH
246 
247 # define DEAL_II_P4EST_VERSION_GTE(major,minor,subminor,patch) \
248  ((DEAL_II_P4EST_VERSION_MAJOR * 1000000 + \
249  DEAL_II_P4EST_VERSION_MINOR * 10000 + \
250  DEAL_II_P4EST_VERSION_SUBMINOR * 100 + \
251  DEAL_II_P4EST_VERSION_PATCH) \
252  >= \
253  (major)*1000000 + (minor)*10000 + (subminor)*100 + (patch))
254 #endif
255 
256 /*
257  * SUNDIALS:
258  */
259 
260 #ifdef DEAL_II_WITH_SUNDIALS
261  # define DEAL_II_SUNDIALS_VERSION_MAJOR 3
262  # define DEAL_II_SUNDIALS_VERSION_MINOR 2
263  # define DEAL_II_SUNDIALS_VERSION_PATCH 1
264 
265  #define DEAL_II_SUNDIALS_VERSION_GTE(major,minor,patch) \
266  ((DEAL_II_SUNDIALS_VERSION_MAJOR * 10000 + \
267  DEAL_II_SUNDIALS_VERSION_MINOR * 100 + \
268  DEAL_II_SUNDIALS_VERSION_PATCH) \
269  >= \
270  (major)*10000 + (minor)*100 + (patch))
271 
272  #define DEAL_II_SUNDIALS_VERSION_LT(major,minor,patch) \
273  ((DEAL_II_SUNDIALS_VERSION_MAJOR * 10000 + \
274  DEAL_II_SUNDIALS_VERSION_MINOR * 100 + \
275  DEAL_II_SUNDIALS_VERSION_PATCH) \
276  < \
277  (major)*10000 + (minor)*100 + (patch))
278 #endif
279 
280 /*
281  * PETSc:
282  *
283  * Note: The following definitions will be set in petscconf.h and
284  * petscversion.h, so we don't repeat them here.
285  *
286  * PETSC_VERSION_MAJOR
287  * PETSC_VERSION_MINOR
288  * PETSC_VERSION_SUBMINOR
289  * PETSC_VERSION_PATCH
290  * PETSC_VERSION_RELEASE
291  * PETSC_USE_COMPLEX
292  */
293 
294 #define DEAL_II_PETSC_VERSION_LT(major,minor,subminor) \
295  ((PETSC_VERSION_MAJOR * 10000 + \
296  PETSC_VERSION_MINOR * 100 + \
297  PETSC_VERSION_SUBMINOR) \
298  < \
299  (major)*10000 + (minor)*100 + (subminor))
300 
301 #define DEAL_II_PETSC_VERSION_GTE(major,minor,subminor) \
302  ((PETSC_VERSION_MAJOR * 10000 + \
303  PETSC_VERSION_MINOR * 100 + \
304  PETSC_VERSION_SUBMINOR) \
305  >= \
306  (major)*10000 + (minor)*100 + (subminor))
307 
308 /*
309  * SLEPC
310  * see slepcversion.h
311  */
312 #define DEAL_II_SLEPC_VERSION_GTE(major,minor,subminor) \
313  ((SLEPC_VERSION_MAJOR * 10000 + \
314  SLEPC_VERSION_MINOR * 100 + \
315  SLEPC_VERSION_SUBMINOR) \
316  >= \
317  (major)*10000 + (minor)*100 + (subminor))
318 
319 /*
320  * Trilinos:
321  */
322 
323 #ifdef DEAL_II_WITH_TRILINOS
324 # define DEAL_II_TRILINOS_VERSION_MAJOR 12
325 # define DEAL_II_TRILINOS_VERSION_MINOR 18
326 # define DEAL_II_TRILINOS_VERSION_SUBMINOR 1
327 
328 # define DEAL_II_TRILINOS_VERSION_GTE(major,minor,subminor) \
329  ((DEAL_II_TRILINOS_VERSION_MAJOR * 10000 + \
330  DEAL_II_TRILINOS_VERSION_MINOR * 100 + \
331  DEAL_II_TRILINOS_VERSION_SUBMINOR) \
332  >= \
333  (major)*10000 + (minor)*100 + (subminor))
334 #endif
335 
336 /*
337  * MPI
338  */
339 
340 #ifdef DEAL_II_WITH_MPI
341 # define DEAL_II_MPI_VERSION_MAJOR
342 # define DEAL_II_MPI_VERSION_MINOR
343 
344 # define DEAL_II_MPI_VERSION_GTE(major,minor) \
345  ((DEAL_II_MPI_VERSION_MAJOR * 100 + \
346  DEAL_II_MPI_VERSION_MINOR) \
347  >= \
348  (major)*100 + (minor))
349 #endif
350 
351 /* #undef DEAL_II_MPI_WITH_CUDA_SUPPORT */
352 
353 /***********************************************************************
354  * Two macro names that we put at the top and bottom of all deal.II files
355  * and that will be expanded to "namespace dealii {" and "}".
356  */
357 
358 #define DEAL_II_NAMESPACE_OPEN namespace dealii {
359 #define DEAL_II_NAMESPACE_CLOSE }
360 
361 /***********************************************************************
362  * Two macros to guard external header includes.
363  *
364  * Selectively disable diagnostics set by "-Wextra" (and similar flags) for
365  * GCC and compiler accepting GCC dialects (such as clang).
366  * "diagnostic push" is supported since gcc-4.6 and clang-3.3.
367  */
368 
369 #ifdef DEAL_II_COMPILER_HAS_DIAGNOSTIC_PRAGMA
370 
371 /* keep pragmas with an exclamation mark in order.. */
372 # define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS \
373 _Pragma("GCC diagnostic push") \
374 _Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"") \
375 _Pragma("GCC diagnostic ignored \"-Wpragmas\"") \
376 _Pragma("GCC diagnostic ignored \"-Wunknown-warning-option\"") \
377 _Pragma("GCC diagnostic ignored \"-Wunknown-warning\"") \
378 _Pragma("GCC diagnostic ignored \"-Wextra\"") \
379 _Pragma("GCC diagnostic ignored \"-Waddress-of-packed-member\"") \
380 _Pragma("GCC diagnostic ignored \"-Wdeprecated-copy\"") \
381 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \
382 _Pragma("GCC diagnostic ignored \"-Wexpansion-to-defined\"") \
383 _Pragma("GCC diagnostic ignored \"-Wexpansion-to-defined\"") \
384 _Pragma("GCC diagnostic ignored \"-Wignored-attributes\"") \
385 _Pragma("GCC diagnostic ignored \"-Wignored-qualifiers\"") \
386 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") \
387 _Pragma("GCC diagnostic ignored \"-Winfinite-recursion\"") \
388 _Pragma("GCC diagnostic ignored \"-Wint-in-bool-context\"") \
389 _Pragma("GCC diagnostic ignored \"-Wmisleading-indentation\"") \
390 _Pragma("GCC diagnostic ignored \"-Wmissing-field-initializers\"") \
391 _Pragma("GCC diagnostic ignored \"-Wnested-anon-types\"") \
392 _Pragma("GCC diagnostic ignored \"-Wnon-virtual-dtor\"") \
393 _Pragma("GCC diagnostic ignored \"-Woverflow\"") \
394 _Pragma("GCC diagnostic ignored \"-Woverloaded-virtual\"") \
395 _Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
396 _Pragma("GCC diagnostic ignored \"-Wsuggest-override\"") \
397 _Pragma("GCC diagnostic ignored \"-Wtautological-constant-out-of-range-compare\"") \
398 _Pragma("GCC diagnostic ignored \"-Wtautological-overlap-compare\"") \
399 _Pragma("GCC diagnostic ignored \"-Wtype-limits\"") \
400 _Pragma("GCC diagnostic ignored \"-Wundef\"") \
401 _Pragma("GCC diagnostic ignored \"-Wunused-but-set-parameter\"") \
402 _Pragma("GCC diagnostic ignored \"-Wunused-but-set-variable\"") \
403 _Pragma("GCC diagnostic ignored \"-Wunused-function\"") \
404 _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") \
405 _Pragma("GCC diagnostic ignored \"-Wunused-private-field\"") \
406 _Pragma("GCC diagnostic ignored \"-Wunused-variable\"") \
407 _Pragma("GCC diagnostic warning \"-Wpragmas\"")
408 
409 # define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS \
410 _Pragma("GCC diagnostic pop")
411 
412 #else
413 
414 # define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
415 # define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
416 
417 #endif
418 
419 /***********************************************************************
420  * Define a portable preprocessor macro that generates custom warnings
421  * reporting the line and the file where the warning appears. Taken from:
422  * http://goodliffe.blogspot.com/2009/07/c-how-to-say-warning-to-visual-studio-c.html
423  */
424 
425 #ifdef _MSC_VER
426  #define DEAL_II_STRINGIZE_HELPER(x) #x
427  #define DEAL_II_STRINGIZE(x) DEAL_II_STRINGIZE_HELPER(x)
428  #define DEAL_II_DO_PRAGMA(x) __pragma(x)
429  #define DEAL_II_WARNING(desc) DEAL_II_DO_PRAGMA(message(__FILE__ "(" DEAL_II_STRINGIZE(__LINE__) ") : warning: " #desc))
430 #else
431  #define DEAL_II_DO_PRAGMA(x) _Pragma(#x)
432  #define DEAL_II_WARNING(desc) DEAL_II_DO_PRAGMA(message(#desc))
433 #endif
434 
435 /***********************************************************************
436  * Final inclusions:
437  */
438 
439 /*
440  * Some systems require including mpi.h before stdio.h which happens in
441  * types.h
442  */
443 #if defined(DEAL_II_WITH_MPI) || defined(DEAL_II_WITH_PETSC)
445 # include <mpi.h>
447 #endif
448 
449 #include <deal.II/base/numbers.h>
450 #include <deal.II/base/types.h>
451 
452 #endif
types.h
DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
#define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
Definition: config.h:409
mpi.h
numbers.h
DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
#define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
Definition: config.h:372