-
Notifications
You must be signed in to change notification settings - Fork 428
Open
Labels
Description
I was just reminded that for vector and tensor fields, it makes totally sense to have them in a AoS format. That way, accessing them for read and write does not touch multiple far away locations in memory and one can read longer chunks together.
E.g., blast from a 14-year younger project.
How would one do this with AMReX MultiFabs for a Yee cell?
As far as I understand it, AMReX MultiFab:
- spread their components out and
- do not support staggering that differs between the components.
This is the anti-pattern of efficient memory access on any platform for vector/tensor fields 😅
We should provide a better MultiFab (maybe on top of it) that overcomes the limitations above -- and ideally like our particle containers is level aware, while we are on it.