Skip to content

Commit

Permalink
fix parsing for negative numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
FG-TUM committed Feb 8, 2024
1 parent c5c81d8 commit e795830
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/decomp2vtkConverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ def getCellPointIndices(self):
line = f_in.readline()
celllist = []
while line != "":
match = re.search(r'([0-9]+) ([0-9. ]+)(.*)', line)
# Matches "[int] [float] [whatever]"
match = re.search(r'([-0-9]+) ([-0-9. ]+)(.*)', line)
rank = int(match.group(1).rstrip())
minMaxString = match.group(2).rstrip()
configString = match.group(3)
Expand Down

0 comments on commit e795830

Please sign in to comment.