OpenBEM
Open-source framework for electromagnetic simulation with the boundary element method.
Loading...
Searching...
No Matches
types.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 TYPES_H
19#define TYPES_H
20
21#include <complex>
22#include <cstdint>
23
24#include <external/Eigen/Core>
25
26
27namespace bem
28{
29
42#if defined(USE_SINGLE_PRECISION)
43 using Float = float;
44#elif defined(USE_EXTENDED_PRECISION)
45 using Float = long double;
46#else
47 using Float = double;
48#endif
49
51using Complex = std::complex<Float>;
52
54using Index = std::size_t;
55
57using Int = int;
58
65template <typename T>
66using EigMat = Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>;
67
69template <typename T, Index M, Index N>
70using EigMatMN = Eigen::Matrix<T, M, N>;
71
73template <typename T, Index N>
74using EigMatXN = Eigen::Matrix<T, Eigen::Dynamic, N>;
75
77template <typename T, Index N>
78using EigMatNX = Eigen::Matrix<T, N, Eigen::Dynamic>;
79
81template <typename T>
82using EigColVec = Eigen::Matrix<T, Eigen::Dynamic, 1>;
83
85template <typename T, Index N>
86using EigColVecN = Eigen::Matrix<T, N, 1>;
87
89template <typename T>
90using EigRowVec = Eigen::Matrix<T, 1, Eigen::Dynamic>;
91
93template <typename T, Index N>
94using EigRowVecN = Eigen::Matrix<T, 1, N>;
95
97template <class EigObj>
98using ConstEigRef = const Eigen::Ref<const EigObj>;
99
101template <class EigObj>
102using EigRef = Eigen::Ref<EigObj>;
103
112}
113
114#endif
115
116
117
118
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > EigMat
Dynamic-size matrix containing type T.
Definition types.hpp:66
Eigen::Ref< EigObj > EigRef
Writable reference to an Eigen object.
Definition types.hpp:102
Eigen::Matrix< T, Eigen::Dynamic, N > EigMatXN
Fixed-width matrix with N columns containing type T.
Definition types.hpp:74
Eigen::Matrix< T, Eigen::Dynamic, 1 > EigColVec
Dynamic-size column vector containing type T.
Definition types.hpp:82
const Eigen::Ref< const EigObj > ConstEigRef
Read-only reference to an Eigen object.
Definition types.hpp:98
Eigen::Matrix< T, 1, Eigen::Dynamic > EigRowVec
Dynamic-size row vector containing type T.
Definition types.hpp:90
Eigen::Matrix< T, M, N > EigMatMN
Fixed-size matrix with M rows and N columns containing type T.
Definition types.hpp:70
double Float
Floating point number.
Definition types.hpp:47
std::complex< Float > Complex
Complex floating point number.
Definition types.hpp:51
Eigen::Matrix< T, N, 1 > EigColVecN
Fixed-size column vector of size N containing type T.
Definition types.hpp:86
Eigen::Matrix< T, 1, N > EigRowVecN
Fixed-size row vector of size N containing type T.
Definition types.hpp:94
int Int
Signed integer type.
Definition types.hpp:57
Eigen::Matrix< T, N, Eigen::Dynamic > EigMatNX
Fixed-height matrix with N rows containing type T.
Definition types.hpp:78
std::size_t Index
Unsigned integer type for indices and container sizes.
Definition types.hpp:54
Primary namespace for the OpenBEM library.
Definition constants.hpp:31