27 #include "antioch_config.h"
29 #ifdef ANTIOCH_HAVE_CPPUNIT
41 template<
typename Scalar>
63 std::vector<Scalar> temp(4);
74 std::vector<Scalar> temp(3);
117 const std::vector<Scalar>& exact_coeffs,
130 CPPUNIT_ASSERT_DOUBLES_EQUAL( cp, curve_fit.
cp_over_R(cache), this->
tol() );
134 const std::vector<Scalar>& exact_coeffs,
148 CPPUNIT_ASSERT_DOUBLES_EQUAL( h, curve_fit.
h_over_RT(cache), this->
tol() );
152 const std::vector<Scalar>& exact_coeffs,
166 CPPUNIT_ASSERT_DOUBLES_EQUAL( s, curve_fit.
s_over_R(cache), this->
tol() );
170 {
return std::numeric_limits<Scalar>::epsilon() * 500; }
172 Scalar
cp_exact( Scalar T, Scalar a0, Scalar a1, Scalar a2,
173 Scalar a3, Scalar a4, Scalar a5, Scalar a6 )
175 return a0/(T*T) + a1/T + a2 + a3*T + a4*(T*T) + a5*(T*T*T) + a6*(T*T*T*T);
178 Scalar
h_exact( Scalar T, Scalar a0, Scalar a1, Scalar a2,
179 Scalar a3, Scalar a4, Scalar a5, Scalar a6,
182 return -a0/(T*T) + a1*std::log(T)/T + a2 + a3*T/2.0L + a4*(T*T)/3.0L
183 + a5*(T*T*T)/4.0L + a6*(T*T*T*T)/5.0L + a7/T;
186 Scalar
s_exact( Scalar T, Scalar a0, Scalar a1, Scalar a2,
187 Scalar a3, Scalar a4, Scalar a5, Scalar a6,
190 return -a0/(2.L*T*T) - a1/T + a2*std::log(T) + a3*T + a4*(T*T)/2.0L
191 + a5*(T*T*T)/3.0L + a6*(T*T*T*T)/4.0L + a8;
238 #endif // ANTIOCH_HAVE_CPPUNIT
std::vector< Scalar > _N2_coeffs_1000_6000
CPPUNIT_TEST(test_nasa9_default_temp_intervals)
void test_h(Scalar T, const std::vector< Scalar > &exact_coeffs, const Antioch::NASA9CurveFit< Scalar > &curve_fit)
std::vector< Scalar > _NO2_coeffs_200_1000
void test_nasa9_default_temp_intervals()
CPPUNIT_TEST_SUITE(NASA9CurveFitTestLongDouble)
CPPUNIT_TEST(test_nasa9_default_temp_intervals)
std::vector< Scalar > _N2_coeffs_6000_20000
std::vector< Scalar > _N2_coeffs_200_1000
CPPUNIT_TEST_SUITE(NASA9CurveFitTestFloat)
void three_interval_test(const Antioch::NASA9CurveFit< Scalar > &curve_fit)
CPPUNIT_TEST_SUITE(NASA9CurveFitTestDouble)
std::vector< Scalar > _all_standard_N2_coeffs
const StateType cp_over_R(const TempCache< StateType > &cache) const
Scalar cp(Scalar T, Scalar a0, Scalar a1, Scalar a2, Scalar a3, Scalar a4, Scalar a5, Scalar a6)
Scalar h_exact(Scalar T, Scalar a0, Scalar a1, Scalar a2, Scalar a3, Scalar a4, Scalar a5, Scalar a6, Scalar a7)
void test_s(Scalar T, const std::vector< Scalar > &exact_coeffs, const Antioch::NASA9CurveFit< Scalar > &curve_fit)
StateType h_over_RT(const TempCache< StateType > &cache) const
Scalar s_exact(Scalar T, Scalar a0, Scalar a1, Scalar a2, Scalar a3, Scalar a4, Scalar a5, Scalar a6, Scalar a8)
std::vector< Scalar > _all_standard_NO2_coeffs
This class stores the NASA polynomial fit to the thermodynamics quantities and .
CPPUNIT_TEST_SUITE_REGISTRATION(ArrheniusRateEigenFloatTest)
StateType s_over_R(const TempCache< StateType > &cache) const
void test_nasa9_user_specified_temp_intervals()
void two_interval_test(const Antioch::NASA9CurveFit< Scalar > &curve_fit)
void test_cp(Scalar T, const std::vector< Scalar > &exact_coeffs, const Antioch::NASA9CurveFit< Scalar > &curve_fit)
std::vector< Scalar > _NO2_coeffs_1000_6000
CPPUNIT_TEST(test_nasa9_default_temp_intervals)
Scalar cp_exact(Scalar T, Scalar a0, Scalar a1, Scalar a2, Scalar a3, Scalar a4, Scalar a5, Scalar a6)