From 47c0a8bc00fec019b48cfa8d59355880629855e2 Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Tue, 14 Jan 2025 13:48:45 +0100 Subject: [PATCH] FIX: Wrong behavior in evaluate_monitor_quantity --- .../core/visualization/post/post_icepak.py | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/ansys/aedt/core/visualization/post/post_icepak.py b/src/ansys/aedt/core/visualization/post/post_icepak.py index 0c8d8810538..bc9d29fee1e 100644 --- a/src/ansys/aedt/core/visualization/post/post_icepak.py +++ b/src/ansys/aedt/core/visualization/post/post_icepak.py @@ -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" + 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(