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();
215 if (NULL == ipt)
return -999.0;
216 vector<nec_complex>& imp(ipt->get_impedance());
217 return imp.back().real();
222 if (NULL == ipt)
return -999.0;
223 vector<nec_complex>& imp(ipt->get_impedance());
224 return imp.back().imag();
283 void set_isave(
int in_isave)
313 inline void set_results_format(
enum RESULT_FORMAT result_format)
315 m_results.m_result_format = result_format;
318 inline void set_gain_only(
bool flag)
342 em::constants::permittivity = permittivity;
343 em::constants::permeability = permeability;
363 void wire(
int tag_id,
int segment_count,
364 nec_float xw1, nec_float yw1, nec_float zw1,
365 nec_float xw2, nec_float yw2, nec_float zw2,
366 nec_float rad, nec_float rdel, nec_float rrad);
369 nec_float x1, nec_float y1, nec_float z1,
370 nec_float x2, nec_float y2, nec_float z2);
372 void sc_card(
int i2,
373 nec_float x3, nec_float y3, nec_float z3,
374 nec_float x4, nec_float y4, nec_float z4);
376 void gx_card(
int i1,
int i2);
378 void move( nec_float rox, nec_float roy, nec_float roz, nec_float xs,
379 nec_float ys, nec_float zs,
int its,
int nrpt,
int itgi );
392 void arc(
int tag_id,
int segment_count, nec_float rada,
393 nec_float ang1, nec_float ang2, nec_float rad );
412 void helix(
int tag_id,
int segment_count, nec_float s, nec_float hl, nec_float a1, nec_float b1,
413 nec_float a2, nec_float b2, nec_float rad);
422 void fr_card(
int ifrq,
int nfrq, nec_float freq_mhz, nec_float del_freq);
442 void ld_card(
int itmp1,
int itmp2,
int itmp3,
int itmp4, nec_float tmp1, nec_float tmp2, nec_float tmp3);
469 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);
489 void ex_card(
enum excitation_type itmp1,
int itmp2,
int itmp3,
int itmp4, nec_float tmp1, nec_float tmp2, nec_float tmp3,
490 nec_float tmp4, nec_float tmp5, nec_float tmp6);
548 void ex_card(
enum excitation_type itmp1,
int itmp2,
int itmp3,
int itmp4,
int itmp5,
549 nec_float tmp1, nec_float tmp2, nec_float tmp3, nec_float tmp4, nec_float tmp5, nec_float tmp6)
551 int itmp45 = 10*itmp4 + itmp5;
552 return this->
ex_card( itmp1, itmp2, itmp3, itmp45, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6 );
576 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);
593 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);
609 void gd_card(nec_float tmp1, nec_float tmp2, nec_float tmp3, nec_float tmp4);
678 int n_theta,
int n_phi,
679 int output_format,
int normalization,
int D,
int A,
680 nec_float theta0, nec_float phi0, nec_float delta_theta, nec_float delta_phi,
681 nec_float radial_distance, nec_float gain_norm);
684 void pt_card(
int itmp1,
int itmp2,
int itmp3,
int itmp4);
688 void pq_card(
int itmp1,
int itmp2,
int itmp3,
int itmp4);
701 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);
708 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);
715 void cp_card(
int itmp1,
int itmp2,
int itmp3,
int itmp4);
721 void pl_card(
const char* ploutput_filename,
int itmp1,
int itmp2,
int itmp3,
int itmp4);
731 void write_results(ostream& os)
749 void simulate(
bool far_field_flag =
false);
754 std::unique_ptr<c_geometry> m_geometry;
762 int iptaq, iptaqf, iptaqt;
767 int iptag, iptagf, iptagt;
782 nec_float thetis, phiss;
794 nec_float _wavelength;
802 int nbbx, npbx, nlbx, nbbl, npbl, nlbl;
826 int_array ivqd, source_segment_array, iqds;
827 int nvqd, voltage_source_count, nqds;
831 int masym, neq, npeq, neq2, network_count, ntsol, nprint;
835 nec_float input_power, network_power_loss;
839 enum excitation_type m_excitation_type;
841 int m_rp_output_format;
842 int m_rp_normalization;
844 int m_near, nfeh, nrx, nry, nrz, nth, nph, ipd, iavp;
845 nec_float thets, phis, dth, dph, rfld, gnor;
846 nec_float xpr6, structure_power_loss, xnr, ynr, znr, dxnr, dynr, dznr;
850 int ind1, indd1, ind2, indd2;
853 nec_float m_s, m_b, xj, yj, zj, cabj, sabj, salpj;
855 nec_float t1xj, t1yj, t1zj, t2xj, t2yj, t2zj;
856 nec_complex exk, eyk, ezk, exs, eys, ezs, exc, eyc, ezc;
864 nec_float xo, yo, zo, sn, xsn, ysn;
871 nec_float zpka, rhks;
877 void gfld(nec_float rho, nec_float phi, nec_float rz,
878 nec_complex *eth, nec_complex *epi,
879 nec_complex *erd,
bool space_only, nec_float in_wavelength );
881 void ffld(nec_float thet, nec_float phi,
882 nec_complex *eth, nec_complex *eph, nec_float in_wavelength );
889 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);
892 void print_freq_int_krnl(
896 bool using_extended_kernel);
898 void antenna_env(
void);
901 void print_structure_currents(
char *pattype,
int iptflg,
int iptflq,
int iptag,
int iptagf,
int iptagt,
int iptaq,
902 int iptaqf,
int iptaqt);
906 void calculate_network_data(
void);
907 void print_network_data(
void);
908 void print_norm_rx_pattern();
909 void print_input_impedance();
910 void print_power_budget(
void);
911 nec_float compute_structure_power_loss(
void)
const;
912 void structure_segment_loading();
915 enum excitation_return
918 excitation_return excitation_process_inner(
int mhz);
919 excitation_return excitation_compute_near_field(
int mhz);
920 void excitation_compute_far_field();
922 void setup_excitation();
932 nec_float impedance_norm_factor;
934 nec_float xpr1, xpr2, xpr3, xpr4, xpr5, xpr7;
940 void cmset(int64_t nrow,
complex_array& in_cm, nec_float rkhx);
941 void compute_matrix_ss(
int j1,
int j2,
int im1,
int im2,
943 void cmsw(
int j1,
int j2,
int i1,
int i2,
complex_array& in_cm,
948 void cmww(
int j,
int i1,
int i2,
complex_array& in_cm, int64_t nr,
952 void efld(nec_float xi, nec_float yi, nec_float zi, nec_float ai,
bool not_on_source_segment);
953 nec_float efld_compute(nec_float xij, nec_float yij, nec_float ai, nec_float salpr,
955 void eksc(nec_float s, nec_float z, nec_float rh, nec_float xk,
int ij,
956 nec_complex *ezs, nec_complex *ers, nec_complex *ezc,
957 nec_complex *erc, nec_complex *ezk, nec_complex *erk);
958 void ekscx(nec_float bx, nec_float s, nec_float z, nec_float rhx, nec_float xk,
959 int ij,
int inx1,
int inx2, nec_complex *ezs,
960 nec_complex *ers, nec_complex *ezc, nec_complex *erc,
961 nec_complex *ezk, nec_complex *erk);
962 void etmns(nec_float p1, nec_float p2, nec_float p3, nec_float p4, nec_float p5,
963 nec_float p6, nec_float incident_amplitude,
enum excitation_type excite_type,
complex_array& e);
966 void etmns_linear_wave(nec_float cth, nec_float sth, nec_float cph, nec_float sph,
967 nec_float pxl, nec_float pyl, nec_float pzl, nec_float wx, nec_float wy, nec_float wz,
968 nec_float qx, nec_float qy, nec_float qz, nec_complex rrv, nec_complex rrh,
970 void etmns_circular_wave(nec_float cth, nec_float sth, nec_float cph, nec_float sph,
971 nec_float pxl, nec_float pyl, nec_float pzl, nec_float wx, nec_float wy, nec_float wz,
972 nec_float qx, nec_float qy, nec_float qz, nec_complex rrv, nec_complex rrh,
973 nec_float p6, nec_float incident_amplitude,
enum excitation_type excite_type,
complex_array& e);
974 void etmns_current_source(nec_float p1, nec_float p2, nec_float p3, nec_float p4,
977 void fblock(
int nrow,
int ncol, int64_t imax,
int ipsym );
979 void gf(nec_float zk, nec_float *co, nec_float *si);
980 void gh(nec_float zk, nec_float *hr, nec_float *hi);
981 void gx(nec_float zz, nec_float rh, nec_float xk,
982 nec_complex *gz, nec_complex *gzp);
983 void gxx(nec_float zz, nec_float rh, nec_float a, nec_float a2, nec_float xk,
984 int ira, nec_complex *g1, nec_complex *g1p, nec_complex *g2,
985 nec_complex *g2p, nec_complex *g3, nec_complex *gzp);
986 void hfk(nec_float el1, nec_float el2, nec_float rhk,
987 nec_float zpkx, nec_float *sgr, nec_float *sgi);
988 void hintg(nec_float xi, nec_float yi, nec_float zi);
989 void hsfld(nec_float xi, nec_float yi, nec_float zi, nec_float ai);
990 void hsflx(nec_float s, nec_float rh, nec_float zpx, nec_complex *hpk,
991 nec_complex *hps, nec_complex *hpc);
993 void intx(nec_float el1, nec_float el2, nec_float b,
int ij,
994 nec_float *sgr, nec_float *sgi);
996 void nefld(nec_float xob, nec_float yob, nec_float zob, nec_complex *ex,
997 nec_complex *ey, nec_complex *ez);
1011 void netwk_compute_inputs(
complex_array& einc, netwk_state& st);
1013 void nhfld(nec_float xob, nec_float yob, nec_float zob, nec_complex *hx,
1014 nec_complex *hy, nec_complex *hz);
1015 void pcint(nec_float xi, nec_float yi, nec_float zi, nec_float cabi,
1017 void impedance_print(
int in1,
int in2,
int in3, nec_float fl1, nec_float fl2,
1018 nec_float fl3, nec_float fl4, nec_float fl5, nec_float fl6,
const char *ia);
1022 void rom2(nec_float a, nec_float b,
complex_array& sum, nec_float dmin);
1024 void solgf(nec_complex *a, nec_complex *b, nec_complex *c,
1025 nec_complex *d, nec_complex *xy,
int *ip,
int np,
int n1,
1026 int n,
int mp,
int m1,
int m,
int n1c,
int n2c,
int n2cz);
1027 void unere(nec_float xob, nec_float yob, nec_float zob,
bool ground_reflection);
1028 nec_complex zint(nec_float sigl, nec_float rolam);
1030 void init_voltage_sources();