Skip to content

Commit f741dce

Browse files
gmalinveMaxJPRey
andauthored
Implement HFSS SetSolveInsideThreshold (#1356)
* Implement HFSS SetSolveInsideThreshold * fix docstring * Update pyaedt/hfss.py Co-authored-by: Maxime Rey <[email protected]> Co-authored-by: Maxime Rey <[email protected]>
1 parent a8fbedf commit f741dce

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

_unittest/test_20_HFSS.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import os
22

3-
from conftest import config
3+
from _unittest.conftest import config
44

55
try:
66
import pytest
@@ -980,3 +980,10 @@ def test_51_array(self):
980980
dict_in["cells"][(3, 3)]["rotation"] = 90
981981
assert self.aedtapp.add_3d_component_array_from_json(dict_in)
982982
pass
983+
984+
def test_52_set_material_threshold(self):
985+
assert self.aedtapp.set_material_threshold()
986+
threshold = 123123123
987+
assert self.aedtapp.set_material_threshold(threshold)
988+
assert self.aedtapp.set_material_threshold(str(threshold))
989+
assert not self.aedtapp.set_material_threshold("e")

pyaedt/hfss.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5224,3 +5224,24 @@ def get_antenna_ffd_solution_data(
52245224
overwrite=overwrite,
52255225
taper=taper,
52265226
)
5227+
5228+
@pyaedt_function_handler()
5229+
def set_material_threshold(self, threshold=100000):
5230+
"""Set material conductivity threshold.
5231+
5232+
Parameters
5233+
----------
5234+
threshold : float, optional
5235+
Conductivity threshold.
5236+
The default value is 100000.
5237+
5238+
Returns
5239+
-------
5240+
bool
5241+
``True`` when successful, ``False`` when failed.
5242+
"""
5243+
try:
5244+
self.odesign.SetSolveInsideThreshold(threshold)
5245+
return True
5246+
except:
5247+
return False

0 commit comments

Comments
 (0)