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