nec2++  1.7.0
libnecpp.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2004-2008,2015 by Tim 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 *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
29 #ifndef __libnecpp__
30 #define __libnecpp__
31 
33 #ifdef __cplusplus
34 class nec_context;
35 #else
36 struct nec_context;
37 typedef struct nec_context nec_context;
38 #endif
39 
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
55 
61 nec_context* nec_create(void);
62 
66 long nec_delete(nec_context* in_context);
67 
69 
70 
75 
95 long nec_wire(nec_context* in_context, int tag_id, int segment_count,
96  double xw1, double yw1, double zw1,
97  double xw2, double yw2, double zw2,
98  double rad, double rdel, double rrad);
99 
100 
117 long nec_sp_card(nec_context* in_context, int ns,
118  double x1, double y1, double z1,
119  double x2, double y2, double z2);
120 
133 long nec_sc_card(nec_context* in_context, int i2,
134  double x3, double y3, double z3,
135  double x4, double y4, double z4);
136 
155 long nec_gm_card(nec_context* in_context, int itsi, int nrpt,
156  double rox, double roy, double roz, double xs,
157  double ys, double zs, int its );
158 
191 long nec_gx_card(nec_context* in_context, int i1, int i2);
192 
193 
202 long nec_geometry_complete(nec_context* in_context, int gpflag);
203 
205 
206 
210 
215 long nec_benchmark(void);
216 
221 const char* nec_error_message(void);
222 
224 
225 
230 
232 
241 long nec_medium_parameters(nec_context* in_context, double permittivity, double permeability);
242 
243 
265 long nec_gn_card(nec_context* in_context, int iperf, int nradl, double epse, double sig, double tmp3, double tmp4, double tmp5, double tmp6);
266 
275 long nec_fr_card(nec_context* in_context, int in_ifrq, int in_nfrq, double in_freq_mhz, double in_del_freq);
276 
283 long nec_ek_card(nec_context* in_context, int itmp1);
284 
285 
301 long nec_ld_card(nec_context* in_context, int ldtyp, int ldtag, int ldtagf, int ldtagt, double tmp1, double tmp2, double tmp3);
302 
303 
328  long nec_ex_card(nec_context* in_context, int extype, int i2, int i3, int i4, double tmp1, double tmp2, double tmp3, double tmp4, double tmp5, double tmp6);
329 
347 long nec_excitation_voltage(nec_context* in_context, int tag, int segment, double v_real, double v_imag);
348 
363 long nec_excitation_current(nec_context* in_context, double x, double y, double z, double a, double beta, double moment);
364 
382 long nec_excitation_planewave(nec_context* in_context, int n_theta, int n_phi,
383  double theta, double phi, double eta, double dtheta, double dphi, double pol_ratio);
384 
385 long nec_tl_card(nec_context* in_context, int itmp1, int itmp2, int itmp3, int itmp4, double tmp1, double tmp2, double tmp3, double tmp4, double tmp5, double tmp6);
386 long nec_nt_card(nec_context* in_context, int itmp1, int itmp2, int itmp3, int itmp4, double tmp1, double tmp2, double tmp3, double tmp4, double tmp5, double tmp6);
387 
404 long nec_xq_card(nec_context* in_context, int itmp1);
405 
406 long nec_gd_card(nec_context* in_context, double tmp1, double tmp2, double tmp3, double tmp4);
407 
409 
410 
411 
416 
481 long nec_rp_card(nec_context* in_context,
482  int calc_mode, int n_theta, int n_phi,
483  int output_format, int normalization, int D, int A,
484  double theta0, double phi0, double delta_theta, double delta_phi,
485  double radial_distance, double gain_norm);
486 
503 long nec_pt_card(nec_context* in_context, int itmp1, int itmp2, int itmp3, int itmp4);
504 
505 long nec_pq_card(nec_context* in_context, int itmp1, int itmp2, int itmp3, int itmp4);
506 
507 long nec_kh_card(nec_context* in_context, double tmp1);
508 long nec_ne_card(nec_context* in_context, int itmp1, int itmp2, int itmp3, int itmp4, double tmp1, double tmp2, double tmp3, double tmp4, double tmp5, double tmp6);
509 long nec_nh_card(nec_context* in_context, int itmp1, int itmp2, int itmp3, int itmp4, double tmp1, double tmp2, double tmp3, double tmp4, double tmp5, double tmp6);
510 
511 
512 long nec_cp_card(nec_context* in_context, int itmp1, int itmp2, int itmp3, int itmp4);
513 long nec_pl_card(nec_context* in_context, char* ploutput_filename, int itmp1, int itmp2, int itmp3, int itmp4);
514 
515 
517 
518 
523 
535 double nec_gain(nec_context* in_context, int freq_index, int theta_index, int phi_index);
536 
545 double nec_gain_max(nec_context* in_context, int freq_index);
546 
555 double nec_gain_min(nec_context* in_context, int freq_index);
556 
566 double nec_gain_mean(nec_context* in_context, int freq_index);
567 
577 double nec_gain_sd(nec_context* in_context, int freq_index);
578 
579 double nec_gain_rhcp_max(nec_context* in_context, int freq_index);
580 double nec_gain_rhcp_min(nec_context* in_context, int freq_index);
581 double nec_gain_rhcp_mean(nec_context* in_context, int freq_index);
582 double nec_gain_rhcp_sd(nec_context* in_context, int freq_index);
583 
584 double nec_gain_lhcp_max(nec_context* in_context, int freq_index);
585 double nec_gain_lhcp_min(nec_context* in_context, int freq_index);
586 double nec_gain_lhcp_mean(nec_context* in_context, int freq_index);
587 double nec_gain_lhcp_sd(nec_context* in_context, int freq_index);
588 
591 double nec_impedance_real(nec_context* in_context, int freq_index);
592 
595 double nec_impedance_imag(nec_context* in_context, int freq_index);
596 
598 
599 #ifdef __cplusplus
600 }
601 #endif
602 
603 
604 #endif /* __libnecpp__ */
long nec_ek_card(nec_context *in_context, int itmp1)
To control use of the extended thin-wire kernel approximation.
Definition: libNEC.cpp:254
double nec_impedance_real(nec_context *in_context, int freq_index)
Impedance: Real Part.
Definition: libNEC.cpp:146
long nec_benchmark(void)
Benchmark the libnecpp engine. A score of 1 is roughly an Athlon XP 1800.
Definition: libNEC.cpp:43
long nec_excitation_current(nec_context *in_context, double x, double y, double z, double a, double beta, double moment)
Current Source Excitation.
Definition: libNEC.cpp:179
long nec_geometry_complete(nec_context *in_context, int gpflag)
Indicate that the geometry is complete (GE card)
Definition: libNEC.cpp:80
double nec_impedance_imag(nec_context *in_context, int freq_index)
Impedance: Imaginary Part.
Definition: libNEC.cpp:149
double nec_gain_max(nec_context *in_context, int freq_index)
Get the maximum gain from a radiation pattern.
Definition: libNEC.cpp:94
long nec_gm_card(nec_context *in_context, int itsi, int nrpt, double rox, double roy, double roz, double xs, double ys, double zs, int its)
Coordinate Transformation.
Definition: libNEC.cpp:65
long nec_pt_card(nec_context *in_context, int itmp1, int itmp2, int itmp3, int itmp4)
Print Flag (Printing of Currents.
Definition: libNEC.cpp:227
const char * nec_error_message(void)
Get the last error message All functions return a long. If this is != 0. Then an error has occurred...
Definition: libNEC.cpp:85
long nec_excitation_voltage(nec_context *in_context, int tag, int segment, double v_real, double v_imag)
Voltage Source Excitation.
Definition: libNEC.cpp:183
long nec_gn_card(nec_context *in_context, int iperf, int nradl, double epse, double sig, double tmp3, double tmp4, double tmp5, double tmp6)
Ground Card Examples:
Definition: libNEC.cpp:169
long nec_gx_card(nec_context *in_context, int i1, int i2)
Reflection in Coordinate Planes.
Definition: libNEC.cpp:75
double nec_gain_mean(nec_context *in_context, int freq_index)
Get the mean gain from a radiation pattern.
Definition: libNEC.cpp:102
long nec_sc_card(nec_context *in_context, int i2, double x3, double y3, double z3, double x4, double y4, double z4)
Surface Patch Continuation (SC Card)
Definition: libNEC.cpp:59
long nec_excitation_planewave(nec_context *in_context, int n_theta, int n_phi, double theta, double phi, double eta, double dtheta, double dphi, double pol_ratio)
Planewave Excitation (Linear Polarization)
Definition: libNEC.cpp:187
long nec_ex_card(nec_context *in_context, int extype, int i2, int i3, int i4, double tmp1, double tmp2, double tmp3, double tmp4, double tmp5, double tmp6)
EX card (Excitation)
Definition: libNEC.cpp:174
long nec_fr_card(nec_context *in_context, int in_ifrq, int in_nfrq, double in_freq_mhz, double in_del_freq)
FR card.
Definition: libNEC.cpp:158
double nec_gain_sd(nec_context *in_context, int freq_index)
Get the standard deviation of the gain from a radiation pattern.
Definition: libNEC.cpp:106
long nec_delete(nec_context *in_context)
Delete an nec_context object.
Definition: libNEC.cpp:39
Definition: CurrentInput.h:26
double nec_gain(nec_context *in_context, int freq_index, int theta_index, int phi_index)
Get the gain from a radiation pattern.
Definition: libNEC.cpp:89
long nec_ld_card(nec_context *in_context, int ldtyp, int ldtag, int ldtagf, int ldtagt, double tmp1, double tmp2, double tmp3)
LD card (Loading)
Definition: libNEC.cpp:163
long nec_xq_card(nec_context *in_context, int itmp1)
XQ Card (Execute)
Definition: libNEC.cpp:203
double nec_gain_min(nec_context *in_context, int freq_index)
Get the minimum gain from a radiation pattern.
Definition: libNEC.cpp:98
long nec_medium_parameters(nec_context *in_context, double permittivity, double permeability)
Set the prameters of the medium (permittivity and permeability)
Definition: libNEC.cpp:153
long nec_sp_card(nec_context *in_context, int ns, double x1, double y1, double z1, double x2, double y2, double z2)
Surface Patch (SP Card)
Definition: libNEC.cpp:53
long nec_rp_card(nec_context *in_context, int calc_mode, int n_theta, int n_phi, int output_format, int normalization, int D, int A, double theta0, double phi0, double delta_theta, double delta_phi, double radial_distance, double gain_norm)
Standard radiation pattern parameters.
Definition: libNEC.cpp:214
nec_context * nec_create(void)
Create an nec_context and initialize it.
Definition: libNEC.cpp:32
Container for an nec2++ simulation.
Definition: nec_context.h:60
long nec_wire(nec_context *in_context, int tag_id, int segment_count, double xw1, double yw1, double zw1, double xw2, double yw2, double zw2, double rad, double rdel, double rrad)
Create a straigt wire.
Definition: libNEC.cpp:47