Skip to content

Commit

Permalink
fix dimensionality reading for tensor field (#165)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
chrpetre and pre-commit-ci[bot] authored Jun 28, 2024
1 parent ac6cd33 commit 7c28be7
Show file tree
Hide file tree
Showing 3 changed files with 1,783 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ansys/pytwin/evaluate/tbrom.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ def _read_settings(filepath):
namedselection = data["namedSelections"]
if "dimensionality" in data:
dimensionality = data["dimensionality"]
if len(dimensionality) > 1: # tensor field
if data["symmetricalDim"]: # symmetric tensor -> 6 components
dimensionality = [6]
else: # non symmetric tensor -> 9 components
dimensionality = [9]

if "name" in data:
name = data["name"]
if "unit" in data:
Expand Down
Loading

0 comments on commit 7c28be7

Please sign in to comment.