91 void reset_processing_to_structure_loading() {
96 case PROCESSING_MEMORY_ALLOC:
104 void reset_processing_to_excitation_setup() {
109 case PROCESSING_MEMORY_ALLOC:
112 case PROCESSING_STRUCTURE_LOADING:
121 return m_geometry.get();
130 double get_gain(
int freq_index,
int theta_index,
int phi_index) {
132 if (NULL == rp)
return -999.0;
136 double get_gain_max(
int freq_index = 0) {
138 if (NULL == rp)
return -999.0;
139 return rp->get_gain_max();
142 double get_gain_min(
int freq_index = 0) {
144 if (NULL == rp)
return -999.0;
145 return rp->get_gain_min();
148 double get_gain_mean(
int freq_index = 0) {
150 if (NULL == rp)
return -999.0;
151 return rp->get_gain_mean();
154 double get_gain_sd(
int freq_index = 0) {
156 if (NULL == rp)
return -999.0;
157 return rp->get_gain_sd();
161 double get_gain_rhcp_max(
int freq_index = 0) {
163 if (NULL == rp)
return -999.0;
164 return rp->get_gain_rhcp_max();
167 double get_gain_rhcp_min(
int freq_index = 0) {
169 if (NULL == rp)
return -999.0;
170 return rp->get_gain_rhcp_min();
173 double get_gain_rhcp_mean(
int freq_index = 0) {
175 if (NULL == rp)
return -999.0;
176 return rp->get_gain_rhcp_mean();
179 double get_gain_rhcp_sd(
int freq_index = 0) {
181 if (NULL == rp)
return -999.0;
182 return rp->get_gain_rhcp_sd();
186 double get_gain_lhcp_max(
int freq_index = 0) {
188 if (NULL == rp)
return -999.0;
189 return rp->get_gain_lhcp_max();
192 double get_gain_lhcp_min(
int freq_index = 0) {
194 if (NULL == rp)
return -999.0;
195 return rp->get_gain_lhcp_min();
198 double get_gain_lhcp_mean(
int freq_index = 0) {
200 if (NULL == rp)
return -999.0;
201 return rp->get_gain_lhcp_mean();
204 double get_gain_lhcp_sd(
int freq_index = 0) {
206 if (NULL == rp)
return -999.0;
207 return rp->get_gain_lhcp_sd();
244 if (NULL == ipt)
return -999.0;
245 vector<nec_complex>& imp(ipt->get_impedance());
246 if (feed_index < 0 || (
size_t)feed_index >= imp.size())
return -999.0;
247 return imp[feed_index].real();
256 if (NULL == ipt)
return -999.0;
257 vector<nec_complex>& imp(ipt->get_impedance());
258 if (feed_index < 0 || (
size_t)feed_index >= imp.size())
return -999.0;
259 return imp[feed_index].imag();
320 void set_isave(
int in_isave)
350 inline void set_results_format(
enum RESULT_FORMAT result_format)
352 m_results.m_result_format = result_format;
355 inline void set_gain_only(
bool flag)
379 em::constants::permittivity = permittivity;
380 em::constants::permeability = permeability;
400 void wire(
int tag_id,
int segment_count,
401 nec_float xw1, nec_float yw1, nec_float zw1,
402 nec_float xw2, nec_float yw2, nec_float zw2,
403 nec_float rad, nec_float rdel, nec_float rrad);
406 nec_float x1, nec_float y1, nec_float z1,
407 nec_float x2, nec_float y2, nec_float z2);
409 void sc_card(
int i2,
410 nec_float x3, nec_float y3, nec_float z3,
411 nec_float x4, nec_float y4, nec_float z4);
413 void gx_card(
int i1,
int i2);
415 void move( nec_float rox, nec_float roy, nec_float roz, nec_float xs,
416 nec_float ys, nec_float zs,
int its,
int nrpt,
int itgi );
429 void arc(
int tag_id,
int segment_count, nec_float rada,
430 nec_float ang1, nec_float ang2, nec_float rad );
449 void helix(
int tag_id,
int segment_count, nec_float s, nec_float hl, nec_float a1, nec_float b1,
450 nec_float a2, nec_float b2, nec_float rad);
459 void fr_card(
int ifrq,
int nfrq, nec_float freq_mhz, nec_float del_freq);
479 void ld_card(
int itmp1,
int itmp2,
int itmp3,
int itmp4, nec_float tmp1, nec_float tmp2, nec_float tmp3);
506 void gn_card(
int ground_type,
int rad_wire_count, nec_float tmp1, nec_float tmp2, nec_float tmp3, nec_float tmp4, nec_float tmp5, nec_float tmp6);
526 void ex_card(
enum excitation_type itmp1,
int itmp2,
int itmp3,
int itmp4, nec_float tmp1, nec_float tmp2, nec_float tmp3,
527 nec_float tmp4, nec_float tmp5, nec_float tmp6);
585 void ex_card(
enum excitation_type itmp1,
int itmp2,
int itmp3,
int itmp4,
int itmp5,
586 nec_float tmp1, nec_float tmp2, nec_float tmp3, nec_float tmp4, nec_float tmp5, nec_float tmp6)
588 int itmp45 = 10*itmp4 + itmp5;
589 return this->
ex_card( itmp1, itmp2, itmp3, itmp45, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6 );
613 void tl_card(
int itmp1,
int itmp2,
int itmp3,
int itmp4, nec_float tmp1, nec_float tmp2, nec_float tmp3, nec_float tmp4, nec_float tmp5, nec_float tmp6);
630 void nt_card(
int itmp1,
int itmp2,
int itmp3,
int itmp4, nec_float tmp1, nec_float tmp2, nec_float tmp3, nec_float tmp4, nec_float tmp5, nec_float tmp6);
646 void gd_card(nec_float tmp1, nec_float tmp2, nec_float tmp3, nec_float tmp4);
715 int n_theta,
int n_phi,
716 int output_format,
int normalization,
int D,
int A,
717 nec_float theta0, nec_float phi0, nec_float delta_theta, nec_float delta_phi,
718 nec_float radial_distance, nec_float gain_norm);
721 void pt_card(
int itmp1,
int itmp2,
int itmp3,
int itmp4);
725 void pq_card(
int itmp1,
int itmp2,
int itmp3,
int itmp4);
738 void ne_card(
int itmp1,
int itmp2,
int itmp3,
int itmp4, nec_float tmp1, nec_float tmp2, nec_float tmp3, nec_float tmp4, nec_float tmp5, nec_float tmp6);
745 void nh_card(
int itmp1,
int itmp2,
int itmp3,
int itmp4, nec_float tmp1, nec_float tmp2, nec_float tmp3, nec_float tmp4, nec_float tmp5, nec_float tmp6);
752 void cp_card(
int itmp1,
int itmp2,
int itmp3,
int itmp4);
758 void pl_card(
const char* ploutput_filename,
int itmp1,
int itmp2,
int itmp3,
int itmp4);
768 void write_results(ostream& os)
786 void simulate(
bool far_field_flag =
false);
791 std::unique_ptr<c_geometry> m_geometry;
799 int iptaq, iptaqf, iptaqt;
804 int iptag, iptagf, iptagt;
819 nec_float thetis, phiss;
831 nec_float _wavelength;
839 int nbbx, npbx, nlbx, nbbl, npbl, nlbl;
863 int_array ivqd, source_segment_array, iqds;
864 int nvqd, voltage_source_count, nqds;
868 int masym, neq2, network_count, ntsol, nprint;
873 nec_float input_power, network_power_loss;
877 enum excitation_type m_excitation_type;
879 int m_rp_output_format;
880 int m_rp_normalization;
882 int m_near, nfeh, nrx, nry, nrz, nth, nph, ipd, iavp;
883 nec_float thets, phis, dth, dph, rfld, gnor;
884 nec_float xpr6, structure_power_loss, xnr, ynr, znr, dxnr, dynr, dznr;
888 int ind1, indd1, ind2, indd2;
891 nec_float m_s, m_b, xj, yj, zj, cabj, sabj, salpj;
893 nec_float t1xj, t1yj, t1zj, t2xj, t2yj, t2zj;
894 nec_complex exk, eyk, ezk, exs, eys, ezs, exc, eyc, ezc;
902 nec_float xo, yo, zo, sn, xsn, ysn;
909 nec_float zpka, rhks;
915 void gfld(nec_float rho, nec_float phi, nec_float rz,
916 nec_complex *eth, nec_complex *epi,
917 nec_complex *erd,
bool space_only, nec_float in_wavelength );
919 void ffld(nec_float thet, nec_float phi,
920 nec_complex *eth, nec_complex *eph, nec_float in_wavelength );
928 bool step_warning_issued;
932 void ne_nh_card(
int in_nfeh,
int itmp1,
int itmp2,
int itmp3,
int itmp4, nec_float tmp1, nec_float tmp2, nec_float tmp3, nec_float tmp4, nec_float tmp5, nec_float tmp6);
935 void print_freq_int_krnl(
939 bool using_extended_kernel);
941 void antenna_env(
void);
944 void print_structure_currents(
char *pattype,
int iptflg,
int iptflq,
int iptag,
int iptagf,
int iptagt,
int iptaq,
945 int iptaqf,
int iptaqt);
949 void calculate_network_data(
void);
950 void print_network_data(
void);
951 void print_norm_rx_pattern();
952 void print_input_impedance();
953 void print_power_budget(
void);
954 nec_float compute_structure_power_loss(
void)
const;
955 void structure_segment_loading();
958 enum excitation_return
961 excitation_return excitation_process_inner(
int mhz);
962 excitation_return excitation_compute_near_field(
int mhz);
963 void excitation_compute_far_field();
965 void setup_excitation();
975 nec_float impedance_norm_factor;
977 nec_float xpr1, xpr2, xpr3, xpr4, xpr5, xpr7;
983 void cmset(int64_t nrow,
complex_array& in_cm, nec_float rkhx);
984 void compute_matrix_ss(
int j1,
int j2,
int im1,
int im2,
986 void cmsw(
int j1,
int j2,
int i1,
int i2,
complex_array& in_cm,
991 void cmww(
int j,
int i1,
int i2,
complex_array& in_cm, int64_t nr,
995 void efld(nec_float xi, nec_float yi, nec_float zi, nec_float ai,
bool not_on_source_segment);
996 nec_float efld_compute(nec_float xij, nec_float yij, nec_float ai, nec_float salpr,
998 void eksc(nec_float s, nec_float z, nec_float rh, nec_float xk,
int ij,
999 nec_complex *ezs, nec_complex *ers, nec_complex *ezc,
1000 nec_complex *erc, nec_complex *ezk, nec_complex *erk);
1001 void ekscx(nec_float bx, nec_float s, nec_float z, nec_float rhx, nec_float xk,
1002 int ij,
int inx1,
int inx2, nec_complex *ezs,
1003 nec_complex *ers, nec_complex *ezc, nec_complex *erc,
1004 nec_complex *ezk, nec_complex *erk);
1005 void etmns(nec_float p1, nec_float p2, nec_float p3, nec_float p4, nec_float p5,
1006 nec_float p6, nec_float incident_amplitude,
enum excitation_type excite_type,
complex_array& e);
1009 void etmns_linear_wave(nec_float cth, nec_float sth, nec_float cph, nec_float sph,
1010 nec_float pxl, nec_float pyl, nec_float pzl, nec_float wx, nec_float wy, nec_float wz,
1011 nec_float qx, nec_float qy, nec_float qz, nec_complex rrv, nec_complex rrh,
1013 void etmns_circular_wave(nec_float cth, nec_float sth, nec_float cph, nec_float sph,
1014 nec_float pxl, nec_float pyl, nec_float pzl, nec_float wx, nec_float wy, nec_float wz,
1015 nec_float qx, nec_float qy, nec_float qz, nec_complex rrv, nec_complex rrh,
1016 nec_float p6, nec_float incident_amplitude,
enum excitation_type excite_type,
complex_array& e);
1017 void etmns_current_source(nec_float p1, nec_float p2, nec_float p3, nec_float p4,
1019 int etmns_patch_base(
int patch_index)
const;
1022 void fblock(
int nrow,
int ncol, int64_t imax,
int ipsym );
1024 void gf(nec_float zk, nec_float *co, nec_float *si);
1025 void gh(nec_float zk, nec_float *hr, nec_float *hi);
1026 void gx(nec_float zz, nec_float rh, nec_float xk,
1027 nec_complex *gz, nec_complex *gzp);
1028 void gxx(nec_float zz, nec_float rh, nec_float a, nec_float a2, nec_float xk,
1029 int ira, nec_complex *g1, nec_complex *g1p, nec_complex *g2,
1030 nec_complex *g2p, nec_complex *g3, nec_complex *gzp);
1031 void hfk(nec_float el1, nec_float el2, nec_float rhk,
1032 nec_float zpkx, nec_float *sgr, nec_float *sgi);
1033 void hintg(nec_float xi, nec_float yi, nec_float zi);
1034 void hsfld(nec_float xi, nec_float yi, nec_float zi, nec_float ai);
1035 void hsflx(nec_float s, nec_float rh, nec_float zpx, nec_complex *hpk,
1036 nec_complex *hps, nec_complex *hpc);
1038 void intx(nec_float el1, nec_float el2, nec_float b,
int ij,
1039 nec_float *sgr, nec_float *sgi);
1041 void nefld(nec_float xob, nec_float yob, nec_float zob, nec_complex *ex,
1042 nec_complex *ey, nec_complex *ez);
1043 struct netwk_state {
1056 void netwk_compute_inputs(
complex_array& einc, netwk_state& st);
1058 void nhfld(nec_float xob, nec_float yob, nec_float zob, nec_complex *hx,
1059 nec_complex *hy, nec_complex *hz);
1060 void pcint(nec_float xi, nec_float yi, nec_float zi, nec_float cabi,
1062 void impedance_print(
int in1,
int in2,
int in3, nec_float fl1, nec_float fl2,
1063 nec_float fl3, nec_float fl4, nec_float fl5, nec_float fl6,
const char *ia);
1067 void rom2(nec_float a, nec_float b,
complex_array& sum, nec_float dmin);
1069 void solgf(nec_complex *a, nec_complex *b, nec_complex *c,
1070 nec_complex *d, nec_complex *xy,
int *ip,
int np,
int n1,
1071 int n,
int mp,
int m1,
int m,
int n1c,
int n2c,
int n2cz);
1072 void unere(nec_float xob, nec_float yob, nec_float zob,
bool ground_reflection);
1073 nec_complex zint(nec_float sigl, nec_float rolam);
1075 void init_voltage_sources();