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 PlotFileData #317

Closed BenWibking closed 1 day ago

BenWibking commented 1 month ago

Are there any plans to add bindings for amrex::AmrData (https://github.com/AMReX-Codes/amrex/blob/af6e77226cdb1668a8936ee3b35cf0d441409869/Src/Extern/amrdata/AMReX_AmrData.H) in order to read plotfiles via Python?

Ideally, I'd like to be able to write an equivalent of https://github.com/openPMD/openPMD-viewer for AMReX plotfiles.

Or, is there any other API to read plotfiles that would be faster to get started with?

WeiqunZhang commented 1 month ago

Maybe you can try to port PlotFileData to pyamrex.

On Sun, May 12, 2024, 4:35 PM Ben Wibking @.***> wrote:

Are there any plans to add bindings for amrex::AmrData ( https://github.com/AMReX-Codes/amrex/blob/af6e77226cdb1668a8936ee3b35cf0d441409869/Src/Extern/amrdata/AMReX_AmrData.H) in order to read plotfiles via Python?

Ideally, I'd like to be able to write an equivalent of https://github.com/openPMD/openPMD-viewer for AMReX plotfiles.

Or, is there any other API to read plotfiles that would be faster to get started with?

— Reply to this email directly, view it on GitHub https://github.com/AMReX-Codes/pyamrex/issues/317, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB37TYP4IHOAQZDMDFDCSHDZB74DFAVCNFSM6AAAAABHTGDQUKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI4TCNJVGE4TANQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

BenWibking commented 4 weeks ago

@WeiqunZhang @ax3l Is there any way to lazily load individual FABs?

It looks like PlotFileUtil loads the entire MultiFab into memory at once. This is fine for 2D plotfiles, but won't work for 3D plotfiles when used with https://github.com/BenWibking/plotfile-viewer.