Skip to content

Commit

Permalink
Merge branch 'development' into enforce_clang_tidy_ci
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale authored Mar 26, 2024
2 parents 0b549c6 + 760ecc4 commit d9225e0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
5 changes: 3 additions & 2 deletions Source/driver/parse_castro_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
this tests the current value against the default and outputs
into a file
-- name_params.cpp
-- runtime_params.cpp
has the actual definition of the variables (without extern)
"""
Expand Down Expand Up @@ -134,7 +134,7 @@ def write_headers_and_source(params, out_directory, struct_name):
# output

# find all the namespaces
namespaces = {q.namespace for q in params}
namespaces = sorted({q.namespace for q in params})

for nm in namespaces:

Expand Down Expand Up @@ -271,6 +271,7 @@ def write_headers_and_source(params, out_directory, struct_name):
for ifdef in ifdefs:
params_if = [q for q in params_nm if q.ifdef == ifdef]
types = set(q.dtype for q in params_if)
types = sorted(set(q.dtype for q in params_if))

if ifdef is None:
for tt in types:
Expand Down
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 @@ -609,6 +609,9 @@ Castro::post_advance_operators (Real time, Real dt) // NOLINT(readability-conve

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 d9225e0

Please sign in to comment.