Skip to content

Better Vector/Tensor Fields in MultiFabs #4825

@ax3l

Description

@ax3l

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions