fix(gcc-builds): fixed signedness warnings on gcc builds
This commit is contained in:
@@ -888,12 +888,13 @@ namespace gridfire::reaction {
|
|||||||
|
|
||||||
friend std::ostream& operator<<(std::ostream& os, const ReactionSet& rs) {
|
friend std::ostream& operator<<(std::ostream& os, const ReactionSet& rs) {
|
||||||
os << "(ReactionSet: {";
|
os << "(ReactionSet: {";
|
||||||
int i = 0;
|
size_t i = 0;
|
||||||
for (const auto& reaction : rs.m_reactions) {
|
for (const auto& reaction : rs.m_reactions) {
|
||||||
os << *reaction;
|
os << *reaction;
|
||||||
if (i < rs.m_reactions.size() - 1) {
|
if (i < rs.m_reactions.size() - 1) {
|
||||||
os << ", ";
|
os << ", ";
|
||||||
}
|
}
|
||||||
|
++i;
|
||||||
}
|
}
|
||||||
os << "})";
|
os << "})";
|
||||||
return os;
|
return os;
|
||||||
|
|||||||
@@ -1293,7 +1293,7 @@ namespace gridfire {
|
|||||||
if (status <= 0 || status >= 4) {
|
if (status <= 0 || status >= 4) {
|
||||||
std::stringstream msg;
|
std::stringstream msg;
|
||||||
msg << "While working on QSE group with algebraic species: ";
|
msg << "While working on QSE group with algebraic species: ";
|
||||||
int count = 0;
|
size_t count = 0;
|
||||||
for (const auto& species: algebraic_species) {
|
for (const auto& species: algebraic_species) {
|
||||||
msg << species;
|
msg << species;
|
||||||
if (count < algebraic_species.size() - 1) {
|
if (count < algebraic_species.size() - 1) {
|
||||||
|
|||||||
@@ -7,11 +7,12 @@
|
|||||||
|
|
||||||
namespace gridfire::screening {
|
namespace gridfire::screening {
|
||||||
std::unique_ptr<ScreeningModel> selectScreeningModel(const ScreeningType type) {
|
std::unique_ptr<ScreeningModel> selectScreeningModel(const ScreeningType type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ScreeningType::WEAK:
|
case ScreeningType::WEAK:
|
||||||
return std::make_unique<WeakScreeningModel>();
|
return std::make_unique<WeakScreeningModel>();
|
||||||
case ScreeningType::BARE:
|
case ScreeningType::BARE:
|
||||||
return std::make_unique<BareScreeningModel>();
|
return std::make_unique<BareScreeningModel>();
|
||||||
}
|
}
|
||||||
|
throw std::runtime_error("Unknown ScreeningType");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ namespace gridfire::solver {
|
|||||||
|
|
||||||
fourdst::composition::Composition temp_comp;
|
fourdst::composition::Composition temp_comp;
|
||||||
std::vector<double> mass_fractions;
|
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) {
|
if (num_species_at_stop > m_Y->ops->nvgetlength(m_Y) - 1) {
|
||||||
LOG_ERROR(
|
LOG_ERROR(
|
||||||
@@ -263,7 +263,7 @@ namespace gridfire::solver {
|
|||||||
|
|
||||||
mass_fractions.reserve(num_species_at_stop);
|
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];
|
const auto& species = m_engine.getNetworkSpecies()[i];
|
||||||
temp_comp.registerSpecies(species);
|
temp_comp.registerSpecies(species);
|
||||||
mass_fractions.push_back(y_data[i] * species.mass()); // Convert from molar abundance to mass fraction
|
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
|
// 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
|
// 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.
|
// 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[(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)
|
J_data[i * N + (N - 1)] = 0.0; // df(f_i)/df(energy_dot)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user