AMReX-Codes / pyamrex

GPU-Enabled, Zero-Copy AMReX Python Bindings including AI/ML
http://pyamrex.readthedocs.io
Other
32 stars 15 forks source link

bindings for reading particle data #328

Open BenWibking opened 4 weeks ago

BenWibking commented 4 weeks ago

Is there an appropriate C++ API that can be used to read particle data, similar to https://github.com/AMReX-Codes/pyamrex/pull/320?

The use case is to visualize particles with plotfile-viewer: https://github.com/BenWibking/plotfile-viewer.

BenWibking commented 3 weeks ago

cc @ax3l

ax3l commented 3 weeks ago

cc @atmyers 😁

atmyers commented 3 weeks ago

Hi @BenWibking,

The code for reading particles is the Restart method of ParticleContainer, implemented here. There's also a test that shows how to use it here.

BenWibking commented 3 weeks ago

@atmyers thanks!