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