boutproject / xBOUT

Collects BOUT++ data from parallelized simulations into xarray.
https://xbout.readthedocs.io/en/latest/
Apache License 2.0
21 stars 10 forks source link

3d plotting #266

Closed johnomotani closed 1 year ago

johnomotani commented 1 year ago

The 3d plotting feature is still a bit of a work in progress, but at least one of the cases (Mayavi 'surface' plots) is somewhat usable. Propose merging as-is for now, so that I can add a 3d animation example script in https://github.com/boutproject/xBOUT-examples.

codecov-commenter commented 1 year ago

Codecov Report

Merging #266 (e18370b) into master (813b0d6) will decrease coverage by 5.52%. The diff coverage is 3.60%.

@@            Coverage Diff             @@
##           master     #266      +/-   ##
==========================================
- Coverage   74.51%   68.99%   -5.53%     
==========================================
  Files          15       15              
  Lines        2959     3209     +250     
  Branches      721      780      +59     
==========================================
+ Hits         2205     2214       +9     
- Misses        492      733     +241     
  Partials      262      262              
Impacted Files Coverage Δ
xbout/plotting/plotfuncs.py 18.34% <1.42%> (-30.37%) :arrow_down:
xbout/utils.py 82.20% <6.66%> (-2.96%) :arrow_down:
xbout/plotting/utils.py 63.93% <10.52%> (-9.86%) :arrow_down:
xbout/boutdataarray.py 78.35% <50.00%> (-0.32%) :arrow_down:
xbout/boutdataset.py 76.73% <50.00%> (-0.11%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

johnomotani commented 1 year ago

Any idea what it would take to make it work with FCI?

I think it should just need handling FCI in _add_cartesian_coordinates(ds) https://github.com/boutproject/xBOUT/blob/59e64ce50e92bcc550205a150c04b277d2e0e177/xbout/utils.py#L131-L149 although without some parallel interpolation, some of the plots would probably not be very smooth. The "poloidal planes" style should work OK though.