cholla-hydro / cholla

A GPU-based hydro code
https://github.com/cholla-hydro/cholla/wiki
MIT License
65 stars 32 forks source link

PLMC Refactor and MHD Support. #288

Closed bcaddy closed 1 year ago

bcaddy commented 1 year ago

Summary

Consolidation

All the basic util functions (pressure, energy, etc) now only exist in hydro_utils and those functions switch between the hydro and MHD versions with #ifdefs

Refactor PLMC

The PLMC reconstructor has been refactored to use device functions that can be shared between different reconstructors. All of those tools are in the reconstruction namespace in the new reconstruction.h file along with tests in reconstruction_tests.h. Also, new tests for the PLMC kernel.

MHD Support in PLMC

MHD support has been added to PLMC. The most complex changes are in the projecting back and forth between primitive and characteristic variables. All tests pass with PLMC now and all the data, allowed margins, etc are also updated for PLMC. The default reconstructor for MHD builds is now PLMC.

Other