From e4c978662079f1f66f7e2e70206ba40a1bf6426e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 10:33:02 -0800 Subject: [PATCH] Auto-format code using Clang-Format (#241) Co-authored-by: GitHub Actions --- src/micm/micm.cpp | 9 ++++++--- src/test/unit/micm/micm_c_api.cpp | 8 ++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/micm/micm.cpp b/src/micm/micm.cpp index 5b46c2d0..d10656b6 100644 --- a/src/micm/micm.cpp +++ b/src/micm/micm.cpp @@ -442,10 +442,12 @@ namespace musica cond.air_density_ = air_density[i_cond++]; } std::size_t i_species_elem = 0; - for (auto &var : state.variables_.AsVector()) var = concentrations[i_species_elem++]; + for (auto &var : state.variables_.AsVector()) + var = concentrations[i_species_elem++]; std::size_t i_custom_rate_elem = 0; - for (auto &var : state.custom_rate_parameters_.AsVector()) var = custom_rate_parameters[i_custom_rate_elem++]; + for (auto &var : state.custom_rate_parameters_.AsVector()) + var = custom_rate_parameters[i_custom_rate_elem++]; solver->CalculateRateConstants(state); auto result = solver->Solve(time_step, state); @@ -463,7 +465,8 @@ namespace musica result.final_time_); i_species_elem = 0; - for (auto &var : state.variables_.AsVector()) concentrations[i_species_elem++] = var; + for (auto &var : state.variables_.AsVector()) + concentrations[i_species_elem++] = var; DeleteError(error); *error = NoError(); diff --git a/src/test/unit/micm/micm_c_api.cpp b/src/test/unit/micm/micm_c_api.cpp index bdba8a47..6e96d6bf 100644 --- a/src/test/unit/micm/micm_c_api.cpp +++ b/src/test/unit/micm/micm_c_api.cpp @@ -314,12 +314,16 @@ double CalculateArrhenius(const ArrheniusReaction parameters, const double tempe } // Common test function for solving multiple grid cells with standard-ordered matrices -void TestStandardMultipleGridCells(MICM* micm, const size_t num_grid_cells, const double time_step, const double test_accuracy) +void TestStandardMultipleGridCells( + MICM* micm, + const size_t num_grid_cells, + const double time_step, + const double test_accuracy) { const size_t num_concentrations = 6; const size_t num_user_defined_reaction_rates = 2; constexpr double GAS_CONSTANT = 8.31446261815324; // J mol-1 K-1 - + double* temperature = new double[num_grid_cells]; double* pressure = new double[num_grid_cells]; double* air_density = new double[num_grid_cells];