Line | Branch | Exec | Source |
---|---|---|---|
1 | // This file is part of Bembel, the higher order C++ boundary element library. | ||
2 | // | ||
3 | // Copyright (C) 2022 see <http://www.bembel.eu> | ||
4 | // | ||
5 | // It was written as part of a cooperation of J. Doelz, H. Harbrecht, S. Kurz, | ||
6 | // M. Multerer, S. Schoeps, and F. Wolf at Technische Universitaet Darmstadt, | ||
7 | // Universitaet Basel, and Universita della Svizzera italiana, Lugano. This | ||
8 | // source code is subject to the GNU General Public License version 3 and | ||
9 | // provided WITHOUT ANY WARRANTY, see <http://www.bembel.eu> for further | ||
10 | // information. | ||
11 | #ifndef BEMBEL_SRC_UTIL_CONSTANTS_HPP_ | ||
12 | #define BEMBEL_SRC_UTIL_CONSTANTS_HPP_ | ||
13 | |||
14 | namespace Bembel { | ||
15 | namespace Constants { | ||
16 | |||
17 | //////////////////////////////////////////////////////////////////////////////// | ||
18 | /// variables | ||
19 | //////////////////////////////////////////////////////////////////////////////// | ||
20 | constexpr double generic_tolerance = 1e-6; | ||
21 | // some not further specified constant | ||
22 | constexpr int MaxP = 20; | ||
23 | |||
24 | // some not further specified constant | ||
25 | constexpr int maximum_quadrature_degree = 50; | ||
26 | // constants for the mesh refinement | ||
27 | constexpr double corners[2][4] = {{0., 1., 1., 0}, {0., 0., 1., 1.}}; | ||
28 | constexpr double llcs[2][4] = {{0., .5, .5, .0}, {0., 0., .5, .5}}; | ||
29 | constexpr double edgemps[2][5] = {{.5, 1., .5, 0, .5}, {0., .5, 1., .5, .5}}; | ||
30 | // tolerance for point comparison to determine patch topology | ||
31 | constexpr double pt_comp_tolerance = 1e-9; | ||
32 | // realloc size must be bigger than 4 | ||
33 | constexpr size_t Bembel_alloc_size = 100; | ||
34 | // the interpolation problem solved during the assembly of the projector needs | ||
35 | // to filter some almost-zero coefficients that might be introduced during the | ||
36 | // solution of the linear system | ||
37 | constexpr double projector_tolerance = 1e-4; | ||
38 | //////////////////////////////////////////////////////////////////////////////// | ||
39 | /// methods | ||
40 | //////////////////////////////////////////////////////////////////////////////// | ||
41 | |||
42 | 2 | inline constexpr bool isAlmostZero(double in) { | |
43 |
2/4✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
✗ Branch 3 not taken.
|
2 | return in < generic_tolerance && in > -generic_tolerance; |
44 | } | ||
45 | } // namespace Constants | ||
46 | } // namespace Bembel | ||
47 | |||
48 | #endif // BEMBEL_SRC_UTIL_CONSTANTS_HPP_ | ||
49 |