Commit e50c65a
committed
fix: Fix five bugs based on reviewer feedback
Fixed three critical division by zero bugs and two moderate bugs:
1. Wall model convergence - zero-check before division
2. Wall model Gamma - protect against very small Gamma (use 1.0E-16 threshold)
3. Radiation emissivity - throw error if outside [0,1] range
4. Restart metadata - correct ITER= offset 9->5
5. Filename buffer - replace strcpy with strncpy
Changes based on reviewer feedback:
- CRadP1Solver.cpp: Error instead of silent clamp for invalid emissivity
- wall_model.cpp: Fixed Gamma logic (always negative, exp_term=0 for small |Gamma|)
Improves solver stability, correctness, and security.
Signed-off-by: shbhmexe <[email protected]>File tree
2 files changed
+20
-33
lines changed- Common/src
- SU2_CFD/src/solvers
2 files changed
+20
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
397 | | - | |
398 | | - | |
399 | | - | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
400 | 402 | | |
401 | | - | |
| 403 | + | |
402 | 404 | | |
403 | 405 | | |
404 | | - | |
405 | | - | |
| 406 | + | |
| 407 | + | |
406 | 408 | | |
407 | | - | |
| 409 | + | |
408 | 410 | | |
409 | | - | |
410 | | - | |
| 411 | + | |
411 | 412 | | |
412 | 413 | | |
413 | 414 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
291 | 288 | | |
292 | 289 | | |
293 | 290 | | |
294 | 291 | | |
295 | 292 | | |
296 | | - | |
| 293 | + | |
297 | 294 | | |
298 | 295 | | |
299 | 296 | | |
| |||
364 | 361 | | |
365 | 362 | | |
366 | 363 | | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
373 | 367 | | |
374 | 368 | | |
375 | 369 | | |
| |||
446 | 440 | | |
447 | 441 | | |
448 | 442 | | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
456 | 446 | | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | 447 | | |
462 | 448 | | |
463 | 449 | | |
| |||
0 commit comments