10 print(
"Usage: python3 {} vtu-file-name.vtu".format(__file__) )
11 print(
" python3 {} vtu-file-name-1.vtu vtu-file-name-2.vtu vtu-file-name-3.vtu ...".format(__file__) )
12 print(
" python3 {} *.vtu".format(__file__) )
16for vtufile
in sys.argv:
17 if vtufile.endswith(
".vtu"):
18 if not os.path.exists(vtufile):
19 raise FileNotFoundError(
"no file {}".format(vtufile))
22 partData = reader.load()
27 print(
"First particle ID is", ids[0])
29 for i
in range(ids.shape[0] - 1):
34 print(
"Missing particle:", this)
Reads in particle fields from a single .vtu file, or all .vtu at a given snapshot time specified in t...