Skip to content

Commit

Permalink
[ck2cti] Fix handling of reaction units settings not on last line
Browse files Browse the repository at this point in the history
Fixes a regression introduced in d56b620.
  • Loading branch information
speth committed Feb 25, 2019
1 parent 0fdbe24 commit 540777c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions interfaces/cython/cantera/ck2cti.py
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,8 @@ def parseExpression(expression, dest):

# Note that the subsequent lines could be in any order
for line in lines[1:]:
if not line.strip():
continue # blank line, or (erased) units field
tokens = line.split('/')
parsed = False

Expand Down
2 changes: 1 addition & 1 deletion test/data/pdep-test.inp
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ PLOG / 100 1.28E+06 1.71 9774 /

! PLOG with duplicate rates, negative A-factors, and custom energy units
H+R3=P3A+P3B 1.0 0.0 0.0
units / kcal/
plog / 0.001315789 2.44E+10 1.04 3.980 /
plog / 0.039473684 3.89E+10 0.989 4.114 /
plog / 1 3.46E+12 0.442 5.463 /
plog / 10 1.72E+14 -0.01 7.134 /
plog / 100 -7.41E+30 -5.54 12.108 /
plog / 100 1.90E+15 -0.29 8.306 /
units / kcal/

! Degenerate PLOG with a single rate expression and custom quantity units
H+R4=H+P4 1.0 0.0 0.0
Expand Down

0 comments on commit 540777c

Please sign in to comment.