nec2++  1.7.0
common.h
1 #ifndef __common__
2 #define __common__
3 /*
4  Various Definitions for nec2++
5 
6  Copyright (C) 2004-2015 Timothy C.A. Molteno
7 
8  This program is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 2 of the License, or
11  (at your option) any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software
20  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22 
23 #include "typesafe_stdint.h"
24 
25 #include <complex>
31 typedef double nec_float;
32 typedef std::complex<nec_float> nec_complex;
33 
34 /* Version information */
35 #ifndef nec_build_date
36  #define nec_build_date BUILD_DATE
37 #endif
38 
39 #ifdef WIN32
40 #include "../win32/nec2++/config.h"
41 #else
42 #include "config.h"
43 #endif
44 
45 #ifndef build_version
46  #define nec_version VERSION " [" nec_build_date "]"
47 #else
48  #define nec_version build_version " [" nec_build_date "]"
49 #endif
50 
51 #define UNUSED(x) {(void)(x);}
52 /*
53  These are some common constants that should be moved into more appropriate locations
54 */
55 
56 #define ACCS 1.E-12
57 #define CONST2 4.771341188
58 
59 #define SMIN 1.e-3
60 
61 
70 enum excitation_type
71 {
72  EXCITATION_VOLTAGE = 0,
73  EXCITATION_LINEAR = 1,
74  EXCITATION_CIRC_RIGHT = 2,
75  EXCITATION_CIRC_LEFT = 3,
76  EXCITATION_CURRENT = 4,
77  EXCITATION_VOLTAGE_DISC = 5
78 };
79 
80 #endif /* __common__ */