Skip to content

Commit

Permalink
fix some more compiler warnings (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale authored Jul 26, 2020
1 parent 0cc507b commit ca01493
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
6 changes: 3 additions & 3 deletions EOS/eos_composition.H
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ void composition(eos_t& state) {

}

#ifdef EXTRA_THERMO
AMREX_GPU_HOST_DEVICE inline
eos_xderivs_t composition_derivatives(const eos_t& state) {

eos_xderivs_t state_xderivs;

#ifdef EXTRA_THERMO
for (int n = 0; n < NumSpec; n++) {
state_xderivs.dpdX[n] =
state.dpdA * (state.abar * aion_inv[n]) * (aion[n] - state.abar) +
Expand All @@ -65,9 +65,9 @@ eos_xderivs_t composition_derivatives(const eos_t& state) {
}
}

#endif

return state_xderivs;
}
#endif


#endif
4 changes: 3 additions & 1 deletion EOS/helmholtz/actual_eos.H
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,9 @@ void apply_coulomb_corrections(eos_t& state)
Real ytot1 = 1.0e0_rt / state.abar;
Real xni = avo_eos * ytot1 * state.rho;
Real dxnidd = avo_eos * ytot1;
#ifdef EXTRA_THERMO
Real dxnida = -xni * ytot1;
#endif

Real kt = kerg * state.T;
Real ktinv = 1.0e0_rt / kt;
Expand Down Expand Up @@ -1337,7 +1339,7 @@ void actual_eos_finalize ()


AMREX_GPU_HOST_DEVICE inline
bool is_input_valid(eos_input_t input) {
bool is_input_valid(eos_input_t /*input*/) {

bool valid = true;

Expand Down
4 changes: 2 additions & 2 deletions EOS/multigamma/eos_composition.H
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ void subroutine (eos_t& state)

// Compute thermodynamic derivatives with respect to xn(:)

#ifdef EXTRA_THERMO
AMREX_GPU_HOST_DEVICE inline
eos_x_derivs_t composition_derivatives (const eos_t& state)
{
Expand All @@ -57,17 +58,16 @@ eos_x_derivs_t composition_derivatives (const eos_t& state)

// Composition derivatives

#ifdef EXTRA_THERMO
for (int n = 0; n < NumSpec; ++n) {
state_xderivs.dpdX[n] = state.rho * (k_B / m_nucleon) * state.T * aion_inv[n];
state_xderivs.dedX[n] = (k_B / m_nucleon) * state.T * aion_inv[n] / (gammas[n] - 1.0_rt);
state_xderivs.dhdX[n] = state_xderivs.dedX[n] + (state.p / (state.rho * state.rho) - state.dedr) *
state_xderivs.dpdX[n] / state.dpdr;
}
#endif

return state_xderivs;

}
#endif

#endif
2 changes: 1 addition & 1 deletion interfaces/eos_override.H
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <eos_type.H>

AMREX_GPU_HOST_DEVICE inline
void eos_override(eos_t& state) {}
void eos_override(eos_t& /*state*/) {}

#endif

2 changes: 2 additions & 0 deletions interfaces/network.H
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ static int network_spec_index(const std::string name) {
return idx;
}

#if NAUX_NET > 0
static int network_aux_index(const std::string name) {
int idx = -1;
for (int n = 0; n < NumAux; n++) {
Expand All @@ -27,5 +28,6 @@ static int network_aux_index(const std::string name) {
}
return idx;
}
#endif

#endif
2 changes: 2 additions & 0 deletions networks/general_null/network_header.template
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@ static const std::vector<std::string> spec_names_cxx = {
@@SPEC_NAMES@@
};

#if NAUX_NET > 0
static const std::vector<std::string> short_aux_names_cxx = {
@@SHORT_AUX_NAMES@@
};

static const std::vector<std::string> aux_names_cxx = {
@@AUX_NAMES@@
};
#endif

namespace Species {
enum NetworkSpecies {
Expand Down

0 comments on commit ca01493

Please sign in to comment.