18 #ifndef __c_geometry__
19 #define __c_geometry__
20 #include "math_util.h"
29 #include "nec_output.h"
65 void wire(
int tag_id,
int segment_count,
66 nec_float xw1, nec_float yw1, nec_float zw1,
67 nec_float xw2, nec_float yw2, nec_float zw2,
69 nec_float rdel, nec_float rrad);
72 void arc(
int tag_id,
int segment_count, nec_float rada,
73 nec_float ang1, nec_float ang2, nec_float rad );
75 void helix( nec_float s, nec_float hl, nec_float a1, nec_float b1,
76 nec_float a2, nec_float b2, nec_float rad,
int segment_count,
int tag_id );
78 void move( nec_float rox, nec_float roy, nec_float roz, nec_float xs,
79 nec_float ys, nec_float zs,
int its,
int nrpt,
int itgi );
88 void reflect(
int ix,
int iy,
int iz,
int itx) {
89 int nop = 100*ix + 10*iy + iz;
90 return self->reflect(ix, iy, iz, itx, nop);
100 return self->reflect(-1, 0, 0, itx, nop);
103 void reflect(
int ix,
int iy,
int iz,
int itx,
int nop );
106 void scale( nec_float xw1);
108 void patch(
int nx,
int ny,
109 nec_float ax1, nec_float ay1, nec_float az1,
110 nec_float ax2, nec_float ay2, nec_float az2,
111 nec_float ax3, nec_float ay3, nec_float az3,
112 nec_float ax4, nec_float ay4, nec_float az4 );
115 void sp_card(
int ns,
116 nec_float in_x1, nec_float in_y1, nec_float in_z1,
117 nec_float in_x2, nec_float in_y2, nec_float in_z2);
119 void sc_card(
int i2,
120 nec_float x3, nec_float y3, nec_float z3,
121 nec_float x4, nec_float y4, nec_float z4);
122 void sc_multiple_card(
int i2,
123 nec_float x3, nec_float y3, nec_float z3,
124 nec_float x4, nec_float y4, nec_float z4);
126 void gx_card(
int card_int_1,
int card_int_2);
147 void frequency_scale(nec_float freq_mhz);
149 void tbf(
int i,
int icap);
152 void get_current_coefficients(nec_float wavelength,
complex_array& curx,
159 nec_float patch_angle(
int patch_index, nec_float in_ax, nec_float in_ay, nec_float in_az);
163 void fflds(nec_float rox, nec_float roy, nec_float roz,
165 nec_complex *in_ex, nec_complex *in_ey, nec_complex *in_ez );
170 real_array x, y, z, segment_length, segment_radius;
183 int jsno, nscon, maxcon;
187 inline int n_plus_m(
void)
const {
188 return n_segments + m;
190 int n_plus_2m, n_plus_3m;
194 real_array x_unscaled, y_unscaled, z_unscaled, si_unscaled, bi_unscaled;
195 real_array px_unscaled, py_unscaled, pz_unscaled, pbi_unscaled;
197 void sbf(
int i,
int is, nec_float *aa, nec_float *bb, nec_float *cc );
199 void divide_patch(
int nx );
201 void connect_segments(
int ignd );
203 void read_geometry_card(FILE* input_fp,
char *gm,
205 nec_float *x1, nec_float *y1,nec_float *z1,
206 nec_float *x2, nec_float *y2, nec_float *z2,
212 std::vector<nec_wire> m_wires;
215 nec_3vector patch_x1, patch_x2, patch_x3, patch_x4;
int get_segment_number(int in_tag, int m)
Get a segment number for a specified tag.
Definition: c_geometry.cpp:59
void reflect(int ix, int iy, int iz, int itx)
Reflects partial structure along x,y, or z axes.
Definition: c_geometry.h:88
void generate_cylindrical_structure(int itx, int nop)
Rotates structure along Z-axis to generate a copies in a cylindrical array.
Definition: c_geometry.h:98
void wire(int tag_id, int segment_count, nec_float xw1, nec_float yw1, nec_float zw1, nec_float xw2, nec_float yw2, nec_float zw2, nec_float rad, nec_float rdel, nec_float rrad)
Generates segment geometry for a straingt wire.
Definition: c_geometry.cpp:657
Definition: nec_output.h:56
A Class for handling 3 dimensional vectors.
Definition: math_util.h:196
void geometry_complete(nec_context *m_context, int gpflag)
Geometry is complete If there is an error with the geometry.
Definition: c_geometry.cpp:477
void patch(int nx, int ny, nec_float ax1, nec_float ay1, nec_float az1, nec_float ax2, nec_float ay2, nec_float az2, nec_float ax3, nec_float ay3, nec_float az3, nec_float ax4, nec_float ay4, nec_float az4)
patch generates and modifies patch geometry data.
Definition: c_geometry.cpp:2093
int test_ek_approximation(int seg1, int seg2)
Helper method to decide whether extended. thin-wire approximation can be used.
Definition: c_geometry.cpp:3303
Definition: c_geometry.h:51
void scale(nec_float xw1)
Scale all dimensions of a structure by a constant.
Definition: c_geometry.cpp:1463
void parse_geometry(nec_context *m_context, FILE *input_fp)
Parse an NEC geometry description contained in the file input_fp.
Definition: c_geometry.cpp:105
void fflds(nec_float rox, nec_float roy, nec_float roz, complex_array &scur, nec_complex *in_ex, nec_complex *in_ey, nec_complex *in_ez)
Calculate the xyz components of the electric field due to surface currents.
Definition: c_geometry.cpp:3273
Container for an nec2++ simulation.
Definition: nec_context.h:60