diff --git a/source/material_model/latent_heat.cc b/source/material_model/latent_heat.cc index c4e4b8aa675..4bbfedffb79 100644 --- a/source/material_model/latent_heat.cc +++ b/source/material_model/latent_heat.cc @@ -393,12 +393,12 @@ namespace aspect // we have to scale them here so that they are relative factors in comparison to the product // of the prefactors of all phases above the current one unsigned int index = 0; - for (unsigned int c=0; c0) + if (phase > 0) phase_prefactors[index] /= product; product *= phase_prefactors[index]; index += 1; diff --git a/source/particle/property/composition_reaction.cc b/source/particle/property/composition_reaction.cc index 2422972f3ca..087b0162991 100644 --- a/source/particle/property/composition_reaction.cc +++ b/source/particle/property/composition_reaction.cc @@ -242,8 +242,8 @@ namespace aspect (Utilities::split_string_list(prm.get ("List of reaction times"))); if (this->convert_output_to_years() == true) - for (unsigned int i=0; i>(coordinates, data_table); diff --git a/source/postprocess/visualization/material_properties.cc b/source/postprocess/visualization/material_properties.cc index 851705c5620..5a15d4dff3e 100644 --- a/source/postprocess/visualization/material_properties.cc +++ b/source/postprocess/visualization/material_properties.cc @@ -121,42 +121,42 @@ namespace aspect in.requested_properties = MaterialModel::MaterialProperties::uninitialized; - for (unsigned int i=0; in_compositional_fields(); ++k, ++output_index) { @@ -238,11 +238,13 @@ namespace aspect } --output_index; } - else if (property_names[i] == "melt fraction") + else if (property_name == "melt fraction") computed_quantities[q][output_index] = melt_fractions[q]; else AssertThrow(false, ExcMessage("Material property not implemented for this postprocessor.")); + + ++output_index; } } } diff --git a/source/simulator/parameters.cc b/source/simulator/parameters.cc index 42f7ff57c64..4b948299999 100644 --- a/source/simulator/parameters.cc +++ b/source/simulator/parameters.cc @@ -2102,9 +2102,9 @@ namespace aspect AssertThrow (normalized_fields.size() <= n_compositional_fields, ExcMessage("Invalid input parameter file: Too many entries in List of normalized fields")); - for (unsigned int i_field = 0; i_field < normalized_fields.size(); ++i_field) + for (unsigned int field : normalized_fields) { - AssertThrow(normalized_fields[i_field]