Reference documentation for deal.II version 9.3.3
\(\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 - 2021 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.3.3"
27
28#define DEAL_II_VERSION_MAJOR 9
29#define DEAL_II_VERSION_MINOR 3
30#define DEAL_II_VERSION_SUBMINOR 3
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/* #undef DEAL_II_WITH_ARBORX */
41#define DEAL_II_WITH_ASSIMP
42#define DEAL_II_WITH_COMPLEX_VALUES
43/* #undef DEAL_II_WITH_CUDA */
44#define DEAL_II_WITH_GINKGO
45#define DEAL_II_WITH_GMSH
46#define DEAL_II_WITH_GSL
47/* #undef DEAL_II_WITH_HDF5 */
48/* #undef DEAL_II_WITH_KOKKOS */
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/* #undef DEAL_II_WITH_OPENCASCADE */
56/* #undef DEAL_II_WITH_P4EST */
57/* #undef DEAL_II_WITH_PETSC */
58/* #undef DEAL_II_WITH_SCALAPACK */
59/* #undef DEAL_II_WITH_SLEPC */
60#define DEAL_II_WITH_SUNDIALS
61#define DEAL_II_WITH_SYMENGINE
62#define DEAL_II_WITH_TBB
63/* #undef DEAL_II_WITH_TRILINOS */
64#define DEAL_II_WITH_UMFPACK
65#define DEAL_II_WITH_ZLIB
66
67#ifdef DEAL_II_WITH_TBB
72#define DEAL_II_WITH_THREADS
73
74#define TBB_SUPPRESS_DEPRECATED_MESSAGES 1
75
76#define DEAL_II_TBB_WITH_ONEAPI
77
78#endif
79
80/***********************************************************************
81 * Compiler bugs:
82 *
83 * For documentation see cmake/checks/check_03_compiler_bugs.cmake
84 */
85
86/* #undef DEAL_II_DELETED_MOVE_CONSTRUCTOR_BUG */
87
88/***********************************************************************
89 * Compiler features:
90 *
91 * For documentation see cmake/checks/check_01_compiler_features.cmake
92 */
93
94#define DEAL_II_COMPILER_USE_VECTOR_ARITHMETICS
95/* #undef DEAL_II_VECTOR_ITERATOR_IS_POINTER */
96#define DEAL_II_HAVE_BUILTIN_EXPECT
97#define DEAL_II_HAVE_GLIBC_STACKTRACE
98#define DEAL_II_HAVE_LIBSTDCXX_DEMANGLER
99/* #undef __PRETTY_FUNCTION__ */
100#define DEAL_II_ALWAYS_INLINE __attribute__((always_inline))
101#define DEAL_II_RESTRICT __restrict
102#define DEAL_II_COMPILER_HAS_DIAGNOSTIC_PRAGMA
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_CXX14
150#define DEAL_II_HAVE_CXX17
151/* #undef DEAL_II_HAVE_CXX20 */
152
153#define DEAL_II_HAVE_FP_EXCEPTIONS
154/* #undef DEAL_II_HAVE_COMPLEX_OPERATOR_OVERLOADS */
155#define DEAL_II_HAVE_CXX17_BESSEL_FUNCTIONS
156/* #undef DEAL_II_CXX14_CONSTEXPR_BUG */
157
162#define DEAL_II_DEPRECATED [[deprecated]]
163
170#define DEAL_II_DEPRECATED_EARLY
171#define DEAL_II_FALLTHROUGH [[fallthrough]]
172#define DEAL_II_CONSTEXPR constexpr
173
174// defined for backwards compatibility with older deal.II versions
175#define DEAL_II_WITH_CXX11
176#define DEAL_II_WITH_CXX14
177#ifdef DEAL_II_HAVE_CXX17
178# define DEAL_II_WITH_CXX17
179#endif
180
181
182/***********************************************************************
183 * System features:
184 *
185 * For documentation see cmake/checks/check_02_system_features.cmake
186 */
187
188#define DEAL_II_HAVE_SYS_RESOURCE_H
189#define DEAL_II_HAVE_UNISTD_H
190#define DEAL_II_HAVE_GETHOSTNAME
191#define DEAL_II_HAVE_GETPID
192/* #undef DEAL_II_HAVE_JN */
193
194/* #undef DEAL_II_MSVC */
195
196
197/***********************************************************************
198 * Feature configuration
199 *
200 * For documentation see cmake/configure/configure_*.cmake and
201 * cmake/modules/Find*.cmake
202 */
203
204/* cmake/modules/FindADOLC.cmake */
205#define DEAL_II_ADOLC_WITH_ATRIG_ERF
206#define DEAL_II_ADOLC_WITH_ADVANCED_BRANCHING
207/* #undef DEAL_II_ADOLC_WITH_TAPELESS_REFCOUNTING */
208
209/* cmake/modules/FindARPACK.cmake */
210/* #undef DEAL_II_ARPACK_WITH_PARPACK */
211
212/* cmake/modules/FindGMSH.cmake */
213/* #undef DEAL_II_GMSH_WITH_API */
214
215/* cmake/modules/FindPETSC.cmake */
216/* #undef DEAL_II_PETSC_WITH_COMPLEX */
217/* #undef DEAL_II_PETSC_WITH_HYPRE */
218/* #undef DEAL_II_PETSC_WITH_MUMPS */
219
220/* cmake/modules/FindSUNDIALS.cmake */
221#define DEAL_II_SUNDIALS_WITH_IDAS
222
223/* cmake/modules/FindSYMENGINE.cmake */
224/* #undef DEAL_II_SYMENGINE_WITH_LLVM */
225
226/* cmake/configure/configure_2_boost.cmake */
227/* #undef DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS */
228
229/* cmake/configure/configure_2_trilinos.cmake */
230/* #undef DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD */
231/* #undef DEAL_II_TRILINOS_WITH_EPETRAEXT */
232/* #undef DEAL_II_TRILINOS_WITH_MUELU */
233/* #undef DEAL_II_TRILINOS_WITH_ROL */
234/* #undef DEAL_II_TRILINOS_WITH_SACADO */
235/* #undef DEAL_II_TRILINOS_WITH_SEACAS */
236/* #undef DEAL_II_TRILINOS_WITH_TPETRA */
237/* #undef DEAL_II_TRILINOS_WITH_ZOLTAN */
238
239
240/***********************************************************************
241 * Various macros for version number query and comparison:
242 *
243 * These macros are defined to make testing for specific versions within
244 * the deal.II main code as simple as possible.
245 */
246
247/*
248 * deal.II:
249 */
250
251#define DEAL_II_VERSION_GTE(major,minor,subminor) \
252 ((DEAL_II_VERSION_MAJOR * 10000 + \
253 DEAL_II_VERSION_MINOR * 100 + \
254 DEAL_II_VERSION_SUBMINOR) \
255 >= \
256 (major)*10000 + (minor)*100 + (subminor))
257
258/*
259 * boost:
260 */
261#define DEAL_II_BOOST_VERSION_MAJOR 1
262#define DEAL_II_BOOST_VERSION_MINOR 78
263#define DEAL_II_BOOST_VERSION_SUBMINOR 0
264
265#define DEAL_II_BOOST_VERSION_GTE(major,minor,subminor) \
266 ((DEAL_II_BOOST_VERSION_MAJOR * 100000 + \
267 DEAL_II_BOOST_VERSION_MINOR * 100 + \
268 DEAL_II_BOOST_VERSION_SUBMINOR) \
269 >= \
270 (major)*100000 + (minor)*100 + (subminor))
271
272/*
273 * Gmsh:
274 */
275#ifdef DEAL_II_WITH_GMSH
276# define DEAL_II_GMSH_EXECUTABLE_PATH "/usr/bin/gmsh"
277#endif
278
279/*
280 * p4est:
281 */
282
283#ifdef DEAL_II_WITH_P4EST
284# define DEAL_II_P4EST_VERSION_MAJOR
285# define DEAL_II_P4EST_VERSION_MINOR
286# define DEAL_II_P4EST_VERSION_SUBMINOR
287# define DEAL_II_P4EST_VERSION_PATCH
288
289# define DEAL_II_P4EST_VERSION_GTE(major,minor,subminor,patch) \
290 ((DEAL_II_P4EST_VERSION_MAJOR * 1000000 + \
291 DEAL_II_P4EST_VERSION_MINOR * 10000 + \
292 DEAL_II_P4EST_VERSION_SUBMINOR * 100 + \
293 DEAL_II_P4EST_VERSION_PATCH) \
294 >= \
295 (major)*1000000 + (minor)*10000 + (subminor)*100 + (patch))
296#endif
297
298/*
299 * SUNDIALS:
300 */
301
302#ifdef DEAL_II_WITH_SUNDIALS
303 # define DEAL_II_SUNDIALS_VERSION_MAJOR 6
304 # define DEAL_II_SUNDIALS_VERSION_MINOR 2
305 # define DEAL_II_SUNDIALS_VERSION_PATCH 0
306
307 #define DEAL_II_SUNDIALS_VERSION_GTE(major,minor,patch) \
308 ((DEAL_II_SUNDIALS_VERSION_MAJOR * 10000 + \
309 DEAL_II_SUNDIALS_VERSION_MINOR * 100 + \
310 DEAL_II_SUNDIALS_VERSION_PATCH) \
311 >= \
312 (major)*10000 + (minor)*100 + (patch))
313
314 #define DEAL_II_SUNDIALS_VERSION_LT(major,minor,patch) \
315 ((DEAL_II_SUNDIALS_VERSION_MAJOR * 10000 + \
316 DEAL_II_SUNDIALS_VERSION_MINOR * 100 + \
317 DEAL_II_SUNDIALS_VERSION_PATCH) \
318 < \
319 (major)*10000 + (minor)*100 + (patch))
320#endif
321
322/*
323 * PETSc:
324 *
325 * Note: The following definitions will be set in petscconf.h and
326 * petscversion.h, so we don't repeat them here.
327 *
328 * PETSC_VERSION_MAJOR
329 * PETSC_VERSION_MINOR
330 * PETSC_VERSION_SUBMINOR
331 * PETSC_VERSION_PATCH
332 * PETSC_VERSION_RELEASE
333 * PETSC_USE_COMPLEX
334 */
335
336#define DEAL_II_PETSC_VERSION_LT(major,minor,subminor) \
337 ((PETSC_VERSION_MAJOR * 10000 + \
338 PETSC_VERSION_MINOR * 100 + \
339 PETSC_VERSION_SUBMINOR) \
340 < \
341 (major)*10000 + (minor)*100 + (subminor))
342
343#define DEAL_II_PETSC_VERSION_GTE(major,minor,subminor) \
344 ((PETSC_VERSION_MAJOR * 10000 + \
345 PETSC_VERSION_MINOR * 100 + \
346 PETSC_VERSION_SUBMINOR) \
347 >= \
348 (major)*10000 + (minor)*100 + (subminor))
349
350/*
351 * SLEPC
352 * see slepcversion.h
353 */
354#define DEAL_II_SLEPC_VERSION_GTE(major,minor,subminor) \
355 ((SLEPC_VERSION_MAJOR * 10000 + \
356 SLEPC_VERSION_MINOR * 100 + \
357 SLEPC_VERSION_SUBMINOR) \
358 >= \
359 (major)*10000 + (minor)*100 + (subminor))
360
361/*
362 * Trilinos:
363 */
364
365#ifdef DEAL_II_WITH_TRILINOS
366# define DEAL_II_TRILINOS_VERSION_MAJOR
367# define DEAL_II_TRILINOS_VERSION_MINOR
368# define DEAL_II_TRILINOS_VERSION_SUBMINOR
369
370# define DEAL_II_TRILINOS_VERSION_GTE(major,minor,subminor) \
371 ((DEAL_II_TRILINOS_VERSION_MAJOR * 10000 + \
372 DEAL_II_TRILINOS_VERSION_MINOR * 100 + \
373 DEAL_II_TRILINOS_VERSION_SUBMINOR) \
374 >= \
375 (major)*10000 + (minor)*100 + (subminor))
376#endif
377
378/*
379 * MPI
380 */
381
382#ifdef DEAL_II_WITH_MPI
383# define DEAL_II_MPI_VERSION_MAJOR
384# define DEAL_II_MPI_VERSION_MINOR
385
386# define DEAL_II_MPI_VERSION_GTE(major,minor) \
387 ((DEAL_II_MPI_VERSION_MAJOR * 100 + \
388 DEAL_II_MPI_VERSION_MINOR) \
389 >= \
390 (major)*100 + (minor))
391#else
392# define DEAL_II_MPI_VERSION_GTE(major,minor) false
393#endif
394
395/* #undef DEAL_II_MPI_WITH_CUDA_SUPPORT */
396
397/***********************************************************************
398 * Two macro names that we put at the top and bottom of all deal.II files
399 * and that will be expanded to "namespace dealii {" and "}".
400 */
401
402#define DEAL_II_NAMESPACE_OPEN namespace dealii {
403#define DEAL_II_NAMESPACE_CLOSE }
404
405/***********************************************************************
406 * Two macros to guard external header includes.
407 *
408 * Selectively disable diagnostics set by "-Wextra" (and similar flags) for
409 * GCC and compiler accepting GCC dialects (such as clang).
410 * "diagnostic push" is supported since gcc-4.6 and clang-3.3.
411 */
412
413#ifdef DEAL_II_COMPILER_HAS_DIAGNOSTIC_PRAGMA
414
415/* keep pragmas with an exclamation mark in order.. */
416# define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS \
417_Pragma("GCC diagnostic push") \
418_Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"") \
419_Pragma("GCC diagnostic ignored \"-Wpragmas\"") \
420_Pragma("GCC diagnostic ignored \"-Wunknown-warning-option\"") \
421_Pragma("GCC diagnostic ignored \"-Wunknown-warning\"") \
422_Pragma("GCC diagnostic ignored \"-Wextra\"") \
423_Pragma("GCC diagnostic ignored \"-Waddress-of-packed-member\"") \
424_Pragma("GCC diagnostic ignored \"-Wdeprecated-copy\"") \
425_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \
426_Pragma("GCC diagnostic ignored \"-Wdeprecated-volatile\"") \
427_Pragma("GCC diagnostic ignored \"-Wexpansion-to-defined\"") \
428_Pragma("GCC diagnostic ignored \"-Wignored-attributes\"") \
429_Pragma("GCC diagnostic ignored \"-Wignored-qualifiers\"") \
430_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") \
431_Pragma("GCC diagnostic ignored \"-Winfinite-recursion\"") \
432_Pragma("GCC diagnostic ignored \"-Wint-in-bool-context\"") \
433_Pragma("GCC diagnostic ignored \"-Wmisleading-indentation\"") \
434_Pragma("GCC diagnostic ignored \"-Wmissing-field-initializers\"") \
435_Pragma("GCC diagnostic ignored \"-Wnested-anon-types\"") \
436_Pragma("GCC diagnostic ignored \"-Wnon-virtual-dtor\"") \
437_Pragma("GCC diagnostic ignored \"-Wnonnull\"") \
438_Pragma("GCC diagnostic ignored \"-Woverflow\"") \
439_Pragma("GCC diagnostic ignored \"-Woverloaded-virtual\"") \
440_Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
441_Pragma("GCC diagnostic ignored \"-Wsuggest-override\"") \
442_Pragma("GCC diagnostic ignored \"-Wtautological-constant-out-of-range-compare\"") \
443_Pragma("GCC diagnostic ignored \"-Wtautological-overlap-compare\"") \
444_Pragma("GCC diagnostic ignored \"-Wtype-limits\"") \
445_Pragma("GCC diagnostic ignored \"-Wundef\"") \
446_Pragma("GCC diagnostic ignored \"-Wunused-but-set-parameter\"") \
447_Pragma("GCC diagnostic ignored \"-Wunused-but-set-variable\"") \
448_Pragma("GCC diagnostic ignored \"-Wunused-function\"") \
449_Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") \
450_Pragma("GCC diagnostic ignored \"-Wunused-private-field\"") \
451_Pragma("GCC diagnostic ignored \"-Wunused-variable\"") \
452_Pragma("GCC diagnostic warning \"-Wpragmas\"")
453
454# define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS \
455_Pragma("GCC diagnostic pop")
456
457#else
458
459# define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
460# define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
461
462#endif
463
464/***********************************************************************
465 * Define macros for picking the correct C linkage name for a Fortran function.
466 * See cmake/configure/configure_fortran_mangling.cmake for more information.
467 */
468
469#define DEAL_II_FORTRAN_MANGLE(name, NAME) name ## _
470
471#define DEAL_II_FORTRAN_MANGLE_UNDERSCORE(name, NAME) name ## _
472
473/***********************************************************************
474 * Define a portable preprocessor macro that generates custom warnings
475 * reporting the line and the file where the warning appears. Taken from:
476 * http://goodliffe.blogspot.com/2009/07/c-how-to-say-warning-to-visual-studio-c.html
477 */
478
479#ifdef _MSC_VER
480 #define DEAL_II_STRINGIZE_HELPER(x) #x
481 #define DEAL_II_STRINGIZE(x) DEAL_II_STRINGIZE_HELPER(x)
482 #define DEAL_II_DO_PRAGMA(x) __pragma(x)
483 #define DEAL_II_WARNING(desc) DEAL_II_DO_PRAGMA(message(__FILE__ "(" DEAL_II_STRINGIZE(__LINE__) ") : warning: " #desc))
484#else
485 #define DEAL_II_DO_PRAGMA(x) _Pragma(#x)
486 #define DEAL_II_WARNING(desc) DEAL_II_DO_PRAGMA(message(#desc))
487#endif
488
489/***********************************************************************
490 * Final inclusions:
491 */
492
493/*
494 * Some systems require including mpi.h before stdio.h which happens in
495 * types.h
496 */
497#if defined(DEAL_II_WITH_MPI) || defined(DEAL_II_WITH_PETSC)
499# include <mpi.h>
501#endif
502
503#include <deal.II/base/numbers.h>
504#include <deal.II/base/types.h>
505
506/*
507 * Include the boost version header to do a quick version check in case, by
508 * accident, we have configured with one version of boost but are compiling
509 * either the library or an external application with a different version of
510 * boost.
511 */
512#include <boost/version.hpp>
513static_assert(
514 BOOST_VERSION == 100000 * DEAL_II_BOOST_VERSION_MAJOR +
517 "The version number of boost that you are compiling with does not match the "
518 "version number of boost found during deal.II's configuration step. This "
519 "leads to difficult to understand bugs and is not supported. Please check "
520 "that you have set up your application with the same version of boost as "
521 "deal.II.");
522
523#endif
#define DEAL_II_BOOST_VERSION_MINOR
Definition: config.h:262
#define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
Definition: config.h:416
#define DEAL_II_BOOST_VERSION_MAJOR
Definition: config.h:261
#define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
Definition: config.h:454
#define DEAL_II_BOOST_VERSION_SUBMINOR
Definition: config.h:263