Skip to content

Implement HFSS SetSolveInsideThreshold #1356

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

Merged
merged 3 commits into from
Jul 7, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
9 changes: 8 additions & 1 deletion _unittest/test_20_HFSS.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

from conftest import config
from _unittest.conftest import config

try:
import pytest
Expand Down Expand Up @@ -980,3 +980,10 @@ def test_51_array(self):
dict_in["cells"][(3, 3)]["rotation"] = 90
assert self.aedtapp.add_3d_component_array_from_json(dict_in)
pass

def test_52_set_material_threshold(self):
assert self.aedtapp.set_material_threshold()
threshold = 123123123
assert self.aedtapp.set_material_threshold(threshold)
assert self.aedtapp.set_material_threshold(str(threshold))
assert not self.aedtapp.set_material_threshold("e")
23 changes: 23 additions & 0 deletions pyaedt/hfss.py
Original file line number Diff line number Diff line change
Expand Up @@ -5224,3 +5224,26 @@ def get_antenna_ffd_solution_data(
overwrite=overwrite,
taper=taper,
)

@pyaedt_function_handler()
def set_material_threshold(self, threshold=None):
"""Set material threshold.

Parameters
----------
threshold : float, optional
Conductivity threshold.
If "None" default value is 100000.

Returns
-------
bool
``True`` when successful, ``False`` when failed.
"""
try:
if not threshold:
threshold = 100000
self.odesign.SetSolveInsideThreshold(threshold)
return True
except:
return False