DOLFINx 0.11.0.0
DOLFINx C++ interface
Loading...
Searching...
No Matches
defines.h
1// Copyright (C) 2009-2011 Johan Hake
2//
3// This file is part of DOLFINx (https://www.fenicsproject.org)
4//
5// SPDX-License-Identifier: LGPL-3.0-or-later
6
7#pragma once
8
9#include <string>
10
11namespace dolfinx
12{
13
15consteval std::string_view version() { return DOLFINX_VERSION; }
16
18consteval std::string_view ufcx_signature() { return UFCX_SIGNATURE; }
19
22consteval std::string_view git_commit_hash() { return DOLFINX_GIT_COMMIT_HASH; }
23
26consteval bool has_debug()
27{
28#ifndef NDEBUG
29 return true;
30#else
31 return false;
32#endif
33}
34
36consteval bool has_petsc()
37{
38#ifdef HAS_PETSC
39 return true;
40#else
41 return false;
42#endif
43}
44
46consteval bool has_slepc()
47{
48#ifdef HAS_SLEPC
49 return true;
50#else
51 return false;
52#endif
53}
54
56consteval bool has_parmetis()
57{
58#ifdef HAS_PARMETIS
59 return true;
60#else
61 return false;
62#endif
63}
64
66consteval bool has_kahip()
67{
68#ifdef HAS_KAHIP
69 return true;
70#else
71 return false;
72#endif
73}
74
76consteval bool has_adios2()
77{
78#ifdef HAS_ADIOS2
79 return true;
80#else
81 return false;
82#endif
83}
84
86consteval bool has_ptscotch()
87{
88#ifdef HAS_PTSCOTCH
89 return true;
90#else
91 return false;
92#endif
93}
94
96consteval bool has_superlu_dist()
97{
98#ifdef HAS_SUPERLU_DIST
99 return true;
100#else
101 return false;
102#endif
103}
104
110{
111#ifdef DOLFINX_NO_STDC_COMPLEX_KERNELS
112 return false;
113#else
114 return true;
115#endif
116}
117
118} // namespace dolfinx
Top-level namespace.
Definition defines.h:12
consteval std::string_view git_commit_hash()
Definition defines.h:22
consteval bool has_adios2()
Return true if DOLFINX is compiled with ADIOS2.
Definition defines.h:76
consteval bool has_petsc()
Return true if DOLFINx is compiled with PETSc.
Definition defines.h:36
consteval bool has_debug()
Definition defines.h:26
consteval bool has_slepc()
Return true if DOLFINx is compiled with SLEPc.
Definition defines.h:46
consteval bool has_ptscotch()
Return true if DOLFINX is compiled with PT-SCOTCH.
Definition defines.h:86
consteval std::string_view ufcx_signature()
Return UFC signature string.
Definition defines.h:18
consteval bool has_superlu_dist()
Return true if DOLFINx is compiled with SuperLU_DIST.
Definition defines.h:96
consteval bool has_parmetis()
Return true if DOLFINx is compiled with ParMETIS.
Definition defines.h:56
consteval std::string_view version()
Return DOLFINx version string.
Definition defines.h:15
consteval bool has_kahip()
Return true if DOLFINx is compiled with KaHIP.
Definition defines.h:66
consteval bool has_complex_ufcx_kernels()
Definition defines.h:109