FEMTIC
CommonParameters.h
Go to the documentation of this file.
1 //-------------------------------------------------------------------------------------------------------
2 // The MIT License (MIT)
3 //
4 // Copyright (c) 2021 Yoshiya Usui
5 //
6 // Permission is hereby granted, free of charge, to any person obtaining a copy
7 // of this software and associated documentation files (the "Software"), to deal
8 // in the Software without restriction, including without limitation the rights
9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 // copies of the Software, and to permit persons to whom the Software is
11 // furnished to do so, subject to the following conditions:
12 //
13 // The above copyright notice and this permission notice shall be included in all
14 // copies or substantial portions of the Software.
15 //
16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 // SOFTWARE.
23 //-------------------------------------------------------------------------------------------------------
24 #ifndef DBLDEF_COMMON_PARAMETERS
25 #define DBLDEF_COMMON_PARAMETERS
26 
27 #include <stdio.h>
28 #include <math.h>
29 
30 namespace CommonParameters{
31 
32 static const int EX_POLARIZATION = 0;
33 static const int EY_POLARIZATION = 1;
34 
35 static const int TM_MODE = 0;
36 static const int TE_MODE = 1;
37 
38 struct locationXY{
39  double X;
40  double Y;
41 };
42 
43 struct locationYZ{
44  double Y;
45  double Z;
46 };
47 
48 struct locationZX{
49  double Z;
50  double X;
51 };
52 
53 struct locationXYZ{
54  double X;
55  double Y;
56  double Z;
57 };
58 
62 };
63 
65  double realPart;
66  double imagPart;
67 };
68 
70  int realPart;
71  int imagPart;
72 };
73 
75  double comp11;
76  double comp12;
77  double comp21;
78  double comp22;
79 };
80 
82  double comp11;
83  double comp12;
84  double comp13;
85  double comp21;
86  double comp22;
87  double comp23;
88  double comp31;
89  double comp32;
90  double comp33;
91 };
92 
93 struct Vector3D{
94  double X;
95  double Y;
96  double Z;
97 };
98 
99 struct AreaCoords{
100  double coord0;
101  double coord1;
102  double coord2;
103 };
104 
106  double coord0;
107  double coord1;
108  double coord2;
109  double coord3;
110 };
111 
112 struct CoordPair{
113  double first;
114  double second;
115 };
116 
117 // Circular constant
118 static const double PI = 3.14159265358979;
119 
120 // Factor converting values from radians to degrees
121 static const double rad2deg = 180.0 / 3.14159265358979;
122 
123 // Factor converting values from degrees to radians
124 static const double deg2rad = 3.14159265358979 / 180.0;
125 
126 // Magnetic permeability
127 static const double mu = 12.566370614e-07;
128 
129 // Value of source electric field
130 static const double sourceValueElectric = 1000.0;
131 
132 // Electric permittivity
133 //static const double epsilon = 8.854187817e-12;
134 static const double epsilon = 0.0;
135 
136 // Very small value
137 static const double EPS = 1e-12;
138 
139 // Abscissas of one point Gauss quadrature
140 static const double abscissas1Point[1] = { 0.0 };
141 
142 // Abscissas of two point Gauss quadrature
143 static const double abscissas2Point[2] = { -1.0/sqrt(3.0), 1.0/sqrt(3.0) };
144 
145 // Abscissas of three point Gauss quadrature
146 static const double abscissas3Point[3] = { -0.774596669241483, 0.0, 0.774596669241483 };
147 
148 // Weights of one point Gauss quadrature
149 static const double weights1Point[1] = { 2.0 };
150 
151 // Weights of two point Gauss quadrature
152 static const double weights2Point[2] = { 1.0, 1.0 };
153 
154 // Weights of three point Gauss quadrature
155 static const double weights3Point[3] = { 0.555555555555556, 0.888888888888889, 0.555555555555556 };
156 
157 // Factor converting value from kilo-meter to meter
158 static const double convKilometerToMeter = 1000.0;
159 
160 static char programName[]="femtic";
161 
162 // [MajorVersion#].[MinorVersion#].[Revision#]
163 // x.x.xa -> alpha version
164 // x.x.xb -> beta version
165 static char versionID[]="4.2";
166 
167 }
168 
169 #endif
Definition: CommonParameters.h:30
static const double weights1Point[1]
Definition: CommonParameters.h:149
static char versionID[]
Definition: CommonParameters.h:165
static const double sourceValueElectric
Definition: CommonParameters.h:130
static const double abscissas3Point[3]
Definition: CommonParameters.h:146
static const double weights3Point[3]
Definition: CommonParameters.h:155
static const double EPS
Definition: CommonParameters.h:137
static const double deg2rad
Definition: CommonParameters.h:124
static const int EY_POLARIZATION
Definition: CommonParameters.h:33
static const double abscissas2Point[2]
Definition: CommonParameters.h:143
static const double epsilon
Definition: CommonParameters.h:134
static const double weights2Point[2]
Definition: CommonParameters.h:152
static const double PI
Definition: CommonParameters.h:118
static char programName[]
Definition: CommonParameters.h:160
static const double mu
Definition: CommonParameters.h:127
static const int EX_POLARIZATION
Definition: CommonParameters.h:32
static const double convKilometerToMeter
Definition: CommonParameters.h:158
static const int TE_MODE
Definition: CommonParameters.h:36
static const double rad2deg
Definition: CommonParameters.h:121
static const double abscissas1Point[1]
Definition: CommonParameters.h:140
static const int TM_MODE
Definition: CommonParameters.h:35
Definition: CommonParameters.h:99
double coord2
Definition: CommonParameters.h:102
double coord1
Definition: CommonParameters.h:101
double coord0
Definition: CommonParameters.h:100
Definition: CommonParameters.h:112
double second
Definition: CommonParameters.h:114
double first
Definition: CommonParameters.h:113
Definition: CommonParameters.h:64
double realPart
Definition: CommonParameters.h:65
double imagPart
Definition: CommonParameters.h:66
Definition: CommonParameters.h:74
double comp12
Definition: CommonParameters.h:76
double comp11
Definition: CommonParameters.h:75
double comp22
Definition: CommonParameters.h:78
double comp21
Definition: CommonParameters.h:77
Definition: CommonParameters.h:81
double comp22
Definition: CommonParameters.h:86
double comp31
Definition: CommonParameters.h:88
double comp21
Definition: CommonParameters.h:85
double comp11
Definition: CommonParameters.h:82
double comp12
Definition: CommonParameters.h:83
double comp33
Definition: CommonParameters.h:90
double comp13
Definition: CommonParameters.h:84
double comp23
Definition: CommonParameters.h:87
double comp32
Definition: CommonParameters.h:89
Definition: CommonParameters.h:69
int imagPart
Definition: CommonParameters.h:71
int realPart
Definition: CommonParameters.h:70
Definition: CommonParameters.h:93
double Z
Definition: CommonParameters.h:96
double Y
Definition: CommonParameters.h:95
double X
Definition: CommonParameters.h:94
Definition: CommonParameters.h:105
double coord3
Definition: CommonParameters.h:109
double coord0
Definition: CommonParameters.h:106
double coord2
Definition: CommonParameters.h:108
double coord1
Definition: CommonParameters.h:107
Definition: CommonParameters.h:59
CommonParameters::locationXY endPoint
Definition: CommonParameters.h:61
CommonParameters::locationXY startPoint
Definition: CommonParameters.h:60
Definition: CommonParameters.h:53
double Z
Definition: CommonParameters.h:56
double X
Definition: CommonParameters.h:54
double Y
Definition: CommonParameters.h:55
Definition: CommonParameters.h:38
double Y
Definition: CommonParameters.h:40
double X
Definition: CommonParameters.h:39
Definition: CommonParameters.h:43
double Y
Definition: CommonParameters.h:44
double Z
Definition: CommonParameters.h:45
Definition: CommonParameters.h:48
double X
Definition: CommonParameters.h:50
double Z
Definition: CommonParameters.h:49