Closed bcaddy closed 1 year ago
I'd like @alwinm to take a look at the changes to the I/O routines in io_gpu.cu
. I borrowed some ideas from my CT kernel for the indexing and did a little bit of refactoring, mostly to reduce code reuse and increase const
ness.
This is pretty much ready. Once I get @alwinm's go ahead I just need to update the test data that is impacted by this and it will be good to go.
Thanks for checking it out.
I agree that PI
should be replaced with M_PI
. I agree that the naming is unfortunate in an MPI code but it is the standard so I think we should stick with it until we switch to C++20 which has a much clearer implementation of mathematical constants.
@alwinm, I got bored while the tests were running and replaced all the instances of PI
with M_PI
@evaneschneider, once the tests pass this is good to merge
Restart Test
Added a test for MHD and hydro restarts. It doesn't work with gravity, particles, etc but would be pretty easy to extend to those or write new tests for them based off of this test.
MHD I/O
The MHD I/O was outputting an extra cell in every direction when it should only output an extra cell in the direction of the magnetic field; i.e. the Bx dataset should be (nx+1, ny, nz) not (nx+1, ny+1, nz+1). This should fix that issue and clean up MHD I/O a bit in general.
Replaced all custom
PI
macros with the built inM_PI