diff --git a/funtofem/interface/fun3d_14_interface.py b/funtofem/interface/fun3d_14_interface.py index 7bd536f9..2a9fd060 100644 --- a/funtofem/interface/fun3d_14_interface.py +++ b/funtofem/interface/fun3d_14_interface.py @@ -314,9 +314,7 @@ def set_functions(self, scenario, bodies): """ # check if any aerodynamic functions - no_aerodynamic = not any( - [func.analysis_type == "aerodynamic" for func in scenario.functions] - ) + any_aerodynamic = any([func.analysis_type == "aerodynamic" for func in scenario.functions]) ct = 0 for function in scenario.functions: @@ -326,7 +324,8 @@ def set_functions(self, scenario, bodies): if function.analysis_type != "aerodynamic": start = 1 stop = 1 - if ct == 1 and scenario.early_stopping and no_aerodynamic: + + if ct == 1 and scenario.early_stopping and any_aerodynamic: raise AssertionError( "Need to register an aerodynamic function first otherwise the Adjoint early stopping criterion fails" )