27 #ifndef ANTIOCH_ARRHENIUS_RATE_VECTOR_TEST_BASE_H
28 #define ANTIOCH_ARRHENIUS_RATE_VECTOR_TEST_BASE_H
30 #include "antioch_config.h"
32 #ifdef ANTIOCH_HAVE_CPPUNIT
47 template<
typename PairScalars>
73 const Scalar tol = std::numeric_limits<Scalar>::epsilon() * 100;
82 const Scalar tol = std::numeric_limits<Scalar>::epsilon() * 100;
91 const Scalar tol = std::numeric_limits<Scalar>::epsilon() * 100;
102 PairScalars e_rate = *(this->
_example);
103 for (
unsigned int tuple=0; tuple != ANTIOCH_N_TUPLES; ++tuple)
105 e_rate[2*tuple] = this->
value(T[2*tuple]);
106 e_rate[2*tuple+1] = this->
value(T[2*tuple+1]);
113 PairScalars e_deriv = *(this->
_example);
114 for (
unsigned int tuple=0; tuple != ANTIOCH_N_TUPLES; ++tuple)
116 e_deriv[2*tuple] = this->
deriv(T[2*tuple]);
117 e_deriv[2*tuple+1] = this->
deriv(T[2*tuple+1]);
126 #endif // ANTIOCH_HAVE_CPPUNIT
128 #endif // ANTIOCH_ARRHENIUS_RATE_VECTOR_TEST_BASE_H
void test_rate_and_deriv(const Antioch::ArrheniusRate< Antioch::value_type< PairScalars >::type > &reaction_rate, const PairScalars &T, typename Antioch::value_type< PairScalars >::typetol)
void test_standard_rate()
void test_deriv(const Antioch::ArrheniusRate< Antioch::value_type< PairScalars >::type > &reaction_rate, const PairScalars &T, typename Antioch::value_type< PairScalars >::typetol)
Antioch::ArrheniusRate< typename Antioch::value_type< PairScalars >::type > * _rate
virtual PairScalars exact_deriv(PairScalars T)
virtual PairScalars exact_rate(PairScalars T)
PairScalars setup_T(const PairScalars &example)
Antioch::value_type< PairScalars >::type value(Antioch::value_type< PairScalars >::typeT)
void test_standard_rate_and_deriv()
void reset_params(Antioch::value_type< PairScalars >::typeCf, Antioch::value_type< PairScalars >::typeEa)
void test_rate(const Antioch::ArrheniusRate< Antioch::value_type< PairScalars >::type > &reaction_rate, const PairScalars &T, typename Antioch::value_type< PairScalars >::typetol)
Antioch::value_type< PairScalars >::type deriv(Antioch::value_type< PairScalars >::typeT)
void test_standard_deriv()