Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions src/ansys/dpf/core/available_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from typing import List
from warnings import warn

import ansys.dpf.core as dpf
from ansys.dpf.core.common import _make_as_function_name, _remove_spaces, natures


Expand Down Expand Up @@ -215,13 +216,15 @@
def homogeneity(self):
"""Homogeneity of the result."""
try:
# homogeneity = self._homogeneity
# if homogeneity == 117:
# return Homogeneity(Homogeneity.DIMENSIONLESS).name
return Homogeneity(self._homogeneity).name
except ValueError as exception:
warn(str(exception))
return ""
op = dpf.Operator("homogeneity_name")
op.connect(0, self._homogeneity)
return op.get_output(0, dpf.types.string)

Check warning on line 221 in src/ansys/dpf/core/available_result.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/dpf/core/available_result.py#L220-L221

Added lines #L220 - L221 were not covered by tests
except (KeyError, dpf.errors.DPFServerException):
try:
return Homogeneity(self._homogeneity).name
except ValueError as exception:
warn(str(exception))
return ""

Check warning on line 227 in src/ansys/dpf/core/available_result.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/dpf/core/available_result.py#L225-L227

Added lines #L225 - L227 were not covered by tests

@property
def unit(self):
Expand Down
Loading