Reference documentation for deal.II version 9.0.0
config.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2012 - 2016 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 at
12 // the top level of the deal.II distribution.
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.0.0"
27 
28 #define DEAL_II_VERSION_MAJOR 9
29 #define DEAL_II_VERSION_MINOR 0
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 /* #undef DEAL_II_WITH_CUDA */
42 #define DEAL_II_WITH_CXX14
43 #define DEAL_II_WITH_CXX17
44 #define DEAL_II_WITH_GSL
45 #define DEAL_II_WITH_GMSH
46 /* #undef DEAL_II_WITH_HDF5 */
47 #define DEAL_II_WITH_LAPACK
48 /* #undef LAPACK_WITH_64BIT_BLAS_INDICES */
49 #define DEAL_II_WITH_METIS
50 /* #undef DEAL_II_WITH_MPI */
51 #define DEAL_II_WITH_MUPARSER
52 #define DEAL_II_WITH_NANOFLANN
53 #define DEAL_II_WITH_NETCDF
54 #define DEAL_II_WITH_OPENCASCADE
55 /* #undef DEAL_II_WITH_P4EST */
56 /* #undef DEAL_II_WITH_PETSC */
57 /* #undef DEAL_II_WITH_SCALAPACK */
58 /* #undef DEAL_II_WITH_SLEPC */
59 #define DEAL_II_WITH_SUNDIALS
60 #define DEAL_II_WITH_THREADS
61 /* #undef DEAL_II_WITH_TRILINOS */
62 #define DEAL_II_WITH_UMFPACK
63 #define DEAL_II_WITH_ZLIB
64 
65 // defined for backwards compatibility with pre-C++11
66 #define DEAL_II_WITH_CXX11
67 #define DEAL_II_NOEXCEPT noexcept
68 
69 /***********************************************************************
70  * Compiler bugs:
71  *
72  * For documentation see cmake/checks/check_03_compiler_bugs.cmake
73  */
74 
75 /* #undef DEAL_II_TEMPL_SPEC_FRIEND_BUG */
76 /* #undef DEAL_II_MEMBER_ARRAY_SPECIALIZATION_BUG */
77 /* #undef DEAL_II_CONST_MEMBER_DEDUCTION_BUG */
78 /* #undef DEAL_II_BIND_NO_CONST_OP_PARENTHESES */
79 /* #undef DEAL_II_CONSTEXPR_BUG */
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_VERBOSE_TERMINATE
92 #define DEAL_II_HAVE_GLIBC_STACKTRACE
93 #define DEAL_II_HAVE_LIBSTDCXX_DEMANGLER
94 /* #undef __PRETTY_FUNCTION__ */
95 #define DEAL_II_DEPRECATED [[deprecated]]
96 #define DEAL_II_ALWAYS_INLINE __attribute__((always_inline))
97 #define DEAL_II_RESTRICT __restrict
98 #define DEAL_II_COMPILER_HAS_DIAGNOSTIC_PRAGMA
99 
100 
101 /***********************************************************************
102  * CPU features:
103  *
104  * For documentation see cmake/checks/check_01_cpu_features.cmake
105  */
106 
107 /* #undef DEAL_II_WORDS_BIGENDIAN */
108 #define DEAL_II_COMPILER_VECTORIZATION_LEVEL 1
109 #define DEAL_II_OPENMP_SIMD_PRAGMA _Pragma("omp simd")
110 
111 
112 /***********************************************************************
113  * Language features:
114  *
115  * For documentation see cmake/checks/check_01_cxx_features.cmake
116  */
117 
118 #define DEAL_II_HAVE_CXX11_IS_TRIVIALLY_COPYABLE
119 #define DEAL_II_HAVE_FP_EXCEPTIONS
120 /* #undef DEAL_II_HAVE_COMPLEX_OPERATOR_OVERLOADS */
121 #define DEAL_II_FALLTHROUGH [[fallthrough]]
122 
123 
124 /***********************************************************************
125  * System features:
126  *
127  * For documentation see cmake/checks/check_02_system_features.cmake
128  */
129 
130 #define DEAL_II_HAVE_SYS_RESOURCE_H
131 #define DEAL_II_HAVE_UNISTD_H
132 #define DEAL_II_HAVE_GETHOSTNAME
133 #define DEAL_II_HAVE_GETPID
134 #define DEAL_II_HAVE_JN
135 
136 /* #undef DEAL_II_MSVC */
137 
138 
139 /***********************************************************************
140  * Feature configuration
141  *
142  * For documentation see cmake/configure/configure_*.cmake and
143  * cmake/modules/Find*.cmake
144  */
145 
146 /* cmake/modules/FindADOLC.cmake */
147 #define DEAL_II_ADOLC_WITH_ATRIG_ERF
148 #define DEAL_II_ADOLC_WITH_ADVANCED_BRANCHING
149 
150 /* cmake/modules/FindARPACK.cmake */
151 /* #undef DEAL_II_ARPACK_WITH_PARPACK */
152 
153 /* cmake/modules/FindPETSC.cmake */
154 /* #undef DEAL_II_PETSC_WITH_HYPRE */
155 /* #undef DEAL_II_PETSC_WITH_MUMPS */
156 
157 /* cmake/modules/FindSUNDIALS.cmake */
158 #define DEAL_II_SUNDIALS_WITH_IDAS
159 
160 /* cmake/configure/configure_1_threads.cmake */
161 #define DEAL_II_USE_MT_POSIX
162 /* #undef DEAL_II_USE_MT_POSIX_NO_BARRIERS */
163 
164 /* cmake/configure/configure_2_trilinos.cmake */
165 /* #undef DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD */
166 /* #undef DEAL_II_TRILINOS_WITH_ROL */
167 /* #undef DEAL_II_TRILINOS_WITH_ZOLTAN */
168 
169 /*
170  * Depending on the use of threads, we will have to make some variables
171  * volatile. We do this here in a very old-fashioned C-style, but still
172  * convenient way.
173  *
174  * @deprecated This macro is deprecated in favor of using the
175  * <code>std::atomic</code> template class.
176  */
177 #ifdef DEAL_II_WITH_THREADS
178 # define DEAL_VOLATILE volatile
179 #else
180 # define DEAL_VOLATILE
181 #endif
182 
183 
184 /***********************************************************************
185  * Various macros for version number query and comparison:
186  *
187  * These macros are defined to make testing for specific versions within
188  * the deal.II main code as simple as possible.
189  */
190 
191 /*
192  * deal.II:
193  */
194 
195 #define DEAL_II_VERSION_GTE(major,minor,subminor) \
196  ((DEAL_II_VERSION_MAJOR * 10000 + \
197  DEAL_II_VERSION_MINOR * 100 + \
198  DEAL_II_VERSION_SUBMINOR) \
199  >= \
200  (major)*10000 + (minor)*100 + (subminor))
201 
202 
203 /*
204  * Gmsh:
205  */
206 #ifdef DEAL_II_WITH_GMSH
207 # define DEAL_II_GMSH_EXECUTABLE_PATH "/usr/bin/gmsh"
208 #endif
209 
210 /*
211  * p4est:
212  */
213 
214 #ifdef DEAL_II_WITH_P4EST
215 # define DEAL_II_P4EST_VERSION_MAJOR
216 # define DEAL_II_P4EST_VERSION_MINOR
217 # define DEAL_II_P4EST_VERSION_SUBMINOR
218 # define DEAL_II_P4EST_VERSION_PATCH
219 
220 # define DEAL_II_P4EST_VERSION_GTE(major,minor,subminor,patch) \
221  ((DEAL_II_P4EST_VERSION_MAJOR * 1000000 + \
222  DEAL_II_P4EST_VERSION_MINOR * 10000 + \
223  DEAL_II_P4EST_VERSION_SUBMINOR * 100 + \
224  DEAL_II_P4EST_VERSION_PATCH) \
225  >= \
226  (major)*1000000 + (minor)*10000 + (subminor)*100 + (patch))
227 #else
228  // p4est up to 0.3.4.1 didn't define P4EST_VERSION_*. since
229  // we didn't supports anything before 0.3.4, we assume 0.3.4
230  // This means that we can't use the new features in 0.3.4.1
231 # define DEAL_II_P4EST_VERSION_GTE(major,minor,subminor,patch) \
232  ((0 * 1000000 + \
233  3 * 10000 + \
234  4 * 100 + \
235  0) \
236  >= \
237  (major)*1000000 + (minor)*10000 + (subminor)*100 + (patch))
238 #endif
239 
240  /*
241  * SUNDIALS:
242  *
243  * Note: The following definitions will be set in sundials_config.h,
244  * so we don't repeat them here.
245  *
246  * SUNDIALS_VERSION_MAJOR
247  * SUNDIALS_VERSION_MINOR
248  * SUNDIALS_VERSION_PATCH
249  */
250 
251  #define DEAL_II_SUNDIALS_VERSION_GTE(major,minor,subminor) \
252  ((SUNDIALS_VERSION_MAJOR * 10000 + \
253  SUNDIALS_VERSION_MINOR * 100 + \
254  SUNDIALS_VERSION_SUBMINOR) \
255  >= \
256  (major)*10000 + (minor)*100 + (subminor))
257 
258  #define DEAL_II_SUNDIALS_VERSION_LT(major,minor,subminor) \
259  ((SUNDIALS_VERSION_MAJOR * 10000 + \
260  SUNDIALS_VERSION_MINOR * 100 + \
261  SUNDIALS_VERSION_SUBMINOR) \
262  < \
263  (major)*10000 + (minor)*100 + (subminor))
264 
265 /*
266  * PETSc:
267  *
268  * Note: The following definitions will be set in petscconf.h and
269  * petscversion.h, so we don't repeat them here.
270  *
271  * PETSC_VERSION_MAJOR
272  * PETSC_VERSION_MINOR
273  * PETSC_VERSION_SUBMINOR
274  * PETSC_VERSION_PATCH
275  * PETSC_VERSION_RELEASE
276  * PETSC_USE_COMPLEX
277  */
278 
279 #define DEAL_II_PETSC_VERSION_LT(major,minor,subminor) \
280  ((PETSC_VERSION_MAJOR * 10000 + \
281  PETSC_VERSION_MINOR * 100 + \
282  PETSC_VERSION_SUBMINOR) \
283  < \
284  (major)*10000 + (minor)*100 + (subminor))
285 
286 #define DEAL_II_PETSC_VERSION_GTE(major,minor,subminor) \
287  ((PETSC_VERSION_MAJOR * 10000 + \
288  PETSC_VERSION_MINOR * 100 + \
289  PETSC_VERSION_SUBMINOR) \
290  >= \
291  (major)*10000 + (minor)*100 + (subminor))
292 
293 /*
294  * SLEPC
295  * see slepcversion.h
296  */
297 #define DEAL_II_SLEPC_VERSION_GTE(major,minor,subminor) \
298  ((SLEPC_VERSION_MAJOR * 10000 + \
299  SLEPC_VERSION_MINOR * 100 + \
300  SLEPC_VERSION_SUBMINOR) \
301  >= \
302  (major)*10000 + (minor)*100 + (subminor))
303 
304 /*
305  * Trilinos:
306  */
307 
308 #ifdef DEAL_II_WITH_TRILINOS
309 # define DEAL_II_TRILINOS_VERSION_MAJOR
310 # define DEAL_II_TRILINOS_VERSION_MINOR
311 # define DEAL_II_TRILINOS_VERSION_SUBMINOR
312 
313 # define DEAL_II_TRILINOS_VERSION_GTE(major,minor,subminor) \
314  ((DEAL_II_TRILINOS_VERSION_MAJOR * 10000 + \
315  DEAL_II_TRILINOS_VERSION_MINOR * 100 + \
316  DEAL_II_TRILINOS_VERSION_SUBMINOR) \
317  >= \
318  (major)*10000 + (minor)*100 + (subminor))
319 #endif
320 
321 /*
322  * MPI
323  */
324 
325 #ifdef DEAL_II_WITH_MPI
326 # define DEAL_II_MPI_VERSION_MAJOR
327 # define DEAL_II_MPI_VERSION_MINOR
328 
329 # define DEAL_II_MPI_VERSION_GTE(major,minor) \
330  ((DEAL_II_MPI_VERSION_MAJOR * 100 + \
331  DEAL_II_MPI_VERSION_MINOR) \
332  >= \
333  (major)*100 + (minor))
334 #endif
335 
336 /***********************************************************************
337  * Two macro names that we put at the top and bottom of all deal.II files
338  * and that will be expanded to "namespace dealii {" and "}".
339  */
340 
341 #define DEAL_II_NAMESPACE_OPEN namespace dealii {
342 #define DEAL_II_NAMESPACE_CLOSE }
343 
344 /***********************************************************************
345  * Two macros to guard external header includes.
346  *
347  * Selectively disable diagnostics set by "-Wextra" (and similar flags) for
348  * GCC and compiler accepting GCC dialects (such as clang).
349  * "diagnostic push" is supported since gcc-4.6 and clang-3.3.
350  */
351 
352 #ifdef DEAL_II_COMPILER_HAS_DIAGNOSTIC_PRAGMA
353 
354 /* keep pragmas with an exclamation mark in order.. */
355 # define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS \
356 _Pragma("GCC diagnostic push") \
357 _Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"") \
358 _Pragma("GCC diagnostic ignored \"-Wpragmas\"") \
359 _Pragma("GCC diagnostic ignored \"-Wunknown-warning-option\"") \
360 _Pragma("GCC diagnostic ignored \"-Wunknown-warning\"") \
361 _Pragma("GCC diagnostic ignored \"-Wextra\"") \
362 _Pragma("GCC diagnostic ignored \"-Waddress-of-packed-member\"") \
363 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \
364 _Pragma("GCC diagnostic ignored \"-Wexpansion-to-defined\"") \
365 _Pragma("GCC diagnostic ignored \"-Wexpansion-to-defined\"") \
366 _Pragma("GCC diagnostic ignored \"-Wignored-attributes\"") \
367 _Pragma("GCC diagnostic ignored \"-Wignored-qualifiers\"") \
368 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") \
369 _Pragma("GCC diagnostic ignored \"-Winfinite-recursion\"") \
370 _Pragma("GCC diagnostic ignored \"-Wint-in-bool-context\"") \
371 _Pragma("GCC diagnostic ignored \"-Wmisleading-indentation\"") \
372 _Pragma("GCC diagnostic ignored \"-Wmissing-field-initializers\"") \
373 _Pragma("GCC diagnostic ignored \"-Wnested-anon-types\"") \
374 _Pragma("GCC diagnostic ignored \"-Wnon-virtual-dtor\"") \
375 _Pragma("GCC diagnostic ignored \"-Woverflow\"") \
376 _Pragma("GCC diagnostic ignored \"-Woverloaded-virtual\"") \
377 _Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
378 _Pragma("GCC diagnostic ignored \"-Wtautological-constant-out-of-range-compare\"") \
379 _Pragma("GCC diagnostic ignored \"-Wtype-limits\"") \
380 _Pragma("GCC diagnostic ignored \"-Wundef\"") \
381 _Pragma("GCC diagnostic ignored \"-Wunused-but-set-parameter\"") \
382 _Pragma("GCC diagnostic ignored \"-Wunused-but-set-variable\"") \
383 _Pragma("GCC diagnostic ignored \"-Wunused-function\"") \
384 _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") \
385 _Pragma("GCC diagnostic ignored \"-Wunused-private-field\"") \
386 _Pragma("GCC diagnostic ignored \"-Wunused-variable\"") \
387 _Pragma("GCC diagnostic warning \"-Wpragmas\"")
388 
389 # define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS \
390 _Pragma("GCC diagnostic pop")
391 
392 #else
393 
394 # define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
395 # define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
396 
397 #endif
398 
399 
400 /***********************************************************************
401  * Final inclusions:
402  */
403 
404 /*
405  * Some systems require including mpi.h before stdio.h which happens in
406  * types.h
407  */
408 #if defined(DEAL_II_WITH_MPI) || defined(DEAL_II_WITH_PETSC)
409 # include <mpi.h>
410 #endif
411 
412 #include <deal.II/base/numbers.h>
413 #include <deal.II/base/types.h>
414 
415 #endif