1 /* 2 * Shared global variables for nec2c.c 3 */ 4 5 #include "shared.h" 6 7 /*------------------------------------------------------------------------*/ 8 9 /* Editor windows */ 10 GtkWidget 11 *wire_editor = NULL, /* Wire designer window */ 12 *arc_editor = NULL, /* Arc designer window */ 13 *helix_editor = NULL, /* Helix designer window */ 14 *patch_editor = NULL, /* Patch designer window */ 15 *reflect_editor = NULL, /* Reflect design window */ 16 *scale_editor = NULL, /* Scale designer window */ 17 *cylinder_editor = NULL, /* Cylinder designer window */ 18 *transform_editor = NULL, /* Transform designer window */ 19 *gend_editor = NULL; /* Geom End designer window */ 20 21 /* Command windows */ 22 GtkWidget 23 *excitation_command= NULL, /* Ecitation command editor */ 24 *frequency_command = NULL, /* Frequency command editor */ 25 *ground_command = NULL, /* Ground command editor (GN) */ 26 *ground2_command = NULL, /* Ground command editor (GD) */ 27 *loading_command = NULL, /* Loading command editor */ 28 *network_command = NULL, /* Network command editor */ 29 *txline_command = NULL, /* Tran Line command editor */ 30 *radiation_command = NULL, /* Rad Pattern command editor */ 31 *nearfield_command = NULL, /* Near Fields command editor */ 32 *kernel_command = NULL, /* Thin-wire Kernel command editor */ 33 *intrange_command = NULL, /* Interaction Range command editor */ 34 *execute_command = NULL; /* Execute (EX card) command editor */ 35 36 /* Frequency step entry */ 37 GtkEntry *rdpattern_fstep_entry = NULL; 38 39 /* Radiation pattern rotation, freq and zoom spin buttons */ 40 GtkSpinButton 41 *rotate_rdpattern = NULL, 42 *incline_rdpattern = NULL, 43 *rotate_structure = NULL, 44 *incline_structure = NULL, 45 *rdpattern_zoom = NULL, 46 *structure_zoom = NULL, 47 *rdpattern_frequency = NULL, 48 *mainwin_frequency = NULL; 49 50 projection_parameters_t 51 rdpattern_proj_params, 52 structure_proj_params; 53 54 /* Scroll adjustments of geometry 55 * and command treeview windows */ 56 GtkAdjustment 57 *geom_adjustment = NULL, 58 *cmnd_adjustment = NULL; 59 60 GtkTreeView 61 *geom_treeview = NULL, 62 *cmnd_treeview = NULL; 63 64 /* Main, frequency plots and radation pattern windows */ 65 GtkWidget 66 *main_window = NULL, 67 *freqplots_window = NULL, 68 *rdpattern_window = NULL, 69 *nec2_edit_window = NULL; 70 71 /* Drawing area widgets */ 72 GtkWidget *structure_drawingarea = NULL; 73 GtkWidget *freqplots_drawingarea = NULL; 74 GtkWidget *rdpattern_drawingarea = NULL; 75 76 /* Motion event handler id */ 77 gulong rdpattern_motion_handler; 78 79 /* Dialog widgets */ 80 GtkWidget *quit_dialog = NULL; 81 GtkWidget *animate_dialog = NULL; 82 83 /* Frequency step entry widget */ 84 GtkEntry *structure_fstep_entry = NULL; 85 86 /* Motion event handler id */ 87 gulong structure_motion_handler; 88 89 /* Commands between parent and child processes */ 90 char *fork_commands[] = FORK_CMNDS; 91 92 /* Forked process data */ 93 forked_proc_data_t **forked_proc_data = NULL; 94 95 /* Number of forked child processes */ 96 int num_child_procs = 0; 97 98 /* Program forked flag */ 99 gboolean FORKED = FALSE; 100 101 /* Used to kill window deleted by user */ 102 GtkWidget *kill_window = NULL; 103 104 /* Animation timeout callback tag */ 105 guint anim_tag = 0; 106 107 /* Pixmap for drawing structures */ 108 GdkPixmap *structure_pixmap = NULL; 109 int structure_pixmap_width, structure_pixmap_height; 110 111 /* Pixmap for drawing plots */ 112 GdkPixmap *freqplots_pixmap = NULL; 113 int freqplots_pixmap_width, freqplots_pixmap_height; 114 115 /* Pixmap for drawing radiation patterns */ 116 GdkPixmap *rdpattern_pixmap = NULL; 117 int rdpattern_pixmap_width, rdpattern_pixmap_height; 118 119 /* Frequency loop idle function tag */ 120 guint floop_tag = 0; 121 122 /* Radiation pattern data */ 123 rad_pattern_t *rad_pattern = NULL; 124 125 /* Near E/H field data */ 126 near_field_t near_field; 127 128 /* Segments for drawing structure */ 129 GdkSegment *structure_segs = NULL; 130 131 /* Global tag number for geometry editors */ 132 gint gbl_tag_num = 0; 133 134 GtkWidget *error_dialog = NULL; 135 136 /* Tree list stores */ 137 GtkListStore 138 *cmnt_store = NULL, 139 *geom_store = NULL, 140 *cmnd_store = NULL; 141 142 complex double *cm = NULL; 143 144 /* Needed data */ 145 impedance_data_t impedance_data; 146 147 /* Data for various calculations */ 148 calc_data_t calc_data; 149 data_t data; 150 151 /* Magnitude of seg/patch current/charge */ 152 double *cmag = NULL, *ct1m = NULL, *ct2m = NULL; 153 154 /* common /crnt/ */ 155 crnt_t crnt; 156 157 /* common /dataj/ */ 158 dataj_t dataj; 159 160 /* pointers to input/output files */ 161 FILE *input_fp = NULL; 162 163 /* Input file name */ 164 char infile[81] = ""; 165 166 /* common /fpat/ */ 167 fpat_t fpat; 168 169 /*common /ggrid/ */ 170 ggrid_t ggrid; 171 172 /* common /gnd/ */ 173 gnd_t gnd; 174 175 /* common /gwav/ */ 176 gwav_t gwav; 177 178 /* common /incom/ */ 179 incom_t incom; 180 181 /* common /matpar/ */ 182 matpar_t matpar; 183 184 /* common /netcx/ */ 185 netcx_t netcx; 186 187 /* common /save/ */ 188 save_t save; 189 190 /* common /segj/ */ 191 segj_t segj; 192 193 /* common /smat/ */ 194 smat_t smat; 195 196 /* common /vsorc/ */ 197 vsorc_t vsorc; 198 199 /* common /zload/ */ 200 zload_t zload; 201 202 /*------------------------------------------------------------------------*/ 203 204