parthenon-hpc-lab / parthenon

Parthenon AMR infrastructure
https://parthenon-hpc-lab.github.io/parthenon/
Other
105 stars 33 forks source link

custom coords #1039

Closed Yurlungur closed 3 months ago

Yurlungur commented 3 months ago

PR Summary

This PR is designed to support codes like Phoebus, Artemis, and Assail downstream that uses coordinates that are not the uniform cartesian coordinate system. It lets you tag a mesh variable as a coordinates array. To do say, make your variable a node-centered 3-vector and add the Metadata::CoordinatesVec MetadataFlag to it. Then fill this variable with the x, y, and z coordinates of your nodes as appropriate.

If you do this, the variable will automatically be output in dumps and restarts and the xdmf file will will record this field as your coordinates per meshblock. Tested in parthenon-mhd.

This is also ready for downstream testing and review in downstream codes. Depends on #1019 . I haven't fully cleaned up formatting/linting/docs yet.

PR Checklist

Yurlungur commented 3 months ago

Now documented. This is completely ready for review. No tests, as I don't want us to add Visit or Paraview to our CI, but tested by hand with Visit and Paraview.

Yurlungur commented 3 months ago

Thanks @pgrete I'll make these changes and submit a tirival PR to fix