From b1e05a05f275e0844aabeda5365fd5cbb005431a Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Fri, 20 Jun 2014 19:41:25 +0000 Subject: [PATCH] [ck2cti] Relax formatting requirement for Chebyshev coefficients. Allow coefficient data to begin on the same line as the declaration of the order of the polynomial in each dimension. Fixes Issue 219. Cherry-pick of trunk r2937. --- interfaces/python/ck2cti.py | 1 + test/data/pdep-test.inp | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interfaces/python/ck2cti.py b/interfaces/python/ck2cti.py index 1268d92af..9a0f47c9a 100755 --- a/interfaces/python/ck2cti.py +++ b/interfaces/python/ck2cti.py @@ -1277,6 +1277,7 @@ class Parser(object): chebyshev.degreeT = int(float(tokens2[0].strip())) chebyshev.degreeP = int(float(tokens2[1].strip())) chebyshev.coeffs = np.zeros((chebyshev.degreeT,chebyshev.degreeP), np.float64) + chebyshevCoeffs.extend([float(t.strip()) for t in tokens2[2:]]) else: tokens2 = tokens[1].split() chebyshevCoeffs.extend([float(t.strip()) for t in tokens2]) diff --git a/test/data/pdep-test.inp b/test/data/pdep-test.inp index 1da08f7cd..f132df462 100644 --- a/test/data/pdep-test.inp +++ b/test/data/pdep-test.inp @@ -130,8 +130,7 @@ PLOG / 10 1.74e+07 1.98 4521 / ! Bimolecular CHEB R5+H(+m)=P5A+P5B(+m) 1.0E0 0.0 0.0 tcheb / 300.0 2000.0 / pcheb / 0.009869232667160128 98.69232667160128 / -cheb / 4 4 / -cheb / 8.2883000e+00 -1.1397000e+00 -1.2059000e-01 1.6034000e-02 / +cheb / 4 4 8.2883000e+00 -1.1397000e+00 -1.2059000e-01 1.6034000e-02 / cheb / 1.9764000e+00 1.0037000e+00 7.2865000e-03 -3.0432000e-02 / cheb / 3.1770000e-01 2.6889000e-01 9.4806000e-02 -7.6385000e-03 / cheb / -3.1285000e-02 -3.9412000e-02 4.4375000e-02 1.4458000e-02 /