Skip to content

Commit

Permalink
cleaner verbosity comments for L2
Browse files Browse the repository at this point in the history
  • Loading branch information
jkirk5 committed Dec 26, 2024
1 parent 8e5d288 commit c3e49af
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions aviary/interface/methods_for_level2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2090,20 +2090,20 @@ def add_driver(
driver.options["optimizer"] = optimizer
if use_coloring:
# define coloring options by verbosity
if verbosity <= Verbosity.VERBOSE: # if QUIET, BRIEF
if verbosity < Verbosity.VERBOSE: # QUIET, BRIEF
driver.declare_coloring(show_summary=False)
elif verbosity == Verbosity.DEBUG:
driver.declare_coloring(show_summary=True, show_sparsity=True)
else: # if VERBOSE
elif verbosity == Verbosity.VERBOSE:
driver.declare_coloring(show_summary=True)
else: # DEBUG
driver.declare_coloring(show_summary=True, show_sparsity=True)

if driver.options["optimizer"] == "SNOPT":
# Print Options #
if verbosity == Verbosity.QUIET:
isumm, iprint = 0, 0
elif verbosity == Verbosity.BRIEF:
isumm, iprint = 6, 0
elif verbosity > Verbosity.BRIEF:
elif verbosity > Verbosity.BRIEF: # VERBOSE, DEBUG
isumm, iprint = 6, 9
driver.opt_settings["iSumm"] = isumm
driver.opt_settings["iPrint"] = iprint
Expand Down Expand Up @@ -2152,11 +2152,11 @@ def add_driver(
if optimizer in ("SNOPT", "IPOPT"):
if verbosity == Verbosity.QUIET:
driver.options['print_results'] = False
elif verbosity < Verbosity.DEBUG:
elif verbosity < Verbosity.DEBUG: # QUIET, BRIEF, VERBOSE
driver.options['print_results'] = 'minimal'

# optimizer agnostic settings
if verbosity > Verbosity.QUIET:
if verbosity > Verbosity.QUIET: # BRIEF, VERBOSE, QUIET
if isinstance(verbosity, list):
driver.options['debug_print'] = ['desvars']
elif verbosity == Verbosity.DEBUG:
Expand Down

0 comments on commit c3e49af

Please sign in to comment.