Skip to content

Commit 99227fc

Browse files
Merge branch 'main' into issue4334
2 parents 1434a5f + 5b9c195 commit 99227fc

12 files changed

+189
-174
lines changed

_unittest/test_12_1_PostProcessing.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ def test_15_export_plot(self):
578578
def test_16_create_field_plot(self):
579579
cutlist = ["Global:XY"]
580580
plot = self.aedtapp.post._create_fieldplot(
581-
objects=cutlist,
581+
assignment=cutlist,
582582
quantity="Mag_E",
583583
setup_name=self.aedtapp.nominal_adaptive,
584584
intrinsics={},
@@ -626,7 +626,7 @@ def test_61_export_mesh(self):
626626
def test_67_sweep_from_json(self):
627627
local_path = os.path.dirname(os.path.realpath(__file__))
628628
dict_vals = read_json(os.path.join(local_path, "example_models", "report_json", "Modal_Report_Simple.json"))
629-
assert self.aedtapp.post.create_report_from_configuration(input_dict=dict_vals)
629+
assert self.aedtapp.post.create_report_from_configuration(report_settings=dict_vals)
630630

631631
@pytest.mark.skipif(
632632
config["desktopVersion"] < "2022.2", reason="Not working in non graphical in version lower than 2022.2"

_unittest/test_12_PostProcessing.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,10 @@ def test_09_manipulate_report_E(self, field_test):
232232
assert data.units_sweeps["Phase"] == "deg"
233233

234234
assert field_test.post.get_far_field_data(
235-
expression="RealizedGainTotal", setup_sweep_name=field_test.nominal_adaptive, domain="3D"
235+
expressions="RealizedGainTotal", setup_sweep_name=field_test.nominal_adaptive, domain="3D"
236236
)
237237
data_farfield2 = field_test.post.get_far_field_data(
238-
expression="RealizedGainTotal",
238+
expressions="RealizedGainTotal",
239239
setup_sweep_name=field_test.nominal_adaptive,
240240
domain={"Context": "3D", "SourceContext": "1:1"},
241241
)

_unittest_solvers/test_00_analyze.py

+13-11
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,12 @@ def test_02_hfss_export_results(self, hfss_app):
185185
assert len(exported_files) > 0
186186

187187
fld_file1 = os.path.join(self.local_scratch.path, "test_fld_hfss1.fld")
188-
assert hfss_app.post.export_field_file(quantity="Mag_E", file_name=fld_file1, objects="Box1", intrinsics="1GHz",
189-
phase="5deg")
188+
assert hfss_app.post.export_field_file(quantity="Mag_E", output_dir=fld_file1, assignment="Box1",
189+
intrinsics="1GHz", phase="5deg")
190190
assert os.path.exists(fld_file1)
191191
fld_file2 = os.path.join(self.local_scratch.path, "test_fld_hfss2.fld")
192-
assert hfss_app.post.export_field_file(quantity="Mag_E", file_name=fld_file2, objects="Box1", intrinsics="1GHz")
192+
assert hfss_app.post.export_field_file(quantity="Mag_E", output_dir=fld_file2, assignment="Box1",
193+
intrinsics="1GHz")
193194
assert os.path.exists(fld_file2)
194195

195196
def test_03a_icepak_analyze_and_export_summary(self):
@@ -291,26 +292,26 @@ def test_03d_icepak_eval_tempc(self):
291292
def test_03e_icepak_ExportFLDFil(self):
292293
fld_file = os.path.join(self.local_scratch.path, "test_fld.fld")
293294
self.icepak_app.post.export_field_file(quantity="Temp", solution=self.icepak_app.nominal_sweep, variations={},
294-
file_name=fld_file, objects="box")
295+
output_dir=fld_file, assignment="box")
295296
assert os.path.exists(fld_file)
296297
fld_file_1 = os.path.join(self.local_scratch.path, "test_fld_1.fld")
297298
sample_points_file = os.path.join(local_path, "example_models", test_subfolder, "temp_points.pts")
298299
self.icepak_app.post.export_field_file(quantity="Temp", solution=self.icepak_app.nominal_sweep,
299300
variations=self.icepak_app.available_variations.nominal_w_values_dict,
300-
file_name=fld_file_1, objects="box",
301+
output_dir=fld_file_1, assignment="box",
301302
sample_points_file=sample_points_file)
302303
assert os.path.exists(fld_file_1)
303304
fld_file_2 = os.path.join(self.local_scratch.path, "test_fld_2.fld")
304305
self.icepak_app.post.export_field_file(quantity="Temp", solution=self.icepak_app.nominal_sweep,
305306
variations=self.icepak_app.available_variations.nominal_w_values_dict,
306-
file_name=fld_file_2, objects="box",
307+
output_dir=fld_file_2, assignment="box",
307308
sample_points=[[0, 0, 0], [3, 6, 8], [4, 7, 9]])
308309
assert os.path.exists(fld_file_2)
309310
cs = self.icepak_app.modeler.create_coordinate_system()
310311
fld_file_3 = os.path.join(self.local_scratch.path, "test_fld_3.fld")
311312
self.icepak_app.post.export_field_file(quantity="Temp", solution=self.icepak_app.nominal_sweep,
312313
variations=self.icepak_app.available_variations.nominal_w_values_dict,
313-
file_name=fld_file_3, objects="box",
314+
output_dir=fld_file_3, assignment="box",
314315
sample_points=[[0, 0, 0], [3, 6, 8], [4, 7, 9]],
315316
reference_coordinate_system=cs.name, export_in_si_system=False,
316317
export_field_in_reference=False)
@@ -415,17 +416,18 @@ def test_07_export_maxwell_fields(self, m3dtransient):
415416
m3dtransient.analyze(m3dtransient.active_setup, num_cores=2)
416417
fld_file_3 = os.path.join(self.local_scratch.path, "test_fld_3.fld")
417418
assert m3dtransient.post.export_field_file(quantity="Mag_B", solution=m3dtransient.nominal_sweep, variations={},
418-
file_name=fld_file_3, objects="Coil_A2", objects_type="Surf",
419+
output_dir=fld_file_3, assignment="Coil_A2", objects_type="Surf",
419420
intrinsics="10ms")
420421
assert os.path.exists(fld_file_3)
421422
fld_file_4 = os.path.join(self.local_scratch.path, "test_fld_4.fld")
422423
assert not m3dtransient.post.export_field_file(quantity="Mag_B", solution=m3dtransient.nominal_sweep,
423424
variations=m3dtransient.available_variations.nominal_w_values_dict,
424-
file_name=fld_file_4, objects="Coil_A2", objects_type="invalid")
425+
output_dir=fld_file_4, assignment="Coil_A2",
426+
objects_type="invalid")
425427
setup = m3dtransient.setups[0]
426428
m3dtransient.setups[0].delete()
427-
assert not m3dtransient.post.export_field_file(quantity="Mag_B", variations={}, file_name=fld_file_4,
428-
objects="Coil_A2")
429+
assert not m3dtransient.post.export_field_file(quantity="Mag_B", variations={}, output_dir=fld_file_4,
430+
assignment="Coil_A2")
429431

