Skip to content

Commit

Permalink
Fix bad rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
bcaddy committed Apr 29, 2024
1 parent 0654285 commit 679a065
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 83 deletions.
25 changes: 15 additions & 10 deletions src/reconstruction/reconstruction_internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -858,20 +858,25 @@ auto __device__ __host__ __inline__ PPM_Interfaces(hydro_utilities::Primitive co

reconstruction::PPM_Single_Variable(cell_im2.density, cell_im1.density, cell_i.density, cell_ip1.density,
cell_ip2.density, interface_L_iph.density, interface_R_imh.density);
reconstruction::PPM_Single_Variable(cell_im2.velocity.x, cell_im1.velocity.x, cell_i.velocity.x, cell_ip1.velocity.x,
cell_ip2.velocity.x, interface_L_iph.velocity.x, interface_R_imh.velocity.x);
reconstruction::PPM_Single_Variable(cell_im2.velocity.y, cell_im1.velocity.y, cell_i.velocity.y, cell_ip1.velocity.y,
cell_ip2.velocity.y, interface_L_iph.velocity.y, interface_R_imh.velocity.y);
reconstruction::PPM_Single_Variable(cell_im2.velocity.z, cell_im1.velocity.z, cell_i.velocity.z, cell_ip1.velocity.z,
cell_ip2.velocity.z, interface_L_iph.velocity.z, interface_R_imh.velocity.z);
reconstruction::PPM_Single_Variable(cell_im2.velocity.x(), cell_im1.velocity.x(), cell_i.velocity.x(),
cell_ip1.velocity.x(), cell_ip2.velocity.x(), interface_L_iph.velocity.x(),
interface_R_imh.velocity.x());
reconstruction::PPM_Single_Variable(cell_im2.velocity.y(), cell_im1.velocity.y(), cell_i.velocity.y(),
cell_ip1.velocity.y(), cell_ip2.velocity.y(), interface_L_iph.velocity.y(),
interface_R_imh.velocity.y());
reconstruction::PPM_Single_Variable(cell_im2.velocity.z(), cell_im1.velocity.z(), cell_i.velocity.z(),
cell_ip1.velocity.z(), cell_ip2.velocity.z(), interface_L_iph.velocity.z(),
interface_R_imh.velocity.z());
reconstruction::PPM_Single_Variable(cell_im2.pressure, cell_im1.pressure, cell_i.pressure, cell_ip1.pressure,
cell_ip2.pressure, interface_L_iph.pressure, interface_R_imh.pressure);

#ifdef MHD
reconstruction::PPM_Single_Variable(cell_im2.magnetic.y, cell_im1.magnetic.y, cell_i.magnetic.y, cell_ip1.magnetic.y,
cell_ip2.magnetic.y, interface_L_iph.magnetic.y, interface_R_imh.magnetic.y);
reconstruction::PPM_Single_Variable(cell_im2.magnetic.z, cell_im1.magnetic.z, cell_i.magnetic.z, cell_ip1.magnetic.z,
cell_ip2.magnetic.z, interface_L_iph.magnetic.z, interface_R_imh.magnetic.z);
reconstruction::PPM_Single_Variable(cell_im2.magnetic.y(), cell_im1.magnetic.y(), cell_i.magnetic.y(),
cell_ip1.magnetic.y(), cell_ip2.magnetic.y(), interface_L_iph.magnetic.y(),
interface_R_imh.magnetic.y());
reconstruction::PPM_Single_Variable(cell_im2.magnetic.z(), cell_im1.magnetic.z(), cell_i.magnetic.z(),
cell_ip1.magnetic.z(), cell_ip2.magnetic.z(), interface_L_iph.magnetic.z(),
interface_R_imh.magnetic.z());
#endif // MHD

#ifdef DE
Expand Down
73 changes: 0 additions & 73 deletions src/reconstruction/reconstruction_internals_tests.cu
Original file line number Diff line number Diff line change
Expand Up @@ -447,37 +447,6 @@ TEST(tALLReconstructionVanLeerSlopeCharacteristic, CorrectInputExpectCorrectOutp
testing_utilities::Check_Results(fiducial_data.a4, test_data.a4, "a4");
}

TEST(tHYDROReconstructionMonotizeParabolicInterface, CorrectInputExpectCorrectOutput)
{
// Input Data

hydro_utilities::Primitive const cell_i{1.4708046701, {9.5021020181, 3.7123503442, 4.6476103466}, 3.7096802847};
hydro_utilities::Primitive const cell_im1{3.9547588941, {3.1552319951, 3.0209247624, 9.5841013261}, 2.2945188332};
hydro_utilities::Primitive const cell_ip1{5.1973323534, {6.9132613767, 1.8397298636, 5.341960387}, 9.093498542};
hydro_utilities::Primitive interface_L_iph{6.7787324804, {9.5389820358, 9.8522754567, 7.8305142852}, 2.450533435};
hydro_utilities::Primitive interface_R_imh{4.8015193892, {5.9124263972, 8.7513040382, 8.3659359773}, 1.339777121};

// Get test data
reconstruction::Monotonize_Parabolic_Interface(cell_i, cell_im1, cell_ip1, interface_L_iph, interface_R_imh);

// Check results
hydro_utilities::Primitive const fiducial_interface_L{
1.4708046700999999, {9.5021020181000004, 3.7123503441999999, 4.6476103465999996}, 3.7096802847000001};
hydro_utilities::Primitive const fiducial_interface_R{
1.4708046700999999, {9.428341982700001, 3.7123503441999999, 4.6476103465999996}, 3.7096802847000001};
testing_utilities::Check_Results(fiducial_interface_L.density, interface_L_iph.density, "density");
testing_utilities::Check_Results(fiducial_interface_L.velocity.x(), interface_L_iph.velocity.x(), "velocity.x()");
testing_utilities::Check_Results(fiducial_interface_L.velocity.y(), interface_L_iph.velocity.y(), "velocity.y()");
testing_utilities::Check_Results(fiducial_interface_L.velocity.z(), interface_L_iph.velocity.z(), "velocity.z()");
testing_utilities::Check_Results(fiducial_interface_L.pressure, interface_L_iph.pressure, "pressure");

testing_utilities::Check_Results(fiducial_interface_R.density, interface_R_imh.density, "density");
testing_utilities::Check_Results(fiducial_interface_R.velocity.x(), interface_R_imh.velocity.x(), "velocity.x()");
testing_utilities::Check_Results(fiducial_interface_R.velocity.y(), interface_R_imh.velocity.y(), "velocity.y()");
testing_utilities::Check_Results(fiducial_interface_R.velocity.z(), interface_R_imh.velocity.z(), "velocity.z()");
testing_utilities::Check_Results(fiducial_interface_R.pressure, interface_R_imh.pressure, "pressure");
}

TEST(tALLReconstructionCalcInterfaceLinear, CorrectInputExpectCorrectOutput)
{
// Setup input data
Expand Down Expand Up @@ -513,48 +482,6 @@ TEST(tALLReconstructionCalcInterfaceLinear, CorrectInputExpectCorrectOutput)
#endif // MHD
}

TEST(tALLReconstructionCalcInterfaceParabolic, CorrectInputExpectCorrectOutput)
{
// Setup input data
#ifdef MHD
hydro_utilities::Primitive cell_i{1, {2, 3, 4}, 5, {6, 7, 8}};
hydro_utilities::Primitive cell_im1{6, {7, 8, 9}, 10, {11, 12, 13}};
hydro_utilities::Primitive slopes_i{14, {15, 16, 17}, 18, {19, 20, 21}};
hydro_utilities::Primitive slopes_im1{22, {23, 24, 25}, 26, {27, 28, 29}};
#else // MHD
hydro_utilities::Primitive cell_i{1, {2, 3, 4}, 5};
hydro_utilities::Primitive cell_im1{6, {7, 8, 9}, 10};
hydro_utilities::Primitive slopes_i{14, {15, 16, 17}, 18};
hydro_utilities::Primitive slopes_im1{22, {23, 24, 25}, 26};
#endif // MHD

// Get test data
auto test_data = reconstruction::Calc_Interface_Parabolic(cell_i, cell_im1, slopes_i, slopes_im1);

// Check results
#ifdef MHD
hydro_utilities::Primitive const fiducial_data{4.833333333333333,
{5.833333333333333, 6.833333333333333, 7.833333333333333},
8.8333333333333339,
{0.0, 10.833333333333334, 11.833333333333334}};
testing_utilities::Check_Results(fiducial_data.density, test_data.density, "density");
testing_utilities::Check_Results(fiducial_data.velocity.x(), test_data.velocity.x(), "velocity.x()");
testing_utilities::Check_Results(fiducial_data.velocity.y(), test_data.velocity.y(), "velocity.y()");
testing_utilities::Check_Results(fiducial_data.velocity.z(), test_data.velocity.z(), "velocity.z()");
testing_utilities::Check_Results(fiducial_data.pressure, test_data.pressure, "pressure");
testing_utilities::Check_Results(fiducial_data.magnetic.y(), test_data.magnetic.y(), "magnetic.y()");
testing_utilities::Check_Results(fiducial_data.magnetic.z(), test_data.magnetic.z(), "magnetic.z()");
#else // MHD
hydro_utilities::Primitive const fiducial_data{
4.833333333333333, {5.833333333333333, 6.833333333333333, 7.833333333333333}, 8.8333333333333339};
testing_utilities::Check_Results(fiducial_data.density, test_data.density, "density");
testing_utilities::Check_Results(fiducial_data.velocity.x(), test_data.velocity.x(), "velocity.x()");
testing_utilities::Check_Results(fiducial_data.velocity.y(), test_data.velocity.y(), "velocity.y()");
testing_utilities::Check_Results(fiducial_data.velocity.z(), test_data.velocity.z(), "velocity.z()");
testing_utilities::Check_Results(fiducial_data.pressure, test_data.pressure, "pressure");
#endif // MHD
}

TEST(tALLReconstructionPPMSingleVariable, CorrectInputExpectCorrectOutput)
{
// Set up PRNG to use
Expand Down

0 comments on commit 679a065

Please sign in to comment.