nec2++ 2.1.1
c_geometry Class Reference

Public Member Functions

void set_context (nec_context *m_context)
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.
void arc (int tag_id, int segment_count, nec_float rada, nec_float ang1, nec_float ang2, nec_float rad)
void helix (int tag_id, int segment_count, nec_float s, nec_float hl, nec_float a1, nec_float b1, nec_float a2, nec_float b2, nec_float rad)
void move (nec_float rox, nec_float roy, nec_float roz, nec_float xs, nec_float ys, nec_float zs, int its, int nrpt, int itgi)
void reflect (int ix, int iy, int iz, int itx)
 Reflects partial structure along x,y, or z axes.
void generate_cylindrical_structure (int itx, int nop)
 Rotates structure along Z-axis to generate a copies in a cylindrical array.
void reflect (int ix, int iy, int iz, int itx, int nop)
void scale (nec_float xw1)
 Scale all dimensions of a structure by a constant.
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.
void sp_card (int ns, nec_float in_x1, nec_float in_y1, nec_float in_z1, nec_float in_x2, nec_float in_y2, nec_float in_z2)
void sc_card (int i2, nec_float x3, nec_float y3, nec_float z3, nec_float x4, nec_float y4, nec_float z4)
void sc_multiple_card (int i2, nec_float x3, nec_float y3, nec_float z3, nec_float x4, nec_float y4, nec_float z4)
void gx_card (int card_int_1, int card_int_2)
void set_intersection_check (bool enable)
 Enable or disable segment intersection checking. Intersection checking is on by default. Disabling it can be useful for geometries where closely-spaced parallel wires cause false positive intersection errors (e.g., phasing stubs, boom models).
void set_intersection_fatal (bool fatal)
 Choose what an overlap finding does.
const std::vector< nec_overlap_finding > & overlap_findings () const
 The overlap findings the last geometry check produced.
void geometry_complete (nec_context *m_context, int gpflag)
 Geometry is complete.
int ground_connection () const
 The native GE ground flag (0, 1 or -1) the geometry was completed with.
void parse_geometry (nec_context *m_context, FILE *input_fp)
 Parse an NEC geometry description contained in the file input_fp.
int test_ek_approximation (int seg1, int seg2)
 Helper method to decide whether extended. thin-wire approximation can be used.
int64_t get_segment_number (int in_tag, int m)
 Get a segment number for a specified tag.
void frequency_scale (nec_float freq_mhz)
void tbf (int i, int icap)
void trio (int j)
void get_current_coefficients (nec_float wavelength, complex_array &curx, real_array &air, real_array &aii, real_array &bir, real_array &bii, real_array &cir, real_array &cii, complex_array &vqds, int nqds, int_array &iqds)
nec_float patch_angle (int patch_index, nec_float in_ax, nec_float in_ay, nec_float in_az)
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.
int64_t n_plus_m (void) const

Public Attributes

int64_t n_segments
int64_t np
int_array segment_tags
real_array x
real_array y
real_array z
real_array segment_length
real_array segment_radius
real_array x2
real_array y2
real_array z2
real_array cab
real_array sab
real_array salp
int64_t m
int64_t mp
int m_ipsym
int m_gpflag
real_array t1x
real_array t1y
real_array t1z
real_array t2x
real_array t2y
real_array t2z
real_array px
real_array py
real_array pz
real_array pbi
real_array psalp
int_array icon1
int_array icon2
int jsno
int nscon
int maxcon
int_array jco
real_array ax
real_array bx
real_array cx
int64_t n_plus_2m
int64_t n_plus_3m

Detailed Description

Examples
test_cpp.cpp.

Member Function Documentation

◆ generate_cylindrical_structure()

void c_geometry::generate_cylindrical_structure ( int itx,
int nop )
inline

Rotates structure along Z-axis to generate a copies in a cylindrical array.

Parameters
itxThe tag number increment.
nopThe total number of times that the structure is to occur in the cylindrical array.

References reflect().

◆ geometry_complete()

void c_geometry::geometry_complete ( nec_context * in_context,
int gpflag )

Geometry is complete.

Exceptions
nec_exception*If there is an error with the geometry.

We have finished with the geometry description, now connect things up.

Referenced by parse_geometry().

◆ get_segment_number()

int64_t c_geometry::get_segment_number ( int in_tag,
int in_m )

Get a segment number for a specified tag.

Parameters
in_tagThe tag
in_mThe mth segment with the specified tag will be returned.
Returns
The segment number of the mth segment having the tag number in_tag. if in_tag=0 segment number m is returned.

◆ overlap_findings()

const std::vector< nec_overlap_finding > & c_geometry::overlap_findings ( ) const
inline

The overlap findings the last geometry check produced.

Returns
One record per segment center found inside the volume of a segment it does not meet at a node.

◆ reflect()

void c_geometry::reflect ( int ix,
int iy,
int iz,
int itx )
inline

Reflects partial structure along x,y, or z axes.

Parameters
ixIf ix = 1 then the structure is reflected along X axis.
iyIf iy = 1 then the structure is reflected along Y axis.
izIf iz = 1 then the structure is reflected along Z axis.
itxThe tag number increment.

References reflect().

Referenced by generate_cylindrical_structure(), and reflect().

◆ set_intersection_check()

void c_geometry::set_intersection_check ( bool enable)
inline

Enable or disable segment intersection checking. Intersection checking is on by default. Disabling it can be useful for geometries where closely-spaced parallel wires cause false positive intersection errors (e.g., phasing stubs, boom models).

Parameters
enabletrue to check (default), false to skip checks.

◆ set_intersection_fatal()

void c_geometry::set_intersection_fatal ( bool fatal)
inline

Choose what an overlap finding does.

Parameters
fataltrue to reject the geometry on the first finding (the default), false to record every finding and let the solve proceed.

◆ wire()

void c_geometry::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.

Parameters
tag_id
segment_countNumber of Elements (should be around 12-20 per wavelength)
radWire radius of first segment (in Meters)
rdelRatio of the length of a segment to the length of the previous segment. (Set to 1.0 if segments have uniform length)
rradThe ratio of the radii of adjacent segments (Set to 1.0 if not tapered)
Examples
test_cpp.cpp.

Referenced by nec_context::benchmark().


The documentation for this class was generated from the following files: