umvarma / pynastran

Automatically exported from code.google.com/p/pynastran
1 stars 0 forks source link

reading from f06 real eigenvectors that have blank rotation columns raises ValueError #143

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Some of my f06 files are generated using a DMAP that only populates the 
translation terms (T1, T2, T3) of eigenvector tables; the rotation columns (R1, 
R2, R3) are left blank.

Reading f06 real eignevectors when these rotation terms are missing raises a 
ValueError. This happens because of the way the table rows are parsed in the 
f06 module: by splitting the line based on spaces.

The error is demonstrated in the attached file f06_eigenvector_parse_error.zip. 
Two f06 files are included, one with rotations and one without. Processing the 
file that has the rotations reads in fine; the one without rotations raises and 
error.

I was able to fix the error by adding a function to f06 to more robustly handle 
missing columns. The patch and updated f06.py file are included in 
f06_patch.zip. I ran the pyNastran test suite with the updated file and 
everything still passes.

Platform:

pyNastran version 0.6.1 on Windows 7 64 bit (Anaconda 1.9)

Original issue reported on code.google.com by jeffrey....@gmail.com on 20 Feb 2014 at 9:46

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the update.  I'm going to use your approach to rewrite the 
displacement/spc forces/mpc forces/etc. tables (they use the same reader).  I 
want to implement an assumption that all nodes are parsed cleanly, which isn't 
currently true for SPOINTs.  This will make it more robust.

Original comment by mesheb82 on 20 Feb 2014 at 11:08

GoogleCodeExporter commented 9 years ago
The bug is fixed in the trunk.  I'm trying to push a new version in the next 
few weeks, so I'm going to hold off doing a bug release.

Original comment by mesheb82 on 21 Feb 2014 at 7:02