From 32dfb1e2445567410a1bea16869d5cc1c65bbff2 Mon Sep 17 00:00:00 2001 From: sabakhshi Date: Wed, 14 Jan 2026 13:42:55 -0500 Subject: [PATCH 1/2] critical fixes for input dicts --- optvl/optvl_class.py | 4 ++-- optvl/utils/check_surface_dict.py | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/optvl/optvl_class.py b/optvl/optvl_class.py index fb97aba..169a90c 100644 --- a/optvl/optvl_class.py +++ b/optvl/optvl_class.py @@ -780,8 +780,8 @@ def check_type(key, avl_vars, given_val): "albe": True, "load": True, "clcd": np.zeros(6, dtype=np.float64), - "nspans": np.zeros(num_secs, dtype=int), - "sspaces": np.zeros(num_secs, dtype=int), + "nspans": np.zeros(num_secs, dtype=np.int32), + "sspaces": np.zeros(num_secs, dtype=np.float64), "clcdsec": np.zeros((num_secs,6)), "claf": np.ones(num_secs), } diff --git a/optvl/utils/check_surface_dict.py b/optvl/utils/check_surface_dict.py index 5784619..6746941 100755 --- a/optvl/utils/check_surface_dict.py +++ b/optvl/utils/check_surface_dict.py @@ -210,6 +210,14 @@ def pre_check_input_dict(input_dict: dict): # Verify at least two section if input_dict["surfaces"][surface]["num_sections"] < 2: raise RuntimeError("Must have at least two sections per surface!") + + # if no controls are specified then fill it in with 0s + if "num_controls" not in input_dict["surfaces"][surface].keys(): + input_dict["surfaces"][surface]["num_controls"] = np.zeros(input_dict["surfaces"][surface]["num_sections"],dtype=np.int32) + + # if no dvs are specified then fill it in with 0s + if "num_design_vars" not in input_dict["surfaces"][surface].keys(): + input_dict["surfaces"][surface]["num_design_vars"] = np.zeros(input_dict["surfaces"][surface]["num_sections"],dtype=np.int32) #Checks to see that at most only one of the options in af_load_ops or one of the options in manual_af_override is selected if len(airfoil_spec_keys & input_dict["surfaces"][surface].keys()) > 1: From bc82d619ebaf8ba488b15d16d7a33fcea875fb8e Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Wed, 14 Jan 2026 12:43:31 -0800 Subject: [PATCH 2/2] bump version --- meson.build | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 25c1c0a..1fd02e9 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ project( 'optvl', 'c', # don't forget to change the value in pyproject.toml - version: '2.2.1', + version: '2.2.2', license: 'GPL-3.0', meson_version: '>= 0.64.0', default_options: [ diff --git a/pyproject.toml b/pyproject.toml index c1ca329..35ae704 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ dependencies = [ "numpy>=1.19", ] readme = "README.md" -version = "2.2.1" # this automatically updates __init__.py and setup_deprecated.py +version = "2.2.2" # this automatically updates __init__.py and setup_deprecated.py # don't forget to change the value in meson.build!