From 5155e7e61772c8d54c7135040fe36508c206b4e2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 15 Aug 2023 08:39:15 -0700 Subject: [PATCH] Auto-format code changes (#187) Auto-format code using Clang-Format Co-authored-by: GitHub Actions --- include/micm/solver/rosenbrock.hpp | 1 - test/integration/analytical.cpp | 3 +-- test/unit/process/test_troe_rate_constant.cpp | 7 +++---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/include/micm/solver/rosenbrock.hpp b/include/micm/solver/rosenbrock.hpp index 8200e941b..8feb6493a 100644 --- a/include/micm/solver/rosenbrock.hpp +++ b/include/micm/solver/rosenbrock.hpp @@ -730,7 +730,6 @@ namespace micm double H = std::min(std::max(std::abs(parameters_.h_min_), std::abs(parameters_.h_start_)), std::abs(parameters_.h_max_)); - if (std::abs(H) <= 10 * parameters_.round_off_) H = delta_min_; diff --git a/test/integration/analytical.cpp b/test/integration/analytical.cpp index a86237270..ccd4394f1 100644 --- a/test/integration/analytical.cpp +++ b/test/integration/analytical.cpp @@ -1509,8 +1509,7 @@ TEST(AnalyticalExamples, BranchedSuperStiffButAnalytical) double initial_A = analytical_concentrations[0][idx_A]; analytical_concentrations[i_time][idx_A] = initial_A * std::exp(-(k1)*time); - analytical_concentrations[i_time][idx_B] = initial_A * (k1 / (k2 - k1)) * (std::exp(-k1 * time) - std::exp(-k2 * - time)); + analytical_concentrations[i_time][idx_B] = initial_A * (k1 / (k2 - k1)) * (std::exp(-k1 * time) - std::exp(-k2 * time)); analytical_concentrations[i_time][idx_C] = initial_A * (1.0 + (k1 * std::exp(-k2 * time) - k2 * std::exp(-k1 * time)) / (k2 - k1)); diff --git a/test/unit/process/test_troe_rate_constant.cpp b/test/unit/process/test_troe_rate_constant.cpp index 5d2489508..3723dc21c 100644 --- a/test/unit/process/test_troe_rate_constant.cpp +++ b/test/unit/process/test_troe_rate_constant.cpp @@ -38,8 +38,7 @@ TEST(TroeRateConstant, CalculateWithAllArugments) auto k = troe.calculate(state.conditions_[0], params); double k0 = 1.2 * exp(302.3 / temperature) * pow(temperature / 300.0, 2.3); double kinf = 2.6 * exp(402.1 / temperature) * pow(temperature / 300.0, -3.1); - EXPECT_EQ( - k, 42.2 * k0 / (1.0 + 42.2 * k0 / kinf) * pow(0.9, 1.0 / (1.0 + 1.0 / 1.2 * pow(log10(42.2 * k0 / kinf), 2)))); + EXPECT_EQ(k, 42.2 * k0 / (1.0 + 42.2 * k0 / kinf) * pow(0.9, 1.0 / (1.0 + 1.0 / 1.2 * pow(log10(42.2 * k0 / kinf), 2)))); } TEST(TroeRateConstant, AnalyticalTroeExampleAB) @@ -83,8 +82,8 @@ TEST(TroeRateConstant, AnalyticalTroeExampleBC) double k_0 = 1.2e-12 * exp(3.0 / 301.24) * pow(301.24 / 300.0, 167.0); double k_inf = 136.0 * exp(24.0 / 301.24) * pow(301.24 / 300.0, 5.0); - double k1 = k_0 * 42.2 / (1.0 + k_0 * 42.2 / k_inf) * - pow(0.9, 1.0 / (1.0 + (1.0 / 0.8) * pow(log10(k_0 * 42.2 / k_inf), 2))); + double k1 = + k_0 * 42.2 / (1.0 + k_0 * 42.2 / k_inf) * pow(0.9, 1.0 / (1.0 + (1.0 / 0.8) * pow(log10(k_0 * 42.2 / k_inf), 2))); EXPECT_EQ(k, k1); } \ No newline at end of file