geoelements / gns

Graph Network Simulator
https://www.geoelements.org/gns/
Other
136 stars 33 forks source link

`pointsToVTK()` method. in `gns/render_rollout.py` does not support 2D array. #31

Closed yjchoi1 closed 8 months ago

yjchoi1 commented 1 year ago

Describe the bug gns/render_rollout.py does not support 2D trajectories because of pointsToVTK() method.

To Reproduce Steps to reproduce the behavior:

  1. OS/Platform: linux
  2. Run on '....': TACC gpu-a100
  3. On condition '....': Render rollout with WaterDropSample (2D)
  4. See error
    
    (venv) c316-007.ls6(1040)$  python3 -m gns.render_rollout --rollout_path="${WORK_DIR}/rollouts/${DATASET_NAME}/rollout_0.pkl"  

Traceback (most recent call last): File "/opt/apps/intel19/python3/3.9.7/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/opt/apps/intel19/python3/3.9.7/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/work/08264/baagee/ls6/gns/gns/render_rollout.py", line 121, in app.run(main) File "/work/08264/baagee/ls6/gns/venv/lib/python3.9/site-packages/absl/app.py", line 308, in run _run_main(main, args) File "/work/08264/baagee/ls6/gns/venv/lib/python3.9/site-packages/absl/app.py", line 254, in _run_main sys.exit(main(argv)) File "/work/08264/baagee/ls6/gns/gns/render_rollout.py", line 81, in main np.array(coords[:, 2]),



**Expected behavior**

**Screenshots**

**Runtime environment (please complete the following information):**
 - OS/Docker image:
 - Branch [e.g. develop]: main

**Additional context**