diff --git a/Exec/mhd_tests/OrszagTang/problem_initialize.H b/Exec/mhd_tests/OrszagTang/problem_initialize.H index 42bf9dae0c..6b18d2c01a 100644 --- a/Exec/mhd_tests/OrszagTang/problem_initialize.H +++ b/Exec/mhd_tests/OrszagTang/problem_initialize.H @@ -9,7 +9,7 @@ void problem_initialize () { // temporarily give B_0 value here - constexpr Real M_SQRT_PI = std::sqrt(M_PI); + const Real M_SQRT_PI = std::sqrt(M_PI); problem::B_0 = 1.0 / (2.0_rt * M_SQRT_PI); // compute the internal energy (erg/cc) for the left and right state diff --git a/Exec/mhd_tests/OrszagTang/problem_initialize_mhd_data.H b/Exec/mhd_tests/OrszagTang/problem_initialize_mhd_data.H index 07620974b0..65ccb8b943 100644 --- a/Exec/mhd_tests/OrszagTang/problem_initialize_mhd_data.H +++ b/Exec/mhd_tests/OrszagTang/problem_initialize_mhd_data.H @@ -6,8 +6,6 @@ void problem_initialize_mhd_data (int i, int j, int k, Array4 const& B, const int ibdir, const GeometryData& geomdata) { - int coord_type = geomdata.Coord(); - const Real* dx = geomdata.CellSize(); const Real* problo = geomdata.ProbLo(); @@ -20,11 +18,6 @@ void problem_initialize_mhd_data (int i, int j, int k, y = problo[1] + dx[1] * (static_cast(j) + 0.5_rt); #endif - Real z = 0.0; -#if AMREX_SPACEDIM == 3 - z = problo[2] + dx[2] * (static_cast(k) + 0.5_rt); -#endif - if (ibdir == 0) { B(i,j,k) = -problem::B_0 * std::sin(2.0_rt * M_PI * y); } else if (ibdir == 1) { diff --git a/Exec/mhd_tests/OrszagTang/problem_initialize_state_data.H b/Exec/mhd_tests/OrszagTang/problem_initialize_state_data.H index c77606c235..c8a9bfa13d 100644 --- a/Exec/mhd_tests/OrszagTang/problem_initialize_state_data.H +++ b/Exec/mhd_tests/OrszagTang/problem_initialize_state_data.H @@ -9,14 +9,11 @@ void problem_initialize_state_data (int i, int j, int k, Array4 const& state, const GeometryData& geomdata) { - int coord_type = geomdata.Coord(); - const Real* dx = geomdata.CellSize(); const Real* problo = geomdata.ProbLo(); Real x = problo[0] + dx[0] * (static_cast(i) + 0.5_rt); Real y = problo[1] + dx[1] * (static_cast(j) + 0.5_rt); - Real z = problo[2] + dx[2] * (static_cast(k) + 0.5_rt); state(i,j,k,URHO) = problem::rho_0; state(i,j,k,UMX) = -problem::rho_0 * problem::u_0 * std::sin(2.0_rt * M_PI * y); diff --git a/Source/driver/Castro.H b/Source/driver/Castro.H index 574456bc53..8f0f59a88a 100644 --- a/Source/driver/Castro.H +++ b/Source/driver/Castro.H @@ -819,11 +819,11 @@ public: /// @param Bz magnetic field in z /// @param state the state to operate on /// - void add_magnetic_e ( - amrex::MultiFab& Bx, - amrex::MultiFab& By, - amrex::MultiFab& Bz, - amrex::MultiFab& state); + static void add_magnetic_e ( + amrex::MultiFab& Bx, + amrex::MultiFab& By, + amrex::MultiFab& Bz, + amrex::MultiFab& state); /// /// Check if divergence of B is zero at initialization diff --git a/Source/mhd/Castro_mhd.H b/Source/mhd/Castro_mhd.H index 99821b31c7..12037acc75 100644 --- a/Source/mhd/Castro_mhd.H +++ b/Source/mhd/Castro_mhd.H @@ -38,7 +38,7 @@ amrex::Array4 const& flux1, amrex::Array4 const& flux2); - void + static void PrimToCons(const amrex::Box& bx, amrex::Array4 const& q_arr, amrex::Array4 const& u_arr); @@ -53,21 +53,21 @@ const amrex::Real dt); - void + static void electric_edge_x(const amrex::Box& bx, amrex::Array4 const& q_arr, amrex::Array4 const& E, amrex::Array4 const& flxy, amrex::Array4 const& flxz); - void + static void electric_edge_y(const amrex::Box& bx, amrex::Array4 const& q_arr, amrex::Array4 const& E, amrex::Array4 const& flxx, amrex::Array4 const& flxz); - void + static void electric_edge_z(const amrex::Box& bx, amrex::Array4 const& q_arr, amrex::Array4 const& E,