diff --git a/Source/driver/Castro.cpp b/Source/driver/Castro.cpp index adc4d97fe9..e79cf0574e 100644 --- a/Source/driver/Castro.cpp +++ b/Source/driver/Castro.cpp @@ -58,6 +58,8 @@ #include #include +#include + using namespace amrex; bool Castro::signalStopJob = false; diff --git a/Source/hydro/Make.package b/Source/hydro/Make.package index 6b6ba6c7e8..c5813e27c3 100644 --- a/Source/hydro/Make.package +++ b/Source/hydro/Make.package @@ -30,6 +30,7 @@ CEXE_sources += riemann.cpp CEXE_headers += HLL_solvers.H CEXE_headers += riemann_solvers.H CEXE_headers += riemann_2shock_solvers.H +CEXE_headers += riemann_constants.H CEXE_headers += riemann_type.H CEXE_headers += slope.H CEXE_headers += reconstruction.H diff --git a/Source/hydro/riemann_2shock_solvers.H b/Source/hydro/riemann_2shock_solvers.H index 9fc55d5839..6a70d0e117 100644 --- a/Source/hydro/riemann_2shock_solvers.H +++ b/Source/hydro/riemann_2shock_solvers.H @@ -5,6 +5,7 @@ using namespace amrex::literals; +#include #include #ifdef RADIATION #include diff --git a/Source/hydro/riemann_constants.H b/Source/hydro/riemann_constants.H new file mode 100644 index 0000000000..65ca6641c8 --- /dev/null +++ b/Source/hydro/riemann_constants.H @@ -0,0 +1,16 @@ +#ifndef RIEMANN_CONSTANTS +#define RIEMANN_CONSTANTS + +#include + +using namespace amrex::literals; + +namespace riemann_constants { + constexpr amrex::Real smlp1 = 1.e-10_rt; + constexpr amrex::Real small = 1.e-8_rt; + constexpr amrex::Real smallu = 1.e-12_rt; + constexpr int HISTORY_SIZE=40; + constexpr int PSTAR_BISECT_FACTOR = 5; +} + +#endif diff --git a/Source/hydro/riemann_type.H b/Source/hydro/riemann_type.H index 5ca1a9778b..658befe151 100644 --- a/Source/hydro/riemann_type.H +++ b/Source/hydro/riemann_type.H @@ -5,17 +5,6 @@ using namespace amrex::literals; -namespace riemann_constants { - constexpr amrex::Real smlp1 = 1.e-10_rt; - constexpr amrex::Real small = 1.e-8_rt; - constexpr amrex::Real smallu = 1.e-12_rt; - constexpr int HISTORY_SIZE=40; - constexpr int PSTAR_BISECT_FACTOR = 5; - - -} - - struct RiemannState { amrex::Real rho; diff --git a/Util/exact_riemann/GNUmakefile b/Util/exact_riemann/GNUmakefile index 8be2709e1a..fbf934926a 100644 --- a/Util/exact_riemann/GNUmakefile +++ b/Util/exact_riemann/GNUmakefile @@ -33,6 +33,6 @@ Blocs := . # we explicitly want runtime_parameters.H so we have access to # Castro's runtime parameter system -Blocs += $(CASTRO_HOME)/Source/driver +Blocs += $(CASTRO_HOME)/Source/driver $(CASTRO_HOME)/Source/hydro include $(CASTRO_HOME)/Exec/Make.Castro diff --git a/Util/exact_riemann/riemann_shock.H b/Util/exact_riemann/riemann_shock.H index 8a20c598a0..a6bb04eb9e 100644 --- a/Util/exact_riemann/riemann_shock.H +++ b/Util/exact_riemann/riemann_shock.H @@ -6,7 +6,7 @@ #include #include -#include +#include AMREX_INLINE void @@ -97,7 +97,7 @@ shock(const amrex::Real pstar, amrex::ignore_unused(u_s); - amrex::Real rhostar_hist[riemann_solver::max_iters], Ws_hist[riemann_solver::max_iters]; + amrex::Real rhostar_hist[riemann_constants::HISTORY_SIZE], Ws_hist[riemann_constants::HISTORY_SIZE]; // compute the Z_s function for a shock following C&G Eq. 20 and // 23. Here the "_s" variables are the state (L or R) that we are @@ -163,7 +163,7 @@ shock(const amrex::Real pstar, // now did we converge? if (! converged) { - for (int i = 0; i < castro::riemann_riemann_solver::max_iters; ++i) { + for (int i = 0; i < castro::riemann_shock_maxiter; ++i) { std::cout << i << " " << rhostar_hist[i] << " " << Ws_hist[i] << std::endl; }