Skip to content

Commit

Permalink
Auto-format code changes (#187)
Browse files Browse the repository at this point in the history
Auto-format code using Clang-Format

Co-authored-by: GitHub Actions <actions@github.com>
  • Loading branch information
github-actions[bot] and actions-user authored Aug 15, 2023
1 parent a8eb895 commit 5155e7e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion include/micm/solver/rosenbrock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_;

Expand Down
3 changes: 1 addition & 2 deletions test/integration/analytical.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
7 changes: 3 additions & 4 deletions test/unit/process/test_troe_rate_constant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
}

0 comments on commit 5155e7e

Please sign in to comment.