Skip to content

Commit 9e5e052

Browse files
Fix any aerodynamic function check again (#296)
* Fix opt manager nan exit (#284) * fix bug in optimization manager * Update optimization_manager.py * Create a generalized mesh AIM. (#286) * Generalized mesh AIM * New notation in meshAIM * Update egads_aim.py * Update aflr_aim.py * Formatting * Update egads_aim.py * FUNtoFEM read and write unsteady aero loads files (#289) * working unsteady aero loads files * black reformat * FUN3D v14.0.2 interface stable release for thermal cases (#288) * fun3d 14.0 fun3d interface changes * add separate fun3d 14 and 13.0 interfaces * Update fun3d_14_interface.py name to Fun3d14Interface * update fun3d 14 interface unittests * update fun3d model * black reformat * update fun3d 14.0 thermal changes * update fun3d 14 interface with debug statements * new thermal fun3d test * add new fun3d thermal interface test * fun3d 14 thermal interface test complete * update the fun3d 14 thermal interface test * update the import statements * black reformat * black reformat with psf/black-stable * Apply suggestions from code review * undo debug changes * black reformat * Rollback test_fun3d_tacs.py to FUN3D 13.6 test * Update test_fun3d_tacs.py to add fun3d_project_name back in * black reformat --------- Co-authored-by: Brian Burke <[email protected]> * FUN3D 14.0 Coupling Frequency for Coupled Adjoint speedup + Early Stopping Fix (#291) * huge speedup in funtofem fully coupled adjoint solve * turn hanim off in turbulent beta nml * working adjoint derivatives and change adjoint_steps * working early stopping criterion in FUN3D 14.0.2 * add error check for first aero function w early stopping * input funtofem loose coupling frequency through the fun3d interface (no longer namelist input) * update nml for turbulent beta * black reformat + throw error if FUN3D 13.6 uses loose coupling frequency * Update funtofem/interface/fun3d_interface.py --------- Co-authored-by: Brian Burke <[email protected]> * commit ssw 14.0 example * egads aero mesh example * prototype ssw finite difference test * remove reload design file * update cfl in namelist * fix steps in namelist * update panel thickness script * add FD test for the derivatives * fix early stopping multi analysis bug * update ssw 14 fun3d nml * new aero loads for ssw case * oneway sizing opt * updated aerodynamic function fun3d check * black reformat * fix any aerodynamic again * fix any aerodynamic again --------- Co-authored-by: Brian Burke <[email protected]>
1 parent 8849767 commit 9e5e052

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

funtofem/interface/fun3d_14_interface.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,7 @@ def set_functions(self, scenario, bodies):
314314
"""
315315

316316
# check if any aerodynamic functions
317-
no_aerodynamic = not any(
318-
[func.analysis_type == "aerodynamic" for func in scenario.functions]
319-
)
317+
any_aerodynamic = any([func.analysis_type == "aerodynamic" for func in scenario.functions])
320318

321319
ct = 0
322320
for function in scenario.functions:
@@ -326,7 +324,8 @@ def set_functions(self, scenario, bodies):
326324
if function.analysis_type != "aerodynamic":
327325
start = 1
328326
stop = 1
329-
if ct == 1 and scenario.early_stopping and no_aerodynamic:
327+
328+
if ct == 1 and scenario.early_stopping and any_aerodynamic:
330329
raise AssertionError(
331330
"Need to register an aerodynamic function first otherwise the Adjoint early stopping criterion fails"
332331
)

0 commit comments

Comments
 (0)