From 0c478fe3783e528381bb019cd43f955c4c069ddb Mon Sep 17 00:00:00 2001 From: drewm102 <103221973+drewm102@users.noreply.github.com> Date: Mon, 14 Oct 2024 11:53:23 -0600 Subject: [PATCH] FIX: Fixed lambda typo, removed remaining enforce_dc_and_causality refs (#437) --- .../simulation_setup/simulation_settings.py | 22 +++++++++--------- .../core/simulation_setup/simulation_setup.py | 4 ---- tests/e2e/scratch/sim_setup_scratch.py | 23 ++++++++++--------- 3 files changed, 23 insertions(+), 26 deletions(-) diff --git a/src/ansys/edb/core/simulation_setup/simulation_settings.py b/src/ansys/edb/core/simulation_setup/simulation_settings.py index 7dcff5309d..83faad67ac 100644 --- a/src/ansys/edb/core/simulation_setup/simulation_settings.py +++ b/src/ansys/edb/core/simulation_setup/simulation_settings.py @@ -69,22 +69,22 @@ class SettingsOptions(SimulationSettingsBase): __stub: SettingsOptionsServiceStub = StubAccessor(StubType.sim_settings_options) @property - def do_lamda_refine(self): + def do_lambda_refine(self): """:obj:`bool`: Flag indicating if lambda refinement is used during meshing.""" return self.__stub.GetDoLamdaRefineFlag(self.msg).value - @do_lamda_refine.setter - def do_lamda_refine(self, do_lamda_refine): - self.__stub.SetDoLamdaRefineFlag(messages.bool_property_message(self, do_lamda_refine)) + @do_lambda_refine.setter + def do_lambda_refine(self, do_lambda_refine): + self.__stub.SetDoLamdaRefineFlag(messages.bool_property_message(self, do_lambda_refine)) @property - def lamda_target(self): + def lambda_target(self): """:obj:`float`: Target lambda value for lambda refinement.""" return self.__stub.GetLamdaTarget(self.msg).value - @lamda_target.setter - def lamda_target(self, lamda_target): - self.__stub.SetLamdaTarget(messages.double_property_message(self, lamda_target)) + @lambda_target.setter + def lambda_target(self, lambda_target): + self.__stub.SetLamdaTarget(messages.double_property_message(self, lambda_target)) @property def mesh_size_factor(self): @@ -96,12 +96,12 @@ def mesh_size_factor(self, mesh_size_factor): self.__stub.SetMeshSizefactor(messages.double_property_message(self, mesh_size_factor)) @property - def use_default_lamda_value(self): + def use_default_lambda_value(self): """:obj:`bool`: Flag indicating if the default lambda target value is used.""" return self.__stub.GetLamdaTarget(self.msg).value - @use_default_lamda_value.setter - def use_default_lamda_value(self, use_default_value): + @use_default_lambda_value.setter + def use_default_lambda_value(self, use_default_value): self.__stub.SetDoLamdaRefineFlag(messages.bool_property_message(self, use_default_value)) diff --git a/src/ansys/edb/core/simulation_setup/simulation_setup.py b/src/ansys/edb/core/simulation_setup/simulation_setup.py index 8fc4a62cdc..9a2221ff88 100644 --- a/src/ansys/edb/core/simulation_setup/simulation_setup.py +++ b/src/ansys/edb/core/simulation_setup/simulation_setup.py @@ -86,8 +86,6 @@ class InterpolatingSweepData: Use fast sweep. adaptive_sampling : bool Use adaptive sampling. - enforce_dc_and_causality : bool - Enforce dc point and causality. matrix_conv_entry_list : list[MatrixConvergenceDataEntry] Matrix convergence data for frequency sweep. min_subranges : int @@ -109,7 +107,6 @@ def __init__(self): self.use_full_basis = True self.fast_sweep = False self.adaptive_sampling = False - self.enforce_dc_and_causality = False self.matrix_conv_entry_list = [] self.min_subranges = 1 self.min_solutions = 0 @@ -261,7 +258,6 @@ def _interpolating_sweep_data_msg(interp_sweep_data): interp_use_full_basis=interp_sweep_data.use_full_basis, fast_sweep=interp_sweep_data.fast_sweep, adaptive_sampling=interp_sweep_data.adaptive_sampling, - enforce_dc_and_causality=interp_sweep_data.enforce_dc_and_causality, matrix_conv_entry_list=messages.mx_convergence_entry_msg_list( interp_sweep_data.matrix_conv_entry_list ), diff --git a/tests/e2e/scratch/sim_setup_scratch.py b/tests/e2e/scratch/sim_setup_scratch.py index 7cf6b9f485..51772e6f44 100644 --- a/tests/e2e/scratch/sim_setup_scratch.py +++ b/tests/e2e/scratch/sim_setup_scratch.py @@ -237,17 +237,16 @@ def do_dcr_test(settings: HFSSDCRSettings): def do_options_test(settings: HFSSSettingsOptions): - og_do_lamda_refine = settings.do_lamda_refine - settings.do_lamda_refine = not og_do_lamda_refine - new_do_lamda_refine = settings.do_lamda_refine + og_do_lamda_refine = settings.do_lambda_refine + settings.do_lambda_refine = not og_do_lamda_refine + new_do_lamda_refine = settings.do_lambda_refine - og_lamda_target = settings.lamda_target - settings.lamda_target = og_lamda_target + 0.75 - new_lamda_target = settings.lamda_target - - og_use_default_lamda_value = settings.use_default_lamda_value - settings.use_default_lamda_value = not og_use_default_lamda_value - new_use_default_lamda_value = settings.use_default_lamda_value + og_lamda_target = settings.lambda_target + settings.lambda_target = og_lamda_target + 0.75 + new_lamda_target = settings.lambda_target + og_use_default_lamda_value = settings.use_default_lambda_value + settings.use_default_lambda_value = not og_use_default_lamda_value + new_use_default_lamda_value = settings.use_default_lambda_value og_max_refinement_per_pass = settings.max_refinement_per_pass settings.max_refinement_per_pass = og_max_refinement_per_pass + 1 @@ -308,7 +307,9 @@ def do_hfss_sim_settings_test(settings: HFSSSimulationSettings): def do_test(): - db = Database.create("test.aedb") + test_db_path = "test.aedb" + Database.delete(test_db_path) + db = Database.create(test_db_path) test_cell = Cell.create(db, CellType.CIRCUIT_CELL, "test_cell") hfss_sim_setup = HfssSimulationSetup.create(test_cell, "test_sim_setup")