Skip to content

Commit

Permalink
FIX: Wrong behavior in evaluate_monitor_quantity
Browse files Browse the repository at this point in the history
  • Loading branch information
SMoraisAnsys committed Jan 14, 2025
1 parent 33d43f4 commit 47c0a8b
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions src/ansys/aedt/core/visualization/post/post_icepak.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,18 +323,17 @@ def evaluate_monitor_quantity(
"""
if variations is None:
variations = {}
else: # pragma: no cover
if self._app.monitor.face_monitors.get(monitor, None):
field_type = "Surface"
elif self._app.monitor.point_monitors.get(monitor, None):
field_type = "Volume"
else:
raise AttributeError(f"Monitor {monitor} is not found in the design.")
fs = self.create_field_summary()
fs.add_calculation(
"Monitor", field_type, monitor, quantity, side=side, ref_temperature=ref_temperature, time=time
)
return self._parse_field_summary_content(fs, setup_name, variations, quantity)
if self._app.monitor.face_monitors.get(monitor, None):
field_type = "Surface"
elif self._app.monitor.point_monitors.get(monitor, None):
field_type = "Volume"

Check warning on line 329 in src/ansys/aedt/core/visualization/post/post_icepak.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/visualization/post/post_icepak.py#L329

Added line #L329 was not covered by tests
else:
raise AttributeError(f"Monitor {monitor} is not found in the design.")
fs = self.create_field_summary()
fs.add_calculation(
"Monitor", field_type, monitor, quantity, side=side, ref_temperature=ref_temperature, time=time
)
return self._parse_field_summary_content(fs, setup_name, variations, quantity)

@pyaedt_function_handler(design_variation="variations")
def evaluate_object_quantity(
Expand Down

0 comments on commit 47c0a8b

Please sign in to comment.