nec2++  1.7.0
nec_structure_currents.h
1 /*
2  Copyright (C) 2004-2008 Timothy C.A. Molteno
3  tim@molteno.net
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19 #ifndef __nec_structure_currents__
20 #define __nec_structure_currents__
21 
22 #include "nec_results.h"
23 #include "math_util.h"
24 #include "nec_context.h"
25 
26 
27 class nec_context;
28 class c_geometry;
29 
31 {
32 public:
33  /*Structure currents*/
34  nec_structure_currents(nec_context * in_context, enum excitation_type in_pattype,
35  int in_nload,
36  nec_float in_xpr3, nec_float in_xpr6);
37 
38  static std::string hpol(enum excitation_type e);
39 
40  void analyze();
41 
42  virtual ~nec_structure_currents()
43  {
44  }
45 
46  virtual void write_to_file(ostream& os)
47  {
48  write_to_file_aux(os);
49  }
50 
51  virtual enum nec_result_type get_result_type()
52  {
53  return RESULT_STRUCTURE_CURRENTS;
54  }
55 
56  int get_iptflg()
57  {
58  return iptflg;
59  }
60 
61  int get_iptflq()
62  {
63  return iptflq;
64  }
65 
66  int get_n();
67 
68  int get_m();
69 
70  vector<int> get_current_segment_number()
71  {
72  return _current_segment_number;
73  }
74 
75  vector<int> get_current_segment_tag()
76  {
77  return _current_segment_tag;
78  }
79 
80  vector<nec_float> get_current_segment_center_x()
81  {
82  return _current_segment_center_x;
83  }
84 
85  vector<nec_float> get_current_segment_center_y()
86  {
87  return _current_segment_center_y;
88  }
89 
90  vector<nec_float> get_current_segment_center_z()
91  {
92  return _current_segment_center_z;
93  }
94 
95  vector<nec_float> get_current_segment_length()
96  {
97  return _current_segment_length;
98  }
99 
100  vector<nec_float> get_current_theta()
101  {
102  return _current_theta;
103  }
104 
105  vector<nec_float> get_current_phi()
106  {
107  return _current_phi;
108  }
109 
110  vector<nec_complex> get_current()
111  {
112  return _current;
113  }
114 
115  vector<int> get_q_density_segment_number()
116  {
117  return _q_density_segment_number;
118  }
119 
120  vector<int> get_q_density_segment_tag()
121  {
122  return _q_density_segment_tag;
123  }
124 
125  vector<nec_float> get_q_density_segment_center_x()
126  {
127  return _q_density_segment_center_x;
128  }
129 
130  vector<nec_float> get_q_density_segment_center_y()
131  {
132  return _q_density_segment_center_y;
133  }
134 
135  vector<nec_float> get_q_density_segment_center_z()
136  {
137  return _q_density_segment_center_z;
138  }
139 
140  vector<nec_float> get_q_density_segment_length()
141  {
142  return _q_density_segment_length;
143  }
144 
145  vector<nec_complex> get_q_density()
146  {
147  return _q_density;
148  }
149 
150  vector<int> get_patch_number()
151  {
152  return _patch_number;
153  }
154 
155  vector<nec_float> get_patch_center_x()
156  {
157  return _patch_center_x;
158  }
159 
160  vector<nec_float> get_patch_center_y()
161  {
162  return _patch_center_y;
163  }
164 
165  vector<nec_float> get_patch_center_z()
166  {
167  return _patch_center_z;
168  }
169 
170  vector<nec_complex> get_patch_tangent_vector1()
171  {
172  return _patch_tangent_vector1;
173  }
174 
175  vector<nec_complex> get_patch_tangent_vector2()
176  {
177  return _patch_tangent_vector2;
178  }
179 
180  vector<nec_complex> get_patch_e_x()
181  {
182  return _patch_e_x;
183  }
184 
185  vector<nec_complex> get_patch_e_y()
186  {
187  return _patch_e_y;
188  }
189 
190  vector<nec_complex> get_patch_e_z()
191  {
192  return _patch_e_z;
193  }
194 
195 private:
196 
197  nec_context *m_context;
198  c_geometry * m_geometry;
199  enum excitation_type pattype;
200 
201  int iptflg;
202  int iptag, iptagf, iptagt;
203  int iptflq;
204  int iptaq, iptaqf, iptaqt;
205 
206  int nload;
207 
208  nec_float xpr3, xpr6;
209  nec_float wavelength;
210  nec_float freq_mhz;
211 
212  nec_float structure_power_loss;
213 
214  int current_nb_elements;
215  int q_density_nb_elements;
216  int q_density_last_printed;
217  int patch_nb_elements;
218 
219  complex_array zarray;
220  real_array fnorm;
221 
222  vector<int> _current_segment_number;
223  vector<int> _current_segment_tag;
224 
225  vector<nec_float> _current_segment_center_x, _current_segment_center_y, _current_segment_center_z;
226  vector<nec_float> _current_segment_length;
227  vector<nec_float> _current_theta, _current_phi;
228 
229  vector<nec_complex> _current;
230 
231  vector<int> _q_density_segment_number;
232  vector<int> _q_density_segment_tag;
233 
234  vector<nec_float> _q_density_segment_center_x, _q_density_segment_center_y, _q_density_segment_center_z;
235  vector<nec_float> _q_density_segment_length;
236 
237  vector<nec_complex> _q_density;
238 
239  vector<int> _patch_number;
240 
241  vector<nec_float> _patch_center_x, _patch_center_y, _patch_center_z;
242 
243  vector<nec_complex> _patch_tangent_vector1, _patch_tangent_vector2;
244  vector<nec_complex> _patch_e_x, _patch_e_y, _patch_e_z;
245 
246  void write_to_file_aux(ostream& os);
247 };
248 
249 #endif
Definition: nec_structure_currents.h:30
Definition: c_geometry.h:51
Using nec_context.
Definition: nec_results.h:230
Container for an nec2++ simulation.
Definition: nec_context.h:60