diff --git a/src/AdvectionSimulation.hpp b/src/AdvectionSimulation.hpp index 51e1706ad..dcb8959b2 100644 --- a/src/AdvectionSimulation.hpp +++ b/src/AdvectionSimulation.hpp @@ -152,6 +152,7 @@ template void AdvectionSimulation::setInitialCon { // default empty implementation // user should implement using problem-specific template specialization + // note: an implementation is only required if face-centered vars are used } template void AdvectionSimulation::computeAfterTimestep() diff --git a/src/HydroBlast2D/test_hydro2d_blast.cpp b/src/HydroBlast2D/test_hydro2d_blast.cpp index 8b17eb0d7..f16efbea7 100644 --- a/src/HydroBlast2D/test_hydro2d_blast.cpp +++ b/src/HydroBlast2D/test_hydro2d_blast.cpp @@ -27,7 +27,7 @@ struct BlastProblem { template <> struct quokka::EOS_Traits { static constexpr double gamma = 5. / 3.; - static constexpr double mean_molecular_weight = C::m_u; + static constexpr double mean_molecular_weight = 1.0; static constexpr double boltzmann_constant = C::k_B; }; @@ -169,7 +169,7 @@ auto problem_main() -> int sim.stopTime_ = 0.1; // 1.5; sim.cflNumber_ = 0.3; sim.maxTimesteps_ = 20000; - // sim.plotfileInterval_ = 2000; + sim.plotfileInterval_ = 2000; // initialize sim.setInitialConditions(); diff --git a/src/HydroKelvinHelmholz/test_hydro2d_kh.cpp b/src/HydroKelvinHelmholz/test_hydro2d_kh.cpp index 59b714a67..3cb6373e1 100644 --- a/src/HydroKelvinHelmholz/test_hydro2d_kh.cpp +++ b/src/HydroKelvinHelmholz/test_hydro2d_kh.cpp @@ -24,7 +24,7 @@ struct KelvinHelmholzProblem { template <> struct quokka::EOS_Traits { static constexpr double gamma = 1.4; - static constexpr double mean_molecular_weight = C::m_u; + static constexpr double mean_molecular_weight = 1.0; static constexpr double boltzmann_constant = C::k_B; }; @@ -84,7 +84,6 @@ template <> void RadhydroSimulation::setInitialConditions state_cc(i, j, k, HydroSystem::x2Momentum_index) = rho * vy; state_cc(i, j, k, HydroSystem::x3Momentum_index) = rho * vz; state_cc(i, j, k, HydroSystem::energy_index) = P / (gamma - 1.) + 0.5 * rho * v_sq; - state_cc(i, j, k, HydroSystem::internalEnergy_index) = P / (gamma - 1.); }); } @@ -122,7 +121,7 @@ template <> void RadhydroSimulation::ErrorEst(int lev, am auto problem_main() -> int { - // Boundary conditions + // Problem parameters const int ncomp_cc = Physics_Indices::nvarTotal_cc; amrex::Vector BCs_cc(ncomp_cc); for (int n = 0; n < ncomp_cc; ++n) { @@ -135,7 +134,7 @@ auto problem_main() -> int // Problem initialization RadhydroSimulation sim(BCs_cc); - // sim.stopTime_ = 1.5; + sim.stopTime_ = 1.5; sim.cflNumber_ = 0.4; sim.maxTimesteps_ = 40000; sim.plotfileInterval_ = 100; diff --git a/src/RadhydroSimulation.hpp b/src/RadhydroSimulation.hpp index 1f9e4c322..150c37cb4 100644 --- a/src/RadhydroSimulation.hpp +++ b/src/RadhydroSimulation.hpp @@ -482,6 +482,7 @@ template void RadhydroSimulation::setInitialCond { // default empty implementation // user should implement using problem-specific template specialization + // note: an implementation is only required if face-centered vars are used } template void RadhydroSimulation::computeAfterTimestep() diff --git a/src/simulation.hpp b/src/simulation.hpp index 29893e681..722408c26 100644 --- a/src/simulation.hpp +++ b/src/simulation.hpp @@ -355,7 +355,7 @@ template class AMRSimulation : public amrex::AmrCore // Nghost = number of ghost cells for each array int nghost_cc_ = 4; // PPM needs nghost >= 3, PPM+flattening needs nghost >= 4 - int nghost_fc_ = 2; // at least 2 are needed for tracer particles + int nghost_fc_ = Physics_Traits::is_mhd_enabled ? 4 : 2; // 4 needed for MHD, otherwise only 2 for tracer particles amrex::Vector componentNames_cc_; amrex::Vector componentNames_fc_; amrex::Vector derivedNames_;