diff --git a/_unittest/test_11_Setup.py b/_unittest/test_11_Setup.py index 9d767b52602..a80faa8e912 100644 --- a/_unittest/test_11_Setup.py +++ b/_unittest/test_11_Setup.py @@ -131,6 +131,9 @@ def test_25a_create_parametrics(self): assert setup1.add_variation("w2", "0.1mm", 10, 11) assert setup1.add_variation("w2", start_point="0.2mm", variation_type="SingleValue") assert setup1.add_variation("w1", start_point="0.3mm", end_point=5, step=0.2, variation_type="LinearStep") + assert setup1.add_variation("w1", start_point="0.3mm", end_point=5, step=1, variation_type="DecadeCount") + assert setup1.add_variation("w1", start_point="0.3mm", end_point=5, step=1, variation_type="OctaveCount") + assert setup1.add_variation("w1", start_point="0.3mm", end_point=5, step=1, variation_type="ExponentialCount") assert setup1.add_calculation( calculation="dB(S(1,1))", ranges={"Freq": "3.5GHz"}, solution="My_HFSS_Setup : LastAdaptive" ) diff --git a/pyaedt/modules/DesignXPloration.py b/pyaedt/modules/DesignXPloration.py index 3dc5ca7df02..3eb3d702a44 100644 --- a/pyaedt/modules/DesignXPloration.py +++ b/pyaedt/modules/DesignXPloration.py @@ -894,7 +894,8 @@ def add_variation(self, sweep_var, start_point, end_point=None, step=100, unit=N unit : str, optional Variation units. Default is `None`. variation_type : float or int - Variation Type. Admitted values are `"LinearCount"`, `"LinearStep"`, `"LogScale"`, `"SingleValue"`. + Variation Type. Admitted values are `"SingleValue", `"LinearCount"`, `"LinearStep"`, + `"DecadeCount"`, `"OctaveCount"`, `"ExponentialCount"`. Returns ------- @@ -918,8 +919,12 @@ def add_variation(self, sweep_var, start_point, end_point=None, step=100, unit=N sweep_range = "LINC {} {} {}".format(start_point, end_point, step) elif variation_type == "LinearStep": sweep_range = "LIN {} {} {}".format(start_point, end_point, self._app.value_with_units(step, unit)) - elif variation_type == "LogScale": - sweep_range = "DEC {} {} {}".format(start_point, end_point, self._app.value_with_units(step, unit)) + elif variation_type == "DecadeCount": + sweep_range = "DEC {} {} {}".format(start_point, end_point, step) + elif variation_type == "OctaveCount": + sweep_range = "OCT {} {} {}".format(start_point, end_point, step) + elif variation_type == "ExponentialCount": + sweep_range = "ESTP {} {} {}".format(start_point, end_point, step) elif variation_type == "SingleValue": sweep_range = "{}".format(start_point) if not sweep_range: