Skip to content

Commit

Permalink
address some clang-tidy MHD warnings (#2792)
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale authored Mar 26, 2024
1 parent 2641dc6 commit e6c2da1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Source/mhd/Castro_mhd.H
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

void
consup_mhd(const amrex::Box& bx, const Real dt,
amrex::Array4<amrex::Real> const& update,
amrex::Array4<amrex::Real> const& U_new,
amrex::Array4<amrex::Real const> const& flux0,
amrex::Array4<amrex::Real const> const& flux1,
amrex::Array4<amrex::Real const> const& flux2);
Expand Down
6 changes: 3 additions & 3 deletions Source/mhd/mhd_util.H
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ eos_soundspeed_mhd(Real& c, Real as, Real ca, Real bd) {

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
void
qflux(Real* qflx, Real* flx, Real* q_zone) {
qflux(Real* qflx, const Real* flx, const Real* q_zone) {

// Calculate the C to P Jacobian applied to the fluxes

Expand Down Expand Up @@ -78,7 +78,7 @@ qflux(Real* qflx, Real* flx, Real* q_zone) {

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
void
electric(Real* q_zone, Real& E_zone, const int comp) {
electric(const Real* q_zone, Real& E_zone, const int comp) {

// this takes the cell-center primitive state, q_zone, and computes the cell-center
// electric field, E_zone, using Faraday's law:
Expand All @@ -99,7 +99,7 @@ electric(Real* q_zone, Real& E_zone, const int comp) {

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
void
ConsToPrim(Real* q_zone, Real* U_zone) {
ConsToPrim(Real* q_zone, const Real* U_zone) {

// calculate the primitive variables from the conserved
// U has NUM_STATE+3 components
Expand Down
3 changes: 3 additions & 0 deletions Source/sources/Castro_sources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,9 @@ Castro::post_advance_operators (Real time, Real dt)
{
advance_status status {};

amrex::ignore_unused(time);
amrex::ignore_unused(dt);

#ifndef TRUE_SDC
#ifdef REACTIONS
status = do_new_reactions(time, dt);
Expand Down

0 comments on commit e6c2da1

Please sign in to comment.