Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

address some clang-tidy MHD warnings #2792

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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