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/optvl/optvl_class.py b/optvl/optvl_class.py index 8e94b5e..109b89b 100644 --- a/optvl/optvl_class.py +++ b/optvl/optvl_class.py @@ -794,8 +794,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: 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!