Skip to content

Commit

Permalink
Merge branch 'main' into chore/cleanup-code
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxJPRey authored Jul 30, 2024
2 parents f996468 + b0f022b commit 955c7f8
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 23 deletions.
24 changes: 1 addition & 23 deletions doc/source/Resources/pyaedt_installer_from_aedt.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,35 +75,13 @@ def run_pyinstaller_from_c_python(oDesktop):
if os.path.isdir(pyaedt_path):
break

# Create PyAEDT symbolic link in PersonalLib
personal_lib_dir = oDesktop.GetPersonalLibDirectory()
pers1 = os.path.join(personal_lib_dir, "pyaedt")

if os.path.exists(pers1):
if is_windows:
command = 'rmdir "{}"'.format(pers1)
else:
command = 'rm "{}"'.format(pers1)
ret_code = os.system(command)
if ret_code != 0:
oDesktop.AddMessage("", "", 2,
"Error occurred while removing the symbolic link to PyAEDT in 'PersonalLib'.")

if is_windows:
command = 'mklink /D "{}" "{}"'.format(pers1, pyaedt_path)
else:
command = 'ln -s "{}" "{}"'.format(pyaedt_path, pers1)
ret_code = os.system(command)
if ret_code != 0:
oDesktop.AddMessage("", "", 2, "Error occurred while configuring the symbolic link to PyAEDT in 'PersonalLib'.")

# Create Toolkits in PersonalLib
import tempfile
python_script = os.path.join(tempfile.gettempdir(), "configure_pyaedt.py")
if os.path.isfile(python_script):
os.remove(python_script)
with open(python_script, "w") as f:
# enable in debu mode
# enable in debug mode
# f.write("import sys\n")
# f.write('sys.path.insert(0, r"c:\\ansysdev\\git\\repos\\pyaedt")\n')
f.write("from pyaedt.workflows.installer.pyaedt_installer import add_pyaedt_to_aedt\n")
Expand Down
58 changes: 58 additions & 0 deletions pyaedt/misc/expression_catalog.toml
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,64 @@ operations = ["Fundamental_Quantity('E')",
dependent_expressions = []
report = ["Data Table", "Rectangular Plot"]

[h_field_minimum_x_position]
name = "HField_minimum_x_position"
description = "H field minimum X position"
design_type = ["HFSS", "Maxwell 3D"]
fields_type = ["Fields"]
solution_type = ""
primary_sweep = "Freq"
assignment = ""
assignment_type = ["Sheet", "Solid"]
operations = ["NameOfExpression('<Hx,Hy,Hz>')",
"Operation('Mag')",
"EnterSurface('assignment')",
"Operation('SurfaceValue')",
"Operation('MinPos')",
"Operation('ScalarX')",
]
dependent_expressions = []
report = ["Rectangular Plot"]

[h_field_minimum_y_position]
name = "HField_minimum_y_position"
description = "H field minimum Y position"
design_type = ["HFSS", "Maxwell 3D"]
fields_type = ["Fields"]
solution_type = ""
primary_sweep = "Freq"
assignment = ""
assignment_type = ["Sheet", "Solid"]
operations = ["NameOfExpression('<Hx,Hy,Hz>')",
"Operation('Mag')",
"EnterSurface('assignment')",
"Operation('SurfaceValue')",
"Operation('MinPos')",
"Operation('ScalarY')",
]
dependent_expressions = []
report = ["Rectangular Plot"]

[h_field_minimum_z_position]
name = "HField_minimum_z_position"
description = "H field minimum Z position"
design_type = ["HFSS", "Maxwell 3D"]
fields_type = ["Fields"]
solution_type = ""
primary_sweep = "Freq"
assignment = ""
assignment_type = ["Sheet", "Solid"]
operations = ["NameOfExpression('<Hx,Hy,Hz>')",
"Operation('Mag')",
"EnterSurface('assignment')",
"Operation('SurfaceValue')",
"Operation('MinPos')",
"Operation('ScalarZ')",
]
dependent_expressions = []
report = ["Rectangular Plot"]


# Electrostatic

[electric_charge]
Expand Down

0 comments on commit 955c7f8

Please sign in to comment.