OpenBEM
Open-source framework for electromagnetic simulation with the boundary element method.
Loading...
Searching...
No Matches
constants.hpp
Go to the documentation of this file.
1
// OpenBEM - Copyright (C) 2026 Shashwat Sharma
2
3
// This file is part of OpenBEM.
4
5
// OpenBEM is free software: you can redistribute it and/or modify it under the terms of the
6
// GNU General Public License as published by the Free Software Foundation, either version 3
7
// of the License, or (at your option) any later version.
8
9
// You should have received a copy of the GNU General Public License along with OpenBEM.
10
// If not, see <https://www.gnu.org/licenses/>.
11
12
18
#ifndef CONSTANTS_H
19
#define CONSTANTS_H
20
21
#include <cmath>
22
#include <limits>
23
24
#include "
types.hpp
"
25
26
#ifndef M_PI
27
#define M_PI 3.1415926535897932384626
28
#endif
29
30
namespace
bem
31
{
32
40
const
Complex
J
=
Complex
(0.0, 1.0);
41
42
const
Float
zero = 0.0;
43
const
Float
one = 1.0;
44
const
Float
two = 2.0;
45
const
Float
four = 4.0;
46
const
Float
half = 0.5;
47
48
const
Float
pi = M_PI;
49
const
Float
two_pi = (
Float
)(2.0 * M_PI);
50
const
Float
four_pi = (
Float
)(4.0 * M_PI);
51
const
Float
half_pi = (
Float
)(0.5 * M_PI);
52
const
Float
quarter_pi = (
Float
)(M_PI / 4.0);
53
55
const
Float
eps0
= 8.854187817e-12;
56
58
const
Float
mu0
= four_pi * 1.0e-7;
59
61
const
Float
c0
= 1.0 / std::sqrt(
eps0
*
mu0
);
62
64
const
Float
eta0
= std::sqrt(
mu0
/
eps0
);
65
67
const
Float
inf
= std::numeric_limits<Float>::infinity();
68
70
const
Float
float_eps
= std::numeric_limits<Float>::epsilon();
71
76
}
77
78
#endif
bem::J
const Complex J
Imaginary unit.
Definition
constants.hpp:40
bem::float_eps
const Float float_eps
Numerical infinitesimal.
Definition
constants.hpp:70
bem::mu0
const Float mu0
Vacuum permeability.
Definition
constants.hpp:58
bem::c0
const Float c0
Vacuum wave speed.
Definition
constants.hpp:61
bem::inf
const Float inf
Numerical infinity.
Definition
constants.hpp:67
bem::eps0
const Float eps0
Vacuum permittivity.
Definition
constants.hpp:55
bem::eta0
const Float eta0
Vacuum wave impedance.
Definition
constants.hpp:64
bem::Float
double Float
Floating point number.
Definition
types.hpp:47
bem::Complex
std::complex< Float > Complex
Complex floating point number.
Definition
types.hpp:51
bem
Primary namespace for the OpenBEM library.
Definition
constants.hpp:31
types.hpp
source
constants.hpp
Generated on Tue Mar 31 2026 for OpenBEM by
1.9.8