Alneos / vega

Finite element format converter
GNU General Public License v2.0
23 stars 9 forks source link

Parser error on Optistruct File #5

Closed ThomasAbballe closed 7 years ago

ThomasAbballe commented 8 years ago

I use Vega on my optistruct file: vegapp Coiffe_short.fem NASTRAN SYSTUS

I got two parsing errors:

Error parsing keyword PARAM: parsing of line not complete. Line: 51 in file: Coiffe_short.fem Error parsing keyword EIGRL: parsing of line not complete. Line: 69 in file: Coiffe_short.fem

These parsing errors lead to problem of transcription. The second error, for example, lead VEGA to dismiss the first point of my mesh. Intriguingly, the second error only appear on my Windows version, and not the CentOs one.

I join a shorten version of my file. Coiffe_short.fem.txt

ThomasAbballe commented 7 years ago

It seems the problem has been solved, in one push or one other. However, some problems with the Nastran Parsers remains. I just have a similar problems with CTRIA3, which would dismiss the next line. Short_Shell_Example

Parsing warning in CTRIA3 (file short_shell.nas line 19): Some keywords are not supported and dismissed. Parsing error in CTRIA3 (file short_shell.nas line 19): Parsing of line not complete.

In this case, it seems the problem arises when Vega tries to read the second line of a Nastran key, when the second line, optional, is not here...

I can fix this precise bug, and check all Nastran keys for similar problems, but I don't know how to ensure this problem never happen again. In the current version, a mistake during parsing (either from a bug or a wrongly filled command) will often dismissed the key just after the error. Whereas a reliable tool should ensure that errors in a line don't "propagate" outside the faulty command.

ThomasAbballe commented 7 years ago

The push c781f695c306c0558415120c18177948d08ff2a4 changes the Nastran Tokenizer. Now, it works keyline by keyline, and not field by field as before. You have to manually call NastranTokenizer::.nexline() to go to the next command. This way, a bug or error during the parsing of a key can't affect the next keys. I tested these changes quite extensively, and I hope that I didn't add too many bugs with this changes. Future will tell.

As of the specific problems of the CTRIA3 command, it was solved by db842df8e2a319c5858068b0a64827d568a27703