File: | zaeroGraphical.c |
Warning: | line 68, column 3 Value stored to 'status' is never read |
Press '?' to see keyboard shortcuts
Keyboard shortcuts:
1 | #include <string.h> |
2 | |
3 | #include "aimUtil.h" |
4 | #include "miscUtils.h" |
5 | #include "jsonUtils.h" |
6 | #include "zaeroUtils.h" |
7 | #include "zaeroCards.h" |
8 | #include "zaeroGraphical.h" |
9 | |
10 | |
11 | int zaero_textFileGenerationAero(void *aimInfo, |
12 | FILE *fp, |
13 | const char *jsonDict, |
14 | /*@unused@*/ const zaeroProblemStruct *zaeroProblem, |
15 | const feaFileTypeEnum formatType, |
16 | int *setID) |
17 | { |
18 | int status; |
19 | int i; |
20 | |
21 | int numFilenames=0, numForms=0; |
22 | char **filenames = NULL((void*)0), **forms = NULL((void*)0); |
23 | |
24 | // make sure jsonDict is json string |
25 | if (!json_isDict(jsonDict)) { |
26 | AIM_ERROR(aimInfo, "Output Aero tuple value is expected to be a JSON dictionary string"){ aim_message(aimInfo, CERROR, 0 , "zaeroGraphical.c", 26, __func__ , "Output Aero tuple value is expected to be a JSON dictionary string" ); }; |
27 | return CAPS_BADVALUE-311; |
28 | } |
29 | |
30 | status = json_getStringDynamicArray(jsonDict, "filename", &numFilenames, &filenames); |
31 | if (status != CAPS_SUCCESS0) { |
32 | AIM_ERROR(aimInfo, "Output Aero tuple missing 'filename'"){ aim_message(aimInfo, CERROR, 0 , "zaeroGraphical.c", 32, __func__ , "Output Aero tuple missing 'filename'"); }; |
33 | return CAPS_BADVALUE-311; |
34 | } |
35 | AIM_NOTNULL(filenames, aimInfo, status){ if (filenames == ((void*)0)) { status = -307; aim_status(aimInfo , status, "zaeroGraphical.c", 35, __func__, 1, "%s == NULL!", "filenames"); goto cleanup; } }; |
36 | |
37 | status = json_getStringDynamicArray(jsonDict, "form", &numForms, &forms); |
38 | if (status != CAPS_SUCCESS0) { |
39 | AIM_ERROR(aimInfo, "Output Aero tuple missing 'form'"){ aim_message(aimInfo, CERROR, 0 , "zaeroGraphical.c", 39, __func__ , "Output Aero tuple missing 'form'"); }; |
40 | return CAPS_BADVALUE-311; |
41 | } |
42 | AIM_NOTNULL(forms, aimInfo, status){ if (forms == ((void*)0)) { status = -307; aim_status(aimInfo , status, "zaeroGraphical.c", 42, __func__, 1, "%s == NULL!", "forms"); goto cleanup; } }; |
43 | |
44 | if (!zaero_allEqual(Integer, &numFilenames, &numForms, NULL((void*)0))) { |
45 | AIM_ERROR(aimInfo, "Error in Output Aero input, not all values have same length."){ aim_message(aimInfo, CERROR, 0 , "zaeroGraphical.c", 45, __func__ , "Error in Output Aero input, not all values have same length." ); }; |
46 | return CAPS_BADVALUE-311; |
47 | } |
48 | |
49 | for (i = 0; i < numFilenames; i++) { |
50 | |
51 | (*setID)++; |
52 | |
53 | status = zaero_card_pltaero( |
54 | aimInfo, |
55 | fp, |
56 | (*setID), // setid |
57 | "YES", // femgrid, TODO: hardcoded |
58 | 0, // offset, TODO: hardcoded |
59 | forms[i], // form |
60 | filenames[i], // filenm |
61 | "NO", // cell, TODO: hardcoded |
62 | "NO", // vct, TODO: hardcoded |
63 | formatType |
64 | ); |
65 | AIM_STATUS(aimInfo, status)if (status != 0) { aim_status(aimInfo, status, "zaeroGraphical.c" , 65, __func__, 0); goto cleanup; }; |
66 | } |
67 | |
68 | status = CAPS_SUCCESS0; |
Value stored to 'status' is never read | |
69 | cleanup: |
70 | string_freeArray(numFilenames, &filenames); |
71 | string_freeArray(numForms, &forms); |
72 | |
73 | return CAPS_SUCCESS0; |
74 | } |
75 | |
76 | int zaero_textFileGenerationFlutter(void *aimInfo, |
77 | FILE *fp, |
78 | const char *jsonDict, |
79 | const zaeroProblemStruct *zaeroProblem, |
80 | const feaFileTypeEnum formatType, |
81 | int *setID) |
82 | { |
83 | int status; |
84 | int i; |
85 | |
86 | int flutterID; |
87 | int numAnalysis, numModes, numFilenames, numAeronames, numForms; |
88 | int *modes; |
89 | char **analysis = NULL((void*)0), **filenames = NULL((void*)0), **aeronames, **forms = NULL((void*)0); |
90 | zaeroSubcaseStruct *subcase; |
91 | |
92 | // make sure jsonDict is json string |
93 | if (!json_isDict(jsonDict)) { |
94 | AIM_ERROR(aimInfo, "Output Flutter tuple value is expected to be a JSON dictionary string\n"){ aim_message(aimInfo, CERROR, 0 , "zaeroGraphical.c", 94, __func__ , "Output Flutter tuple value is expected to be a JSON dictionary string\n" ); }; |
95 | return CAPS_BADVALUE-311; |
96 | } |
97 | |
98 | status = json_getStringDynamicArray(jsonDict, "analysis", &numAnalysis, &analysis); |
99 | if (status != CAPS_SUCCESS0) { |
100 | // TODO: is it required? |
101 | } |
102 | |
103 | status = json_getIntegerDynamicArray(jsonDict, "mode", &numModes, &modes); |
104 | if (status != CAPS_SUCCESS0) { |
105 | // TODO: is it required? |
106 | } |
107 | |
108 | status = json_getStringDynamicArray(jsonDict, "filename", &numFilenames, &filenames); |
109 | if (status != CAPS_SUCCESS0) { |
110 | // TODO: is it required? |
111 | } |
112 | |
113 | status = json_getStringDynamicArray(jsonDict, "form", &numForms, &forms); |
114 | if (status != CAPS_SUCCESS0) { |
115 | numForms = numAnalysis; |
116 | zaero_setBlankStringArray(numForms, &forms); |
117 | } |
118 | |
119 | status = json_getStringDynamicArray(jsonDict, "aeroname", &numAeronames, &aeronames); |
120 | if (status != CAPS_SUCCESS0) { |
121 | numAeronames = numAnalysis; |
122 | zaero_setBlankStringArray(numAeronames, &aeronames); |
123 | } |
124 | |
125 | if (!zaero_allEqual(Integer, &numFilenames, &numAeronames, &numForms, &numAnalysis, NULL((void*)0))) { |
126 | AIM_ERROR(aimInfo, "Error in Output Flutter input, not all values have same length.\n"){ aim_message(aimInfo, CERROR, 0 , "zaeroGraphical.c", 126, __func__ , "Error in Output Flutter input, not all values have same length.\n" ); }; |
127 | return CAPS_BADVALUE-311; |
128 | } |
129 | |
130 | for (i = 0; i < numFilenames; i++) { |
131 | AIM_NOTNULL(analysis, aimInfo, status){ if (analysis == ((void*)0)) { status = -307; aim_status(aimInfo , status, "zaeroGraphical.c", 131, __func__, 1, "%s == NULL!" , "analysis"); goto cleanup; } }; |
132 | AIM_NOTNULL(forms, aimInfo, status){ if (forms == ((void*)0)) { status = -307; aim_status(aimInfo , status, "zaeroGraphical.c", 132, __func__, 1, "%s == NULL!" , "forms"); goto cleanup; } }; |
133 | AIM_NOTNULL(filenames, aimInfo, status){ if (filenames == ((void*)0)) { status = -307; aim_status(aimInfo , status, "zaeroGraphical.c", 133, __func__, 1, "%s == NULL!" , "filenames"); goto cleanup; } }; |
134 | |
135 | (*setID)++; |
136 | status = zaero_findSubcaseByName(aimInfo, analysis[i], zaeroProblem, &subcase); |
137 | AIM_STATUS(aimInfo, status)if (status != 0) { aim_status(aimInfo, status, "zaeroGraphical.c" , 137, __func__, 0); goto cleanup; }; |
138 | flutterID = subcase->analysisID; |
139 | // TODO: assert(subcase->analysisType == AerolasticFlutter); |
140 | |
141 | status = zaero_card_pltflut( |
142 | aimInfo, |
143 | fp, |
144 | (*setID), // setid |
145 | flutterID, // idflut |
146 | modes[i], // mode |
147 | 1, // ntime, TODO: hardcoded |
148 | 1.0, // maxdisp, TODO: hardcoded |
149 | forms[i], // form |
150 | filenames[i], // filenm |
151 | aeronames[i], // aeronm |
152 | formatType |
153 | ); |
154 | AIM_STATUS(aimInfo, status)if (status != 0) { aim_status(aimInfo, status, "zaeroGraphical.c" , 154, __func__, 0); goto cleanup; }; |
155 | } |
156 | |
157 | status = CAPS_SUCCESS0; |
158 | cleanup: |
159 | string_freeArray(numAnalysis, &analysis); |
160 | string_freeArray(numFilenames, &filenames); |
161 | string_freeArray(numAeronames, &aeronames); |
162 | string_freeArray(numForms, &forms); |
163 | AIM_FREE(modes){ EG_free(modes); modes = ((void*)0); }; |
164 | |
165 | return CAPS_SUCCESS0; |
166 | } |
167 | |
168 | int zaero_textFileGenerationMode(void *aimInfo, |
169 | FILE *fp, |
170 | const char *jsonDict, |
171 | /*@unused@*/ const zaeroProblemStruct *zaeroProblem, |
172 | const feaFileTypeEnum formatType, |
173 | int *setID) |
174 | { |
175 | int status; |
176 | int i; |
177 | |
178 | int numModes, numFilenames, numForms, numAeronames; |
179 | int *modes = NULL((void*)0); |
180 | char **filenames = NULL((void*)0), **forms = NULL((void*)0), **aeronames; |
181 | |
182 | // make sure jsonDict is json string |
183 | if (!json_isDict(jsonDict)) { |
184 | AIM_ERROR(aimInfo, "Output Mode tuple value is expected to be a JSON dictionary string\n"){ aim_message(aimInfo, CERROR, 0 , "zaeroGraphical.c", 184, __func__ , "Output Mode tuple value is expected to be a JSON dictionary string\n" ); }; |
185 | return CAPS_BADVALUE-311; |
186 | } |
187 | |
188 | status = json_getIntegerDynamicArray(jsonDict, "mode", &numModes, &modes); |
189 | if (status != CAPS_SUCCESS0) { |
190 | // TODO: is it required? |
191 | } |
192 | |
193 | status = json_getStringDynamicArray(jsonDict, "filename", &numFilenames, &filenames); |
194 | if (status != CAPS_SUCCESS0) { |
195 | // TODO: is it required? |
196 | } |
197 | |
198 | status = json_getStringDynamicArray(jsonDict, "form", &numForms, &forms); |
199 | if (status != CAPS_SUCCESS0) { |
200 | numForms = numModes; |
201 | zaero_setBlankStringArray(numForms, &forms); |
202 | } |
203 | |
204 | status = json_getStringDynamicArray(jsonDict, "aeroname", &numAeronames, &aeronames); |
205 | if (status != CAPS_SUCCESS0) { |
206 | numAeronames = numModes; |
207 | zaero_setBlankStringArray(numAeronames, &aeronames); |
208 | } |
209 | |
210 | if (!zaero_allEqual(Integer, &numFilenames, &numForms, &numModes, &numAeronames, NULL((void*)0))) { |
211 | AIM_ERROR(aimInfo, "Error in Output Mode input, not all values have same length.\n"){ aim_message(aimInfo, CERROR, 0 , "zaeroGraphical.c", 211, __func__ , "Error in Output Mode input, not all values have same length.\n" ); }; |
212 | return CAPS_BADVALUE-311; |
213 | } |
214 | |
215 | for (i = 0; i < numFilenames; i++) { |
216 | AIM_NOTNULL(modes, aimInfo, status){ if (modes == ((void*)0)) { status = -307; aim_status(aimInfo , status, "zaeroGraphical.c", 216, __func__, 1, "%s == NULL!" , "modes"); goto cleanup; } }; |
217 | AIM_NOTNULL(forms, aimInfo, status){ if (forms == ((void*)0)) { status = -307; aim_status(aimInfo , status, "zaeroGraphical.c", 217, __func__, 1, "%s == NULL!" , "forms"); goto cleanup; } }; |
218 | AIM_NOTNULL(filenames, aimInfo, status){ if (filenames == ((void*)0)) { status = -307; aim_status(aimInfo , status, "zaeroGraphical.c", 218, __func__, 1, "%s == NULL!" , "filenames"); goto cleanup; } }; |
219 | |
220 | (*setID)++; |
221 | |
222 | status = zaero_card_pltmode( |
223 | aimInfo, |
224 | fp, |
225 | (*setID), // setid |
226 | "SYM", // sym, TODO: hardcoded |
227 | modes[i], // mode |
228 | 1.0, // maxdisp, TODO: hardcoded |
229 | forms[i], // form |
230 | filenames[i], // filenm |
231 | aeronames[i], // aeronm |
232 | formatType |
233 | ); |
234 | AIM_STATUS(aimInfo, status)if (status != 0) { aim_status(aimInfo, status, "zaeroGraphical.c" , 234, __func__, 0); goto cleanup; }; |
235 | } |
236 | |
237 | cleanup: |
238 | string_freeArray(numFilenames, &filenames); |
239 | string_freeArray(numAeronames, &aeronames); |
240 | string_freeArray(numForms, &forms); |
241 | AIM_FREE(modes){ EG_free(modes); modes = ((void*)0); }; |
242 | |
243 | return status; |
244 | } |
245 | |
246 | int zaero_textFileGenerationTrim(void *aimInfo, |
247 | FILE *fp, |
248 | const char *jsonDict, |
249 | const zaeroProblemStruct *zaeroProblem, |
250 | const feaFileTypeEnum formatType, |
251 | int *setID) |
252 | { |
253 | int status; |
254 | int i; |
255 | |
256 | int trimID; |
257 | int numAnalysis, numFlexs, numTypes, numFilenames, numForms, numScales, numAeronames; |
258 | double *scales = NULL((void*)0); |
259 | char **analysis, **filenames = NULL((void*)0), **flexs = NULL((void*)0), **types = NULL((void*)0), |
260 | **forms = NULL((void*)0), **aeronames = NULL((void*)0); |
261 | zaeroSubcaseStruct *subcase; |
262 | |
263 | // make sure jsonDict is json string |
264 | if (!json_isDict(jsonDict)) { |
265 | AIM_ERROR(aimInfo, "Output Trim tuple value is expected to be a JSON dictionary string\n"){ aim_message(aimInfo, CERROR, 0 , "zaeroGraphical.c", 265, __func__ , "Output Trim tuple value is expected to be a JSON dictionary string\n" ); }; |
266 | return CAPS_BADVALUE-311; |
267 | } |
268 | |
269 | status = json_getStringDynamicArray(jsonDict, "analysis", &numAnalysis, &analysis); |
270 | if (status != CAPS_SUCCESS0) { |
271 | // TODO: is it required? |
272 | } |
273 | |
274 | status = json_getStringDynamicArray(jsonDict, "flex", &numFlexs, &flexs); |
275 | if (status != CAPS_SUCCESS0) { |
276 | numFlexs = numAnalysis; |
277 | zaero_setBlankStringArray(numFlexs, &flexs); |
278 | } |
279 | |
280 | status = json_getStringDynamicArray(jsonDict, "type", &numTypes, &types); |
281 | if (status != CAPS_SUCCESS0) { |
282 | AIM_ERROR(aimInfo, "Output Trim \"type\" value is required\n"){ aim_message(aimInfo, CERROR, 0 , "zaeroGraphical.c", 282, __func__ , "Output Trim \"type\" value is required\n"); }; |
283 | return status; |
284 | } |
285 | |
286 | status = json_getStringDynamicArray(jsonDict, "form", &numForms, &forms); |
287 | if (status != CAPS_SUCCESS0) { |
288 | numForms = numAnalysis; |
289 | zaero_setBlankStringArray(numForms, &forms); |
290 | } |
291 | |
292 | status = json_getStringDynamicArray(jsonDict, "filename", &numFilenames, &filenames); |
293 | if (status != CAPS_SUCCESS0) { |
294 | AIM_ERROR(aimInfo, "Output Trim \"filename\" value is required\n"){ aim_message(aimInfo, CERROR, 0 , "zaeroGraphical.c", 294, __func__ , "Output Trim \"filename\" value is required\n"); }; |
295 | return status; |
296 | } |
297 | |
298 | status = json_getDoubleDynamicArray(jsonDict, "scale", &numScales, &scales); |
299 | if (status != CAPS_SUCCESS0) { |
300 | numScales = numAnalysis; |
301 | zaero_setBlankRealArray(numScales, &scales); |
302 | } |
303 | |
304 | status = json_getStringDynamicArray(jsonDict, "aeroname", &numAeronames, &aeronames); |
305 | if (status != CAPS_SUCCESS0) { |
306 | numAeronames = numAnalysis; |
307 | zaero_setBlankStringArray(numAeronames, &aeronames); |
308 | } |
309 | |
310 | if (!zaero_allEqual(Integer, &numAnalysis, &numScales, &numFilenames, |
311 | &numForms, &numFlexs, &numTypes, &numAeronames, NULL((void*)0))) { |
312 | AIM_ERROR(aimInfo, "Error in Output Trim input, not all values have same length.\n"){ aim_message(aimInfo, CERROR, 0 , "zaeroGraphical.c", 312, __func__ , "Error in Output Trim input, not all values have same length.\n" ); }; |
313 | return CAPS_BADVALUE-311; |
314 | } |
315 | |
316 | for (i = 0; i < numFilenames; i++) { |
317 | AIM_NOTNULL(flexs, aimInfo, status){ if (flexs == ((void*)0)) { status = -307; aim_status(aimInfo , status, "zaeroGraphical.c", 317, __func__, 1, "%s == NULL!" , "flexs"); goto cleanup; } }; |
318 | AIM_NOTNULL(types, aimInfo, status){ if (types == ((void*)0)) { status = -307; aim_status(aimInfo , status, "zaeroGraphical.c", 318, __func__, 1, "%s == NULL!" , "types"); goto cleanup; } }; |
319 | AIM_NOTNULL(forms, aimInfo, status){ if (forms == ((void*)0)) { status = -307; aim_status(aimInfo , status, "zaeroGraphical.c", 319, __func__, 1, "%s == NULL!" , "forms"); goto cleanup; } }; |
320 | AIM_NOTNULL(filenames, aimInfo, status){ if (filenames == ((void*)0)) { status = -307; aim_status(aimInfo , status, "zaeroGraphical.c", 320, __func__, 1, "%s == NULL!" , "filenames"); goto cleanup; } }; |
321 | AIM_NOTNULL(scales, aimInfo, status){ if (scales == ((void*)0)) { status = -307; aim_status(aimInfo , status, "zaeroGraphical.c", 321, __func__, 1, "%s == NULL!" , "scales"); goto cleanup; } }; |
322 | AIM_NOTNULL(aeronames, aimInfo, status){ if (aeronames == ((void*)0)) { status = -307; aim_status(aimInfo , status, "zaeroGraphical.c", 322, __func__, 1, "%s == NULL!" , "aeronames"); goto cleanup; } }; |
323 | |
324 | (*setID)++; |
325 | status = zaero_findSubcaseByName(aimInfo, analysis[i], zaeroProblem, &subcase); |
326 | AIM_STATUS(aimInfo, status)if (status != 0) { aim_status(aimInfo, status, "zaeroGraphical.c" , 326, __func__, 0); goto cleanup; }; |
327 | trimID = subcase->analysisID; |
328 | // TODO: assert(subcase->analysisType == AerolasticFlutter); |
329 | |
330 | status = zaero_card_plttrim( |
331 | aimInfo, |
332 | fp, |
333 | (*setID), // setid |
334 | trimID, // idtrim |
335 | flexs[i], // flex |
336 | types[i], // type |
337 | forms[i], // form |
338 | filenames[i], // filenm |
339 | scales[i], // scale |
340 | aeronames[i], // aeronm |
341 | formatType |
342 | ); |
343 | AIM_STATUS(aimInfo, status)if (status != 0) { aim_status(aimInfo, status, "zaeroGraphical.c" , 343, __func__, 0); goto cleanup; }; |
344 | |
345 | } |
346 | |
347 | status = CAPS_SUCCESS0; |
348 | cleanup: |
349 | string_freeArray(numFlexs, &flexs); |
350 | string_freeArray(numTypes, &types); |
351 | string_freeArray(numForms, &forms); |
352 | string_freeArray(numFilenames, &filenames); |
353 | string_freeArray(numAeronames, &aeronames); |
354 | AIM_FREE(scales){ EG_free(scales); scales = ((void*)0); }; |
355 | // if (aeronames != NULL) EG_free(aeronames); // blank strings are NULL pointers |
356 | |
357 | return status; |
358 | } |
359 | |
360 | int zaero_textFileGenerationVG(void *aimInfo, |
361 | FILE *fp, |
362 | const char *jsonDict, |
363 | const zaeroProblemStruct *zaeroProblem, |
364 | const feaFileTypeEnum formatType, |
365 | int *setID) |
366 | { |
367 | int status; |
368 | int i; |
369 | |
370 | int flutterID; |
371 | int numAnalysis, numFilenames, numForms, numXAxis; |
372 | char **analysis = NULL((void*)0), **filenames = NULL((void*)0), **forms = NULL((void*)0), **xAxis = NULL((void*)0); |
373 | zaeroSubcaseStruct *subcase; |
374 | |
375 | // make sure jsonDict is json string |
376 | if (!json_isDict(jsonDict)) { |
377 | AIM_ERROR(aimInfo, "Output VG tuple value is expected "{ aim_message(aimInfo, CERROR, 0 , "zaeroGraphical.c", 378, __func__ , "Output VG tuple value is expected " "to be a JSON dictionary string\n" ); } |
378 | "to be a JSON dictionary string\n"){ aim_message(aimInfo, CERROR, 0 , "zaeroGraphical.c", 378, __func__ , "Output VG tuple value is expected " "to be a JSON dictionary string\n" ); }; |
379 | return CAPS_BADVALUE-311; |
380 | } |
381 | |
382 | status = json_getStringDynamicArray(jsonDict, "analysis", &numAnalysis, &analysis); |
383 | if (status != CAPS_SUCCESS0) { |
384 | // TODO: is it required? |
385 | } |
386 | |
387 | status = json_getStringDynamicArray(jsonDict, "filename", &numFilenames, &filenames); |
388 | if (status != CAPS_SUCCESS0) { |
389 | // TODO: is it required? |
390 | } |
391 | |
392 | status = json_getStringDynamicArray(jsonDict, "form", &numForms, &forms); |
393 | if (status != CAPS_SUCCESS0) { |
394 | numForms = numAnalysis; |
395 | zaero_setBlankStringArray(numForms, &forms); |
396 | } |
397 | |
398 | status = json_getStringDynamicArray(jsonDict, "xAxis", &numXAxis, &xAxis); |
399 | if (status != CAPS_SUCCESS0) { |
400 | // TODO: is it required? |
401 | } |
402 | |
403 | if (!zaero_allEqual(Integer, &numFilenames, &numForms, |
404 | &numAnalysis, &numXAxis, NULL((void*)0))) { |
405 | AIM_ERROR(aimInfo, "Error in Output VG input, not all values have same length.\n"){ aim_message(aimInfo, CERROR, 0 , "zaeroGraphical.c", 405, __func__ , "Error in Output VG input, not all values have same length.\n" ); }; |
406 | return CAPS_BADVALUE-311; |
407 | } |
408 | |
409 | for (i = 0; i < numFilenames; i++) { |
410 | AIM_NOTNULL(analysis, aimInfo, status){ if (analysis == ((void*)0)) { status = -307; aim_status(aimInfo , status, "zaeroGraphical.c", 410, __func__, 1, "%s == NULL!" , "analysis"); goto cleanup; } }; |
411 | AIM_NOTNULL(xAxis, aimInfo, status){ if (xAxis == ((void*)0)) { status = -307; aim_status(aimInfo , status, "zaeroGraphical.c", 411, __func__, 1, "%s == NULL!" , "xAxis"); goto cleanup; } }; |
412 | AIM_NOTNULL(forms, aimInfo, status){ if (forms == ((void*)0)) { status = -307; aim_status(aimInfo , status, "zaeroGraphical.c", 412, __func__, 1, "%s == NULL!" , "forms"); goto cleanup; } }; |
413 | AIM_NOTNULL(filenames, aimInfo, status){ if (filenames == ((void*)0)) { status = -307; aim_status(aimInfo , status, "zaeroGraphical.c", 413, __func__, 1, "%s == NULL!" , "filenames"); goto cleanup; } }; |
414 | |
415 | (*setID)++; |
416 | status = zaero_findSubcaseByName(aimInfo, analysis[i], zaeroProblem, &subcase); |
417 | AIM_STATUS(aimInfo, status)if (status != 0) { aim_status(aimInfo, status, "zaeroGraphical.c" , 417, __func__, 0); goto cleanup; }; |
418 | flutterID = subcase->analysisID; |
419 | // TODO: assert(subcase->analysisType == AerolasticFlutter); |
420 | |
421 | status = zaero_card_pltvg( |
422 | aimInfo, |
423 | fp, |
424 | (*setID), // setid |
425 | flutterID, // idflut |
426 | -1, // nmode (blank), TODO: hardcoded |
427 | xAxis[i], // ntime |
428 | forms[i], // form |
429 | filenames[i], // filenm |
430 | -1.0, // refrho (blank), TODO: hardcoded |
431 | formatType |
432 | ); |
433 | AIM_STATUS(aimInfo, status)if (status != 0) { aim_status(aimInfo, status, "zaeroGraphical.c" , 433, __func__, 0); goto cleanup; }; |
434 | } |
435 | |
436 | status = CAPS_SUCCESS0; |
437 | cleanup: |
438 | string_freeArray(numAnalysis, &analysis); |
439 | string_freeArray(numFilenames, &filenames); |
440 | string_freeArray(numXAxis, &xAxis); |
441 | string_freeArray(numForms, &forms); |
442 | |
443 | return status; |
444 | } |