Skip to content

Commit 30a7b15

Browse files
Fixed Overwrite option in FFData (#1309)
* - Small bug when overwrite is False - Add UT for this case * - Small bug when overwrite is False - Add UT for this case
1 parent 3164035 commit 30a7b15

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

_unittest/test_12_PostProcessing.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,6 +992,14 @@ def test_72_antenna_plot(self):
992992
export_image_path=os.path.join(self.local_scratch.path, "3d2.jpg"),
993993
)
994994
assert os.path.exists(os.path.join(self.local_scratch.path, "3d2.jpg"))
995+
ffdata1 = self.array_test.get_antenna_ffd_solution_data(frequencies=3.5e9, sphere_name="3D", overwrite=False)
996+
assert ffdata1.plot_farfield_contour(
997+
qty_str="RealizedGain",
998+
convert_to_db=True,
999+
title="Contour at {}Hz".format(ffdata1.frequency),
1000+
export_image_path=os.path.join(self.local_scratch.path, "contour1.jpg"),
1001+
)
1002+
assert os.path.exists(os.path.join(self.local_scratch.path, "contour1.jpg"))
9951003

9961004
def test_z99_delete_variations(self):
9971005
assert self.q3dtest.cleanup_solution()

pyaedt/modules/solutions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1551,9 +1551,9 @@ def _export_all_ffd(self):
15511551

15521552
file_exists = os.path.exists(export_path + exported_name_base + ".txt")
15531553
path_dict.append({})
1554+
time_before = time.time()
15541555
if self.overwrite or not file_exists:
15551556
self._app.logger.info("Exporting Embedded Element Patterns...")
1556-
time_before = time.time()
15571557
var = []
15581558
if self.variations:
15591559
for k, v in self.variations.items():

0 commit comments

Comments
 (0)