PucklaJ / dynareadout

High-Performance C/C++ library for parsing binary output files and key files of LS Dyna (d3plot, binout, input deck)
zlib License
16 stars 5 forks source link

multiple binout not able read #17

Closed siddhu2310 closed 1 year ago

siddhu2310 commented 1 year ago

I'm using Python 3.11 when we assign bin files to read as 'simulation/binout' It is not reading , but you give the name as binout00 is working my bin file names binout0000 binout0015 binout0405 binout0025

PucklaJ commented 1 year ago

Excuse me for letting you wait for so long. This is the intended behaviour. simulation/binout* is just an example path. You are supposed to replace it with the path to your own files. So everything is alright.

Here is an example to read your binout files if they are in the current folder:

from dynareadout import Binout

# There is currently an issue on the current release on windows that makes the whole script crash if an error occurs. This will be fixed in this months release
binout = Binout("binout0*")

# Now you can read whatever you want (example: node ids)
node_ids = binout.read("nodout/ids")
print(node_ids)