123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333 |
-
-
-
-
-
-
-
-
- #pragma once
-
- #ifndef __LEMMA_H
- #define __LEMMA_H
-
-
- #include <iostream>
- #include <iomanip>
- #include <complex>
- #include <fstream>
- #include <string>
- #include <vector>
- #include <stdexcept>
- #include <sstream>
-
- #include <Eigen/Core>
- #include <cstddef>
- #include <Eigen/StdVector>
- #include <Eigen/Sparse>
- #include <unsupported/Eigen/FFT>
-
- #include <Eigen/Geometry>
-
-
-
- namespace Lemma {
-
-
- #ifdef LEMMA_SINGLE_PRECISION
- typedef float Real;
- #else
- typedef double Real;
- #endif
-
-
- typedef std::complex<Real> Complex;
-
-
- typedef Eigen::Matrix<Real, 3, 1> Vector3r;
-
-
- typedef Eigen::Matrix<Real, 3, Eigen::Dynamic> Vector3Xr;
-
-
- typedef Eigen::Matrix<Real, Eigen::Dynamic, 1> VectorXr;
-
-
- typedef Eigen::Matrix<int, Eigen::Dynamic, 1> VectorXi;
-
-
- typedef Eigen::Matrix<Complex, Eigen::Dynamic, 1> VectorXcr;
-
-
- typedef Eigen::Matrix<Complex, 3, 1> Vector3cr;
-
-
- typedef Eigen::Matrix<Complex, 3, Eigen::Dynamic> Vector3Xcr;
-
-
- typedef Eigen::Matrix<Real, Eigen::Dynamic, Eigen::Dynamic> MatrixXr;
-
-
- typedef Eigen::Matrix<int, Eigen::Dynamic, Eigen::Dynamic> MatrixXi;
-
-
- typedef Eigen::Matrix<Complex, Eigen::Dynamic, Eigen::Dynamic> MatrixXcr;
-
-
-
-
-
- const Real PI = 4.0*atan(1.0);
-
-
-
- const Real EPSILON0 = 8.854187817e-12;
-
-
- const Real MU0 = 4.*PI*1e-7;
-
-
- const Real QPI = .25/PI;
-
-
-
- enum MAGUNITS {TESLA, NANOTESLA, GAUSS};
-
-
- enum TEMPUNITS {CELCIUS, KELVIN};
-
-
- enum TIMEUNITS {SEC, MILLISEC, MICROSEC, NANOSEC, PICOSEC};
-
-
- enum FREQUENCYUNITS {HZ, KHZ, MHZ, GHZ};
-
-
- enum FEMCOILORIENTATION {COAXIAL, COPLANAR};
-
-
- enum ORIENTATION {X, Y, Z, NX, NY, NZ};
-
-
- enum FIELDTYPE {HFIELDREAL, HFIELDIMAG, EFIELDREAL, EFIELDIMAG};
-
-
- enum FIELDCOMPONENT {XCOMPONENT=0, YCOMPONENT=1, ZCOMPONENT=2};
-
-
- enum SPATIALCOORDINANT {XCOORD=0, YCOORD=1, ZCOORD=2};
-
-
-
- enum HANKELTRANSFORMTYPE { ANDERSON801, CHAVE, FHTKEY201, FHTKEY101, FHTKEY51, QWEKEY };
-
-
-
- enum DipoleSourceType {NOSOURCETYPE, GROUNDEDELECTRICDIPOLE, UNGROUNDEDELECTRICDIPOLE, MAGNETICDIPOLE};
-
-
-
-
-
-
-
- enum DipoleSourcePolarisation {NOPOLARISATION, XPOLARISATION,
- YPOLARISATION, ZPOLARISATION};
-
-
- enum DipoleSourcePolarity {NEGATIVE, POSITIVE};
-
-
-
- enum FIELDCALCULATIONS {E, H, BOTH};
-
- }
-
- #endif
|