Skip to content

Commit

Permalink
FIX: Fixed lambda typo, removed remaining enforce_dc_and_causality re…
Browse files Browse the repository at this point in the history
…fs (#437)
  • Loading branch information
drewm102 authored Oct 14, 2024
1 parent e3568dd commit 0c478fe
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 26 deletions.
22 changes: 11 additions & 11 deletions src/ansys/edb/core/simulation_setup/simulation_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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))


Expand Down
4 changes: 0 additions & 4 deletions src/ansys/edb/core/simulation_setup/simulation_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
),
Expand Down
23 changes: 12 additions & 11 deletions tests/e2e/scratch/sim_setup_scratch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 0c478fe

Please sign in to comment.