430432
new_setup = m3dtransient.create_setup(name=setup.name, setup_type=setup.setuptype)
431433
new_setup.props = setup.props

examples/03-Maxwell/Maxwell2D_Electrostatic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@
196196
# Export field line traces plot.
197197
# For field lint traces plot, the export file format is ``.fldplt``.
198198

199-
M2D.post.export_field_plot(plot_name="LineTracesTest", file_path=M2D.toolkit_directory, file_format="fldplt")
199+
M2D.post.export_field_plot(plot_name="LineTracesTest", output_dir=M2D.toolkit_directory, file_format="fldplt")
200200

201201
##########################################################
202202
# Export a field plot to an image file

examples/03-Maxwell/Maxwell2D_PMSynchronousMotor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ def create_cs_magnets(pm_id, cs_name, point_direction):
718718
# formerly created when the section is applied.
719719

720720
faces_reg = mod2D.get_object_faces(object_list[1].name) # Region
721-
plot1 = M2D.post.create_fieldplot_surface(objects=faces_reg, quantity='Flux_Lines', intrinsics={
721+
plot1 = M2D.post.create_fieldplot_surface(assignment=faces_reg, quantity='Flux_Lines', intrinsics={
722722
"Time": M2D.variable_manager.variables["StopTime"].evaluated_value}, plot_name="Flux_Lines")
723723

724724
##########################################################

examples/06-Multiphysics/Hfss_Mechanical.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
surfaces = []
159159
for name in mech.get_all_conductors_names():
160160
surfaces.extend(mech.modeler.get_object_faces(name))
161-
mech.post.create_fieldplot_surface(objects=surfaces, quantity="Temperature")
161+
mech.post.create_fieldplot_surface(assignment=surfaces, quantity="Temperature")
162162

163163
###############################################################################
164164
# Release AEDT

examples/06-Multiphysics/MRI.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
# Draw Point1 at origin of the implant coordinate system
108108

109109
hfss.sar_setup(-1, Average_SAR_method=1, TissueMass=1, MaterialDensity=1, )
110-
hfss.post.create_fieldplot_cutplane(objects="implant:YZ", quantity="Average_SAR", filter_objects=["implant_box"])
110+
hfss.post.create_fieldplot_cutplane(assignment="implant:YZ", quantity="Average_SAR", filter_objects=["implant_box"])
111111

112112
hfss.modeler.set_working_coordinate_system("implant")
113113
hfss.modeler.create_point([0, 0, 0], name="Point1")

examples/06-Multiphysics/Maxwell3D_Icepak_2Way_Coupling.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
surf_temperature = ipk.post.create_fieldplot_surface(surface_list, quantity="SurfTemperature",
251251
plot_name="Surface Temperature")
252252

253-
velocity_cutplane = ipk.post.create_fieldplot_cutplane(objects=["Global:XZ"], quantity="Velocity Vectors",
253+
velocity_cutplane = ipk.post.create_fieldplot_cutplane(assignment=["Global:XZ"], quantity="Velocity Vectors",
254254
plot_name="Velocity Vectors")
255255

256256
surf_temperature.export_image()

examples/07-Circuit/Reports.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
# notes and edit axes, the grid, and the legend. You can create custom reports
5858
# in non-graphical mode in AEDT 2023 R2 and later.
5959

60-
report1 = cir.post.create_report_from_configuration(os.path.join(project_path,'Spectrum_CISPR_Basic.json'))
60+
report1 = cir.post.create_report_from_configuration(os.path.join(project_path, 'Spectrum_CISPR_Basic.json'))
6161
out = cir.post.export_report_to_jpg(cir.working_directory, report1.plot_name)
6262
Image(out)
6363

@@ -66,7 +66,7 @@
6666
# ~~~~~~~~~~~~~~~~~~~~~~
6767
# Every aspect of the report can be customized.
6868

69-
report1_full = cir.post.create_report_from_configuration(os.path.join(project_path,'Spectrum_CISPR_Custom.json'))
69+
report1_full = cir.post.create_report_from_configuration(os.path.join(project_path, 'Spectrum_CISPR_Custom.json'))
7070
out = cir.post.export_report_to_jpg(cir.working_directory, report1_full.plot_name)
7171
Image(out)
7272
###############################################################################
@@ -80,7 +80,7 @@
8080

8181
props = pyaedt.general_methods.read_json(os.path.join(project_path, 'Transient_CISPR_Custom.json'))
8282

83-
report2 = cir.post.create_report_from_configuration(input_dict=props, solution_name="NexximTransient")
83+
report2 = cir.post.create_report_from_configuration(report_settings=props, solution_name="NexximTransient")
8484
out = cir.post.export_report_to_jpg(cir.working_directory, report2.plot_name)
8585
Image(out)
8686

@@ -92,7 +92,7 @@
9292

9393
props["expressions"] = {"V(Battery)": {}, "V(U1_VDD)": {}}
9494
props["plot_name"] = "Battery Voltage"
95-
report3 = cir.post.create_report_from_configuration(input_dict=props, solution_name="NexximTransient")
95+
report3 = cir.post.create_report_from_configuration(report_settings=props, solution_name="NexximTransient")
9696
out = cir.post.export_report_to_jpg(cir.working_directory, report3.plot_name)
9797
Image(out)
9898

pyaedt/generic/compliance.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ def _create_aedt_reports(self, pdf_report):
453453
sw_name = self._get_sweep_name(_design, local_config.get("solution_name", None))
454454
_design.logger.info(f"Creating report {name}")
455455
aedt_report = _design.post.create_report_from_configuration(
456-
input_dict=local_config, solution_name=sw_name
456+
report_settings=local_config, solution_name=sw_name
457457
)
458458
if not aedt_report: # pragma: no cover
459459
_design.logger.error(f"Failed to create report {name}")
@@ -504,7 +504,7 @@ def _create_aedt_reports(self, pdf_report):
504504
sw_name = self._get_sweep_name(_design, local_config.get("solution_name", None))
505505
_design.logger.info(f"Creating report {name} for trace {trace}")
506506
aedt_report = _design.post.create_report_from_configuration(
507-
input_dict=local_config, solution_name=sw_name
507+
report_settings=local_config, solution_name=sw_name
508508
)
509509
if report_type != "contour eye diagram":
510510
aedt_report.hide_legend()

pyaedt/modules/AdvancedPostProcessing.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def get_efields_data(self, setup_sweep_name="", ff_setup="Infinite Sphere1", fre
135135

136136
trace_name = "rETheta"
137137
solnData = self.get_far_field_data(
138-
expression=trace_name, setup_sweep_name=setup_sweep_name, domain=ff_setup
138+
expressions=trace_name, setup_sweep_name=setup_sweep_name, domain=ff_setup
139139
)
140140

141141
data = solnData.nominal_variation
@@ -152,7 +152,7 @@ def get_efields_data(self, setup_sweep_name="", ff_setup="Infinite Sphere1", fre
152152

153153
trace_name = "rEPhi"
154154
solnData = self.get_far_field_data(
155-
expression=trace_name, setup_sweep_name=setup_sweep_name, domain=ff_setup
155+
expressions=trace_name, setup_sweep_name=setup_sweep_name, domain=ff_setup
156156
)
157157
data = solnData.nominal_variation
158158

@@ -208,7 +208,7 @@ def get_model_plotter_geometries(
208208
files = []
209209
if get_objects_from_aedt and self._app.solution_type not in ["HFSS3DLayout", "HFSS 3D Layout Design"]:
210210
files = self.export_model_obj(
211-
objects=objects, export_as_single_objects=plot_as_separate_objects, air_objects=plot_air_objects
211+
assignment=objects, export_as_single_objects=plot_as_separate_objects, air_objects=plot_air_objects
212212
)
213213

214214
model = ModelPlotter()

0 commit comments

Comments
 (0)