Skip to content

Commit

Permalink
fix var dict
Browse files Browse the repository at this point in the history
  • Loading branch information
gmalinve committed Mar 1, 2024
1 parent 1265527 commit e8c1b65
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions pyaedt/modules/PostProcessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2467,19 +2467,19 @@ def get_scalar_field_value(

if intrinsics:
if "Transient" in solution:
variation_dict.append("Time:=")
variation_dict.append(intrinsics)
variation.append("Time:=")
variation.append(intrinsics)
else:
variation_dict.append("Freq:=")
variation_dict.append(intrinsics)
variation_dict.append("Phase:=")
variation.append("Freq:=")
variation.append(intrinsics)
variation.append("Phase:=")
if phase:
variation_dict.append(phase)
variation.append(phase)
else:
variation_dict.append("0deg")
variation.append("0deg")

file_name = os.path.join(self._app.working_directory, generate_unique_name("temp_fld") + ".fld")
self.ofieldsreporter.CalculatorWrite(file_name, ["Solution:=", solution], variation_dict)
self.ofieldsreporter.CalculatorWrite(file_name, ["Solution:=", solution], variation)
value = None
if os.path.exists(file_name) or settings.remote_rpc_session:
with open_file(file_name, "r") as f:
Expand Down Expand Up @@ -2618,24 +2618,24 @@ def export_field_file_on_grid(

if intrinsics:
if "Transient" in solution:
variation_dict.append("Time:=")
variation_dict.append(intrinsics)
variation.append("Time:=")
variation.append(intrinsics)
else:
variation_dict.append("Freq:=")
variation_dict.append(intrinsics)
variation_dict.append("Phase:=")
variation.append("Freq:=")
variation.append(intrinsics)
variation.append("Phase:=")
if phase:
variation_dict.append(phase)
variation.append(phase)
else:
variation_dict.append("0deg")
variation.append("0deg")

self.ofieldsreporter.ExportOnGrid(
filename,
grid_start_wu,
grid_stop_wu,
grid_step_wu,
solution,
variation_dict,
variation,
True,
gridtype,
grid_center,
Expand Down

0 comments on commit e8c1b65

Please sign in to comment.