Reference documentation for deal.II version 8.5.1
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 "8.5.1"
27 
28 #define DEAL_II_VERSION_MAJOR 8
29 #define DEAL_II_VERSION_MINOR 5
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_ARPACK
39 #define DEAL_II_WITH_BZIP2
40 /* #undef DEAL_II_WITH_CUDA */
41 #define DEAL_II_WITH_CXX11
42 #define DEAL_II_WITH_CXX14
43 #define DEAL_II_WITH_GSL
44 #define DEAL_II_WITH_HDF5
45 #define DEAL_II_WITH_LAPACK
46 #define DEAL_II_WITH_METIS
47 #define DEAL_II_WITH_MPI
48 #define DEAL_II_WITH_MUPARSER
49 #define DEAL_II_WITH_NETCDF
50 #define DEAL_II_WITH_OPENCASCADE
51 #define DEAL_II_WITH_P4EST
52 #define DEAL_II_WITH_PETSC
53 #define DEAL_II_WITH_SLEPC
54 #define DEAL_II_WITH_THREADS
55 #define DEAL_II_WITH_TRILINOS
56 #define DEAL_II_WITH_UMFPACK
57 #define DEAL_II_WITH_ZLIB
58 
59 
60 /***********************************************************************
61  * Compiler bugs:
62  *
63  * For documentation see cmake/checks/check_03_compiler_bugs.cmake
64  */
65 
66 /* #undef DEAL_II_TEMPL_SPEC_FRIEND_BUG */
67 /* #undef DEAL_II_MEMBER_ARRAY_SPECIALIZATION_BUG */
68 /* #undef DEAL_II_MEMBER_VAR_SPECIALIZATION_BUG */
69 /* #undef DEAL_II_EXPLICIT_CONSTRUCTOR_BUG */
70 /* #undef DEAL_II_CONST_MEMBER_DEDUCTION_BUG */
71 /* #undef DEAL_II_BOOST_BIND_COMPILER_BUG */
72 /* #undef DEAL_II_BIND_NO_CONST_OP_PARENTHESES */
73 /* #undef DEAL_II_CONSTEXPR_BUG */
74 
75 
76 /***********************************************************************
77  * Compiler features:
78  *
79  * For documentation see cmake/checks/check_01_compiler_features.cmake
80  */
81 
82 #define DEAL_II_COMPILER_USE_VECTOR_ARITHMETICS
83 /* #undef DEAL_II_VECTOR_ITERATOR_IS_POINTER */
84 #define DEAL_II_HAVE_BUILTIN_EXPECT
85 #define DEAL_II_HAVE_VERBOSE_TERMINATE
86 #define DEAL_II_HAVE_GLIBC_STACKTRACE
87 #define DEAL_II_HAVE_LIBSTDCXX_DEMANGLER
88 /* #undef __PRETTY_FUNCTION__ */
89 #define DEAL_II_DEPRECATED __attribute__((deprecated))
90 #define DEAL_II_ALWAYS_INLINE __attribute__((always_inline))
91 #define DEAL_II_COMPILER_HAS_DIAGNOSTIC_PRAGMA
92 
93 
94 /***********************************************************************
95  * CPU features:
96  *
97  * For documentation see cmake/checks/check_01_cpu_features.cmake
98  */
99 
100 /* #undef DEAL_II_WORDS_BIGENDIAN */
101 #define DEAL_II_COMPILER_VECTORIZATION_LEVEL 1
102 #define DEAL_II_OPENMP_SIMD_PRAGMA _Pragma("omp simd")
103 
104 
105 /***********************************************************************
106  * Language features:
107  *
108  * For documentation see cmake/checks/check_01_cxx_features.cmake
109  */
110 
111 #define DEAL_II_HAVE_CXX11_IS_TRIVIALLY_COPYABLE
112 /* #undef DEAL_II_HAVE_ISNAN */
113 #define DEAL_II_HAVE_STD_ISNAN
114 /* #undef DEAL_II_HAVE_UNDERSCORE_ISNAN */
115 #define DEAL_II_HAVE_ISFINITE
116 #define DEAL_II_HAVE_FP_EXCEPTIONS
117 /* #undef DEAL_II_HAVE_COMPLEX_OPERATOR_OVERLOADS */
118 
119 
120 /***********************************************************************
121  * System features:
122  *
123  * For documentation see cmake/checks/check_02_system_features.cmake
124  */
125 
126 #define DEAL_II_HAVE_SYS_RESOURCE_H
127 #define DEAL_II_HAVE_SYS_TIME_H
128 #define DEAL_II_HAVE_SYS_TIMES_H
129 #define DEAL_II_HAVE_SYS_TYPES_H
130 #define DEAL_II_HAVE_UNISTD_H
131 #define DEAL_II_HAVE_GETHOSTNAME
132 #define DEAL_II_HAVE_GETPID
133 #define DEAL_II_HAVE_TIMES
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/FindARPACK.cmake */
147 /* #undef DEAL_II_ARPACK_WITH_PARPACK */
148 
149 /* cmake/configure/configure_1_threads.cmake */
150 #define DEAL_II_USE_MT_POSIX
151 /* #undef DEAL_II_USE_MT_POSIX_NO_BARRIERS */
152 
153 /*
154  * Depending on the use of threads, we will have to make some variables
155  * volatile. We do this here in a very old-fashioned C-style, but still
156  * convenient way.
157  */
158 #ifdef DEAL_II_WITH_THREADS
159 # define DEAL_VOLATILE volatile
160 #else
161 # define DEAL_VOLATILE
162 #endif
163 
164 
165 /***********************************************************************
166  * Various macros for version number query and comparison:
167  *
168  * These macros are defined to make testing for specific versions within
169  * the deal.II main code as simple as possible.
170  */
171 
172 /*
173  * deal.II:
174  */
175 
176 #define DEAL_II_VERSION_GTE(major,minor,subminor) \
177  ((DEAL_II_VERSION_MAJOR * 10000 + \
178  DEAL_II_VERSION_MINOR * 100 + \
179  DEAL_II_VERSION_SUBMINOR) \
180  >= \
181  (major)*10000 + (minor)*100 + (subminor))
182 
183 /*
184  * p4est:
185  */
186 
187 #ifdef DEAL_II_WITH_P4EST
188 # define DEAL_II_P4EST_VERSION_MAJOR 9999
189 # define DEAL_II_P4EST_VERSION_MINOR 9999
190 # define DEAL_II_P4EST_VERSION_SUBMINOR 0
191 # define DEAL_II_P4EST_VERSION_PATCH 0
192 
193 # define DEAL_II_P4EST_VERSION_GTE(major,minor,subminor,patch) \
194  ((DEAL_II_P4EST_VERSION_MAJOR * 1000000 + \
195  DEAL_II_P4EST_VERSION_MINOR * 10000 + \
196  DEAL_II_P4EST_VERSION_SUBMINOR * 100 + \
197  DEAL_II_P4EST_VERSION_PATCH) \
198  >= \
199  (major)*1000000 + (minor)*10000 + (subminor)*100 + (patch))
200 #else
201  // p4est up to 0.3.4.1 didn't define P4EST_VERSION_*. since
202  // we didn't supports anything before 0.3.4, we assume 0.3.4
203  // This means that we can't use the new features in 0.3.4.1
204 # define DEAL_II_P4EST_VERSION_GTE(major,minor,subminor,patch) \
205  ((0 * 1000000 + \
206  3 * 10000 + \
207  4 * 100 + \
208  0) \
209  >= \
210  (major)*1000000 + (minor)*10000 + (subminor)*100 + (patch))
211 #endif
212 
213 /*
214  * PETSc:
215  *
216  * Note: The following definitions will be set in petscconf.h and
217  * petscversion.h, so we don't repeat them here.
218  *
219  * PETSC_VERSION_MAJOR
220  * PETSC_VERSION_MINOR
221  * PETSC_VERSION_SUBMINOR
222  * PETSC_VERSION_PATCH
223  * PETSC_VERSION_RELEASE
224  * PETSC_USE_COMPLEX
225  */
226 
227 #define DEAL_II_PETSC_VERSION_LT(major,minor,subminor) \
228  ((PETSC_VERSION_MAJOR * 10000 + \
229  PETSC_VERSION_MINOR * 100 + \
230  PETSC_VERSION_SUBMINOR) \
231  < \
232  (major)*10000 + (minor)*100 + (subminor))
233 
234 #define DEAL_II_PETSC_VERSION_GTE(major,minor,subminor) \
235  ((PETSC_VERSION_MAJOR * 10000 + \
236  PETSC_VERSION_MINOR * 100 + \
237  PETSC_VERSION_SUBMINOR) \
238  >= \
239  (major)*10000 + (minor)*100 + (subminor))
240 
241 /*
242  * Trilinos:
243  */
244 
245 #ifdef DEAL_II_WITH_TRILINOS
246 # define DEAL_II_TRILINOS_VERSION_MAJOR 12
247 # define DEAL_II_TRILINOS_VERSION_MINOR 12
248 # define DEAL_II_TRILINOS_VERSION_SUBMINOR 1
249 
250 # define DEAL_II_TRILINOS_VERSION_GTE(major,minor,subminor) \
251  ((DEAL_II_TRILINOS_VERSION_MAJOR * 10000 + \
252  DEAL_II_TRILINOS_VERSION_MINOR * 100 + \
253  DEAL_II_TRILINOS_VERSION_SUBMINOR) \
254  >= \
255  (major)*10000 + (minor)*100 + (subminor))
256 #endif
257 
258 
259 /***********************************************************************
260  * Two macro names that we put at the top and bottom of all deal.II files
261  * and that will be expanded to "namespace dealii {" and "}".
262  */
263 
264 #define DEAL_II_NAMESPACE_OPEN namespace dealii {
265 #define DEAL_II_NAMESPACE_CLOSE }
266 
267 
268 /***********************************************************************
269  * A macro that is used to mark function as not throwing any exceptions.
270  * The appropriate way to do this in C++98 was to say
271  * void foo () throw ();
272  * but in C++11, this is now
273  * void foo () noexcept;
274  * Furthermore, the first of these two methods is being deprecated, so
275  * we want to use the latter when possible.
276  */
277 
278 #ifdef DEAL_II_WITH_CXX11
279 # define DEAL_II_NOEXCEPT noexcept
280 #else
281 # define DEAL_II_NOEXCEPT throw()
282 #endif
283 
284 
285 /***********************************************************************
286  * Two macros to guard external header includes.
287  *
288  * Selectively disable diagnostics set by "-Wextra" (and similar flags) for
289  * GCC and compiler accepting GCC dialects (such as clang).
290  * "diagnostic push" is supported since gcc-4.6 and clang-3.3.
291  */
292 
293 #ifdef DEAL_II_COMPILER_HAS_DIAGNOSTIC_PRAGMA
294 
295 # define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS \
296 _Pragma("GCC diagnostic push") \
297 _Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"") \
298 _Pragma("GCC diagnostic ignored \"-Wpragmas\"") \
299 _Pragma("GCC diagnostic ignored \"-Wextra\"") \
300 _Pragma("GCC diagnostic ignored \"-Woverloaded-virtual\"") \
301 _Pragma("GCC diagnostic ignored \"-Wunused-function\"") \
302 _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") \
303 _Pragma("GCC diagnostic ignored \"-Wunused-variable\"") \
304 _Pragma("GCC diagnostic ignored \"-Wtype-limits\"") \
305 _Pragma("GCC diagnostic ignored \"-Wtautological-constant-out-of-range-compare\"") \
306 _Pragma("GCC diagnostic ignored \"-Wmissing-field-initializers\"") \
307 _Pragma("GCC diagnostic ignored \"-Winfinite-recursion\"") \
308 _Pragma("GCC diagnostic ignored \"-Wunused-but-set-parameter\"") \
309 _Pragma("GCC diagnostic ignored \"-Wnested-anon-types\"") \
310 _Pragma("GCC diagnostic ignored \"-Wunused-private-field\"") \
311 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \
312 _Pragma("GCC diagnostic ignored \"-Wunused-but-set-variable\"") \
313 _Pragma("GCC diagnostic ignored \"-Wexpansion-to-defined\"") \
314 _Pragma("GCC diagnostic ignored \"-Wignored-attributes\"") \
315 _Pragma("GCC diagnostic ignored \"-Wmisleading-indentation\"") \
316 _Pragma("GCC diagnostic ignored \"-Wundef\"") \
317 _Pragma("GCC diagnostic ignored \"-Wnon-virtual-dtor\"") \
318 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") \
319 _Pragma("GCC diagnostic ignored \"-Wint-in-bool-context\"") \
320 _Pragma("GCC diagnostic warning \"-Wpragmas\"")
321 
322 # define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS \
323 _Pragma("GCC diagnostic pop")
324 
325 #else
326 
327 # define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
328 # define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
329 
330 #endif
331 
332 
338 #ifndef DEAL_II_WITH_CXX11
339 #define BOOST_NO_CXX11_VARIADIC_TEMPLATES
340 #endif
341 
342 
343 /***********************************************************************
344  * Final inclusions:
345  */
346 
347 /*
348  * Some systems require including mpi.h before stdio.h which happens in
349  * types.h
350  */
351 #if defined(DEAL_II_WITH_MPI) || defined(DEAL_II_WITH_PETSC)
352 # include <mpi.h>
353 #endif
354 
355 #include <deal.II/base/numbers.h>
356 #include <deal.II/base/types.h>
357 
358 #endif