Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce default Roughness nodule radius #3875

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions _unittest/test_09_VariableManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,8 @@ def test_32_delete_unused_variables(self):
self.aedtapp.modeler.create_rectangle(0, ["used_var", "used_var", "used_var"], [10, 20])
mat1 = self.aedtapp.materials.add_material("new_copper2")
mat1.permittivity = "$project_used_var"
assert self.aedtapp.variable_manager.is_used("used_var")
assert not self.aedtapp.variable_manager.is_used("unused_var")
assert self.aedtapp.variable_manager.delete_variable("unused_var")
self.aedtapp["unused_var"] = "1mm"
number_of_variables = len(self.aedtapp.variable_manager.variable_names)
Expand Down
26 changes: 24 additions & 2 deletions pyaedt/application/Variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import os
import re
import types
import warnings

from pyaedt import pyaedt_function_handler
from pyaedt.generic.constants import AEDT_UNITS
Expand Down Expand Up @@ -1237,7 +1238,7 @@
return False

@pyaedt_function_handler()
def is_used_variable(self, var_name):
def is_used(self, var_name):
"""Find if a variable is used.

Parameters
Expand Down Expand Up @@ -1268,6 +1269,27 @@
return used
return used

@pyaedt_function_handler()
def is_used_variable(self, var_name):
"""Find if a variable is used.

.. deprecated:: 0.7.4
Use :func:`is_used` method instead.

Parameters
----------
var_name : str
Name of the variable.

Returns
-------
bool
``True`` when successful, ``False`` when failed.

"""
warnings.warn("`is_used_variable` is deprecated. Use `is_used` method instead.", DeprecationWarning)
return self.is_used(var_name)

Check warning on line 1291 in pyaedt/application/Variables.py

View check run for this annotation

Codecov / codecov/patch

pyaedt/application/Variables.py#L1290-L1291

Added lines #L1290 - L1291 were not covered by tests

def _find_used_variable_history(self, history, var_name):
"""Find if a variable is used.

Expand Down Expand Up @@ -1307,7 +1329,7 @@
var_list = self.variable_names

for var in var_list[:]:
if not self.is_used_variable(var):
if not self.is_used(var):
self.delete_variable(var)
return True

Expand Down
6 changes: 3 additions & 3 deletions pyaedt/modules/LayerStackup.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ def __init__(self, app, layertype="signal", negative=False):
# Rough option
self._user = False
self._RMdl = "Huray"
self._NR = 0.5
self._NR = 0.0005
self._HRatio = 2.9
self._BRMdl = "Huray"
self._BNR = 0.5
self._BNR = 0.0005
self._BHRatio = 2.9
self._SRMdl = "Huray"
self._SNR = 0.5
self._SNR = 0.0005
self._SHRatio = 2.9
# Solver option
self._usp = False
Expand Down
Loading