WaveBlocksND
types.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <complex>
4 #include <vector>
5 #include <tuple>
6 #include <Eigen/Core>
7 #include <Eigen/Eigenvalues>
8 #include <functional>
9 
10 
11 namespace waveblocks
12 {
13  // scalar types
14  typedef double real_t;
15  typedef std::complex<real_t> complex_t;
16  typedef int dim_t;
17 
18  template<int R, int C>
19  using CMatrix = Eigen::Matrix<complex_t,R,C>;
20 
21  template<int R, int C>
22  using RMatrix = Eigen::Matrix<real_t,R,C>;
23 
24  template<int R, int C>
25  using CArray = Eigen::Array<complex_t,R,C>;
26 
27  template<int R, int C>
28  using RArray = Eigen::Array<real_t,R,C>;
29 
30  template<int N>
32 
33  using Coefficients = Eigen::Matrix<complex_t, Eigen::Dynamic, 1>;
34 
35  // matrix types
36  template <class I, int R, int C>
37  using GMatrix = Eigen::Matrix<I, R, C>;
38 
39  template <int R, int C>
41 
42  template <int R, int C>
44 
45  // vector types
46  template <class I, int R>
48 
49  template <int R>
51 
52  template <int R>
54 
55  // function type
56  template <class P>
57  using function_t = std::function<P>;
58 
59  template <int D>
61 
62  template <int D>
64 
65  template <int D>
67 
68  template <int D>
70 
71  template <int D>
73 
74  template <int D>
76 
77  template <int D, int N>
79 
80 
81  template <int D>
83 
84  template <int D>
86 
87  template <int D>
89 
91 
92  template <int D>
94 
95  template <int D>
97 
98  template <int D>
100 
101  template <int D, int N>
103 
104  // function valued functions
105  template <int D, class F>
107 
108  template <int D, int N, class F>
110 
111  template <int D, int N, class F>
113 
114  template <int D, class F>
116 
117  template <int D, int N, class F>
119 
120  template <int D, int N, class F>
122 
123  // eigenvalue
124  template <int N>
125  using eigenvalues_t =
126  typename Eigen::EigenSolver<RMatrix<N, N> >::EigenvalueType;
127 
128  template <int N>
129  using eigenvector_t =
130  typename Eigen::EigenSolver<RMatrix<N, N> >::EigenvectorsType;
131 }
function_t< RVector< D >(RVector< D >)> rD_to_rD
Definition: types.hpp:63
GVector< complex_t, R > CVector
Definition: types.hpp:50
Definition: coefficients_file_parser.cpp:10
function_t< real_t(RVector< D >)> rD_to_r
Definition: types.hpp:60
function_t< GVector< F, N >(CVector< D >)> cD_to_function_vector
Definition: types.hpp:118
function_t< GVector< F, N >(RVector< D >)> rD_to_function_vector
Definition: types.hpp:109
GMatrix< I, R, 1 > GVector
Definition: types.hpp:47
Eigen::Matrix< real_t, R, C > RMatrix
Definition: types.hpp:22
Eigen::Matrix< complex_t, Eigen::Dynamic, 1 > Coefficients
Definition: types.hpp:33
Eigen::Matrix< I, R, C > GMatrix
Definition: types.hpp:37
std::complex< real_t > complex_t
Definition: types.hpp:15
function_t< RMatrix< D, D >(RVector< D >)> rD_to_rDxD
Definition: types.hpp:66
double real_t
Definition: types.hpp:14
function_t< GMatrix< F, N, N >(RVector< D >)> rD_to_function_matrix
Definition: types.hpp:112
function_t< CMatrix< D, D >(CVector< D >)> cD_to_cDxD
Definition: types.hpp:99
function_t< complex_t(complex_t)> c_to_c
Definition: types.hpp:90
function_t< RVector< D >(CVector< D >)> cD_to_rD
Definition: types.hpp:85
function_t< GMatrix< F, N, N >(CVector< D >)> cD_to_function_matrix
Definition: types.hpp:121
function_t< F(RVector< D >)> rD_to_function
Definition: types.hpp:106
function_t< RMatrix< D, D >(CVector< D >)> cD_to_rDxD
Definition: types.hpp:88
function_t< CMatrix< D, D >(RVector< D >)> rD_to_cDxD
Definition: types.hpp:75
std::function< P > function_t
Definition: types.hpp:57
function_t< CVector< D >(RVector< D >)> rD_to_cD
Definition: types.hpp:72
CArray< Eigen::Dynamic, N > HaWpBasisVector
Definition: types.hpp:31
GVector< real_t, R > RVector
Definition: types.hpp:53
function_t< CVector< D >(CVector< D >)> cD_to_cD
Definition: types.hpp:96
function_t< complex_t(RVector< D >)> rD_to_c
Definition: types.hpp:69
Eigen::Array< real_t, R, C > RArray
Definition: types.hpp:28
function_t< F(CVector< D >)> cD_to_function
Definition: types.hpp:115
Eigen::Matrix< complex_t, R, C > CMatrix
Definition: types.hpp:19
function_t< complex_t(CVector< D >)> cD_to_c
Definition: types.hpp:93
function_t< real_t(CVector< D >)> cD_to_r
Definition: types.hpp:82
typename Eigen::EigenSolver< RMatrix< N, N > >::EigenvectorsType eigenvector_t
Definition: types.hpp:130
int dim_t
Definition: types.hpp:16
typename Eigen::EigenSolver< RMatrix< N, N > >::EigenvalueType eigenvalues_t
Definition: types.hpp:126
function_t< CMatrix< N, N >(CVector< D >)> cD_to_cNxN
Definition: types.hpp:102
Eigen::Array< complex_t, R, C > CArray
Definition: types.hpp:25
function_t< CMatrix< N, N >(RVector< D >)> rD_to_cNxN
Definition: types.hpp:78