fix(gcc-builds): fixed signedness warnings on gcc builds

This commit is contained in:
2025-11-03 08:53:56 -05:00
parent 86d7a283a1
commit 70ebe151ba
5 changed files with 14 additions and 12 deletions

View File

@@ -888,12 +888,13 @@ namespace gridfire::reaction {
friend std::ostream& operator<<(std::ostream& os, const ReactionSet& rs) {
os << "(ReactionSet: {";
int i = 0;
size_t i = 0;
for (const auto& reaction : rs.m_reactions) {
os << *reaction;
if (i < rs.m_reactions.size() - 1) {
os << ", ";
}
++i;
}
os << "})";
return os;

View File

@@ -256,4 +256,4 @@ namespace gridfire {
}
}
}

View File

@@ -1293,7 +1293,7 @@ namespace gridfire {
if (status <= 0 || status >= 4) {
std::stringstream msg;
msg << "While working on QSE group with algebraic species: ";
int count = 0;
size_t count = 0;
for (const auto& species: algebraic_species) {
msg << species;
if (count < algebraic_species.size() - 1) {

View File

@@ -7,11 +7,12 @@
namespace gridfire::screening {
std::unique_ptr<ScreeningModel> selectScreeningModel(const ScreeningType type) {
switch (type) {
case ScreeningType::WEAK:
return std::make_unique<WeakScreeningModel>();
case ScreeningType::BARE:
return std::make_unique<BareScreeningModel>();
}
switch (type) {
case ScreeningType::WEAK:
return std::make_unique<WeakScreeningModel>();
case ScreeningType::BARE:
return std::make_unique<BareScreeningModel>();
}
throw std::runtime_error("Unknown ScreeningType");
}
}

View File

@@ -249,7 +249,7 @@ namespace gridfire::solver {
fourdst::composition::Composition temp_comp;
std::vector<double> mass_fractions;
size_t num_species_at_stop = m_engine.getNetworkSpecies().size();
long int num_species_at_stop = m_engine.getNetworkSpecies().size();
if (num_species_at_stop > m_Y->ops->nvgetlength(m_Y) - 1) {
LOG_ERROR(
@@ -263,7 +263,7 @@ namespace gridfire::solver {
mass_fractions.reserve(num_species_at_stop);
for (size_t i = 0; i < num_species_at_stop; ++i) {
for (long int i = 0; i < num_species_at_stop; ++i) {
const auto& species = m_engine.getNetworkSpecies()[i];
temp_comp.registerSpecies(species);
mass_fractions.push_back(y_data[i] * species.mass()); // Convert from molar abundance to mass fraction
@@ -442,7 +442,7 @@ namespace gridfire::solver {
// For now assume that the energy derivatives wrt. abundances are zero
// TODO: Need a better way to build this part of the output jacobian so it properly pushes the solver
// in the right direction. Currently we effectively are doing a fixed point iteration in energy space.
for (size_t i = 0; i < N; ++i) {
for (long int i = 1; i < N; ++i) {
J_data[(N - 1) * N + i] = 0.0; // df(energy_dot)/df(y_i)
J_data[i * N + (N - 1)] = 0.0; // df(f_i)/df(energy_dot)
}