From 857ae8c5ed95e1822dd73d972269e5e79ff3d774 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Mon, 6 Jun 2022 10:05:46 -0400 Subject: [PATCH] Update naming/formatting in thermo consistency tests --- test/data/consistency-cases.yaml | 14 +++++++------- test/thermo/consistency.cpp | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/test/data/consistency-cases.yaml b/test/data/consistency-cases.yaml index c4aa92f048..4d460d9a5d 100644 --- a/test/data/consistency-cases.yaml +++ b/test/data/consistency-cases.yaml @@ -32,7 +32,7 @@ ideal-molal-solution: known-failures: g_eq_h_minus_Ts: "Implementations of g and s are inconsistent. See GitHub Issue #1300" - gk_eq_hk_minus_T_times_sk: + gk_eq_hk_minus_T_sk: "Implementations of g and s are inconsistent. See GitHub Issue #1300" cv_eq_.+: cv not implemented cp_eq_dsdT_const_p_times_T: @@ -78,8 +78,8 @@ binary-solution-tabulated: v_eq_sum_vk_Xk: "Inconsistent results. See GitHub Issue #1302" h_eq_sum_hk_Xk: "Inconsistent results. See GitHub Issue #1302" s_eq_sum_sk_Xk: "Problems near composition limit. See GitHub Issue #1303" - gk_eq_hk_minus_T_times_sk: "Problems near composition limit. See GitHub Issue #1303" - gk0_eq_hk0_minus_T_times_sk0/[34]: + gk_eq_hk_minus_T_sk: "Problems near composition limit. See GitHub Issue #1303" + gk0_eq_hk0_minus_T_sk0/[34]: "Problems near composition limit. See GitHub Issue #1303" chem_potentials_to_activities/3: "Problems near composition limit. See GitHub Issue #1303" @@ -199,7 +199,7 @@ lattice: phase: Li7Si3-interstitial known-failures: _sum_.+_Xk: "Implementation is wrong. See GitHub Issue #1309" - gk_eq_hk_minus_T_times_sk: "Implementation is wrong. See GitHub Issue #1309" + gk_eq_hk_minus_T_sk: "Implementation is wrong. See GitHub Issue #1309" standard_gibbs_nondim: "Implementation is wrong. See GitHub Issue #1309" chem_potentials_to_activities: "Implementation is wrong. See GitHub Issue #1309" states: @@ -214,7 +214,7 @@ compound-lattice: known-failures: _sum_.+_Xk: "LatticePhase implementation is wrong. See GitHub Issue #1309" h_eq_u_plus_Pv: "Implementation is inconsistent. See GitHub Issue #1310" - gk_eq_hk_minus_T_times_sk: "Implementation is inconsistent. See GitHub Issue #1310" + gk_eq_hk_minus_T_sk: "Implementation is inconsistent. See GitHub Issue #1310" chem_potentials_to_activities: "LatticePhase implementation is wrong. See GitHub Issue #1309" activity_coeffs: "See GitHub Issue #1309" @@ -239,7 +239,7 @@ ideal-surface: atol_v: 1e-7 known-failures: h_eq_u_plus_Pv: "Definition of volume is unclear. See GitHub Issue #1312" - gk_eq_hk_minus_T_times_sk: + gk_eq_hk_minus_T_sk: "Implementation of s_k is incorrect. See GitHub Issue #1313" s_eq_sum_sk_Xk: "Implementation of s_k is incorrect. See GitHub Issue #1313" @@ -273,7 +273,7 @@ liquid-water-IAPWS95: rtol_fd: 5e-3 # Limited agreement for Maxwell relations known-failures: h_eq_u_plus_Pv: "Error in internal energy calculation. See GitHub Issue #1315" - hk_eq_uk_plus_P_times_vk: + hk_eq_uk_plus_P_vk: "Error in internal energy calculation. See GitHub Issue #1315" cv_eq_dudT: "Error in internal energy calculation. See GitHub Issue #1315" hk0_eq_uk0_plus_p_vk0: diff --git a/test/thermo/consistency.cpp b/test/thermo/consistency.cpp index 9b6c65bd56..75feeab3cf 100644 --- a/test/thermo/consistency.cpp +++ b/test/thermo/consistency.cpp @@ -99,7 +99,7 @@ TEST_P(TestConsistency, g_eq_h_minus_Ts) { EXPECT_NEAR(g, h - T * s, atol); } -TEST_P(TestConsistency, hk_eq_uk_plus_P_times_vk) +TEST_P(TestConsistency, hk_eq_uk_plus_P_vk) { vector_fp hk(nsp), uk(nsp), vk(nsp); try { @@ -114,7 +114,7 @@ TEST_P(TestConsistency, hk_eq_uk_plus_P_times_vk) } } -TEST_P(TestConsistency, gk_eq_hk_minus_T_times_sk) +TEST_P(TestConsistency, gk_eq_hk_minus_T_sk) { vector_fp gk(nsp), hk(nsp), sk(nsp); try { @@ -205,7 +205,7 @@ TEST_P(TestConsistency, cp_eq_dhdT) double h2 = phase->enthalpy_mole(); double cp2 = phase->cp_mole(); double cp_mid = 0.5 * (cp1 + cp2); - double cp_fd = (h2 - h1)/dT; + double cp_fd = (h2 - h1) / dT; EXPECT_NEAR(cp_fd, cp_mid, max({rtol_fd * cp_mid, rtol_fd * cp_fd, atol})); } @@ -223,7 +223,7 @@ TEST_P(TestConsistency, cv_eq_dudT) double u2 = phase->intEnergy_mole(); double cv2 = phase->cv_mole(); double cv_mid = 0.5 * (cv1 + cv2); - double cv_fd = (u2 - u1)/dT; + double cv_fd = (u2 - u1) / dT; EXPECT_NEAR(cv_fd, cv_mid, max({rtol_fd * cv_mid, rtol_fd * cv_fd, atol})); } @@ -362,7 +362,7 @@ TEST_P(TestConsistency, standard_gibbs_nondim) GTEST_SKIP() << err.getMethod() << " threw NotImplementedError"; } for (size_t k = 0; k < nsp; k++) { - EXPECT_NEAR(g0_RT[k] * RT , mu0[k], atol); + EXPECT_NEAR(g0_RT[k] * RT , mu0[k], atol) << "k = " << k; } }