Support face- and vertex- centered fields for WarpX datasets.

#2575 Merged at 8f01bbe
  1. Andrew Myers

This adds support for data selection and slicing for face and node-centered fields on WarpX datasets. Fields are now marked with a nodal_flag that describes the location of that variable in the cell:

  • nodal_flag = [0, 0, 0] means cell centered.
  • nodal_flag = [0, 0, 1] means the variable lives on the z-face of the cell.
  • nodal_flag = [1, 1, 0] means the variable is centered in the z-direction but nodal in the other two, i.e. it lives on the four edges that are normal to the z direction.
  • nodal_flag = [1, 1, 1] means that the variable is fully node-centered, i.e. it lives on the 8 cell vertices.

For data selection, instead of returning one value for every cell selected, multiple values will get returned corresponding to the value of nodal_flag, i.e. if nodal_flag = [1, 1, 0], 4 values will get returned per cell.

Slicing works as expected: for every pixel in the slice, the closest point to the pixel using the true, nodal discretization will be sampled for the image.

Comments (7)

  1. yt-fido
    1. Nathan Goldbaum

      I've staged the test dataset on the test box and triggered another test run after doing so. Unfortunately it looks like the tests aren't actually being run for some reason?

  2. Nathan Goldbaum

    Just a couple nits relating to docs and docstrings. I've looked over the code and don't see any issues.

    Since this is a new feature we need two more reviewers. If you could help identify and wrangle people to do code reviews that would help get this merged in more quickly.

    Thanks very much for taking the time to add docs and tests.