Skip to content

Commit

Permalink
Fix: Convert near field list name order (#5666)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuelopez-ansys authored Jan 16, 2025
1 parent 11e2fdd commit b2991fa
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/ansys/aedt/core/visualization/advanced/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,15 @@ def convert_nearfield_data(dat_folder, frequency=6, invert_phase_for_lower_faces
index = 1
for el in list(file_keys):
for k in range(index, index + len(components[el].x)):
row = []
row.append(k)
row.append(components[el].x[k - index])
row.append(components[el].y[k - index])
row.append(components[el].z[k - index])
row = [k, components[el].x[k - index], components[el].y[k - index], components[el].z[k - index]]
for field in ["Ex", "Ey", "Ez", "Hx", "Hy", "Hz"]:
row.append(components[el].re[field][k - index])
row.append(components[el].im[field][k - index])
field_index = k - index
if len(components[el].re[field]) <= field_index:
row.append(0)
row.append(0)
else:
row.append(components[el].re[field][field_index])
row.append(components[el].im[field][field_index])
full_data.append(row)
index += len(components[el].x)

Expand Down

0 comments on commit b2991fa

Please sign in to comment.