This merges the PLMC and PLMP kernels into one single kernel. It also borrows quite a bit of the refactor from PR #382, for improved modularity, function naming, etc, just without fusing PLM into the Riemann solvers.
PLMC/PPMP Merge
Minor refactors/reformatting throughout now that PLMC and PLMP have been merged
Removed PLMP kernel and associated files
Moved most of PLMC into a device function
Moved the PLM characteristic tracing into a device host function
Added a switch in the PLMC function to switch between limiting in the primitive and characteristic variables
Renamed all PLMC stuff to PLM now that the kernel does both
Added PLMP support in PLMC (not PLM) tests
Removed Monotonize_Characteristic_Return_Primitive and replaced it with the overloaded Van_Leer_Limiter function which works with Real, Primitive, and Characteristic structs and a subsequent call to Characteristic_to_Primitive.
This also should improves PLMP for CTU/SIMPLE based builds by using the more sophisticated characteristic tracing in PLMC for PLMP as well.
Performance
Timing
PLMP is 6.7% faster than PLMC in hydro but only 4.7% faster when MHD is turned on. run_timing.log
Accuracy & Stability
In hydro PLMP and PLMC are virtually identical. A suite of test plots comparing current PLMP, previous PLMP, and PLMC with both integrators can be found here, it also includes the MHD PLMC vs PLMP test plots.
In MHD, PLMP is more oscillatory near shocks and gives a slightly different profile for the internal energy in the Einfeldt Strong Rarefaction. However, in more complex tests, like the blast wave, the PLMP and PLMC reconstructors perform nearly identically.
Here's the script I used to run all the tests and make the plots. Note that it makes some assumptions about the paths to the Cholla and analysis-scripts repos. run-plot-tests.sh.txt. I was on commit 05545d4 of the analysis-scripts repo.
Other
Standardized templates to use uint type for direction template arguments. It was a mix of int and size_t. Since the direction should always be 0, 1, or 2 I chose uint since it must be positive and size_t implies some kind of array indexing.
Added sound_speed to the Eigenvectors struct. This simplifies the overall data flow quite a bit.
Dependencies
Depends on PRs #371, #375, and #377. Until those are merged this will look like it has a lot more changes than it does. A version without all those extra changes can be found here.
Summary
This merges the PLMC and PLMP kernels into one single kernel. It also borrows quite a bit of the refactor from PR #382, for improved modularity, function naming, etc, just without fusing PLM into the Riemann solvers.
PLMC/PPMP Merge
Monotonize_Characteristic_Return_Primitive
and replaced it with the overloadedVan_Leer_Limiter
function which works with Real, Primitive, and Characteristic structs and a subsequent call toCharacteristic_to_Primitive
.SIMPLE
based builds by using the more sophisticated characteristic tracing in PLMC for PLMP as well.Performance
Timing
PLMP is 6.7% faster than PLMC in hydro but only 4.7% faster when MHD is turned on. run_timing.log
Accuracy & Stability
In hydro PLMP and PLMC are virtually identical. A suite of test plots comparing current PLMP, previous PLMP, and PLMC with both integrators can be found here, it also includes the MHD PLMC vs PLMP test plots.
In MHD, PLMP is more oscillatory near shocks and gives a slightly different profile for the internal energy in the Einfeldt Strong Rarefaction. However, in more complex tests, like the blast wave, the PLMP and PLMC reconstructors perform nearly identically.
Here's the script I used to run all the tests and make the plots. Note that it makes some assumptions about the paths to the Cholla and analysis-scripts repos. run-plot-tests.sh.txt. I was on commit 05545d4 of the analysis-scripts repo.
Other
uint
type for direction template arguments. It was a mix ofint
andsize_t
. Since the direction should always be 0, 1, or 2 I choseuint
since it must be positive andsize_t
implies some kind of array indexing.sound_speed
to theEigenvectors
struct. This simplifies the overall data flow quite a bit.Dependencies
Depends on PRs #371, #375, and #377. Until those are merged this will look like it has a lot more changes than it does. A version without all those extra changes can be found here.