38 double tol = std::numeric_limits<double>::epsilon()*10;
43 double gamma_exact = gamma0*std::exp(-Ta/T1);
44 double dgamma_exact = gamma0*(Ta/(T1*T1))*std::exp(-Ta/T1);
46 if( std::fabs( gamma(T1) - gamma_exact ) > tol )
48 std::cerr <<
"Error: mismatch in gamma" << std::endl
49 <<
" gamma = " << gamma(T1) << std::endl
50 <<
" gamma exact = " << gamma_exact << std::endl;
55 if( std::fabs( gamma.
dT(T1) - dgamma_exact ) > tol )
57 std::cerr <<
"Error: mismatch in dgamma_dT" << std::endl
58 <<
" dgamma_dT = " << gamma.
dT(T1) << std::endl
59 <<
" dgamma_dT exact = " << dgamma_exact << std::endl;
65 std::vector<double> params;
66 params.push_back( 1.0e-5 );
67 params.push_back( 400.0 );
72 double gamma_exact = params[0]*std::exp(-params[1]/T1);
73 double dgamma_exact = params[0]*(params[1]/(T1*T1))*std::exp(-params[1]/T1);
75 if( std::fabs( gamma(T1) - gamma_exact ) > tol )
77 std::cerr <<
"Error: mismatch in gamma" << std::endl
78 <<
" gamma = " << gamma(T1) << std::endl
79 <<
" gamma exact = " << gamma_exact << std::endl;
84 if( std::fabs( gamma.
dT(T1) - dgamma_exact ) > tol )
86 std::cerr <<
"Error: mismatch in dgamma_dT" << std::endl
87 <<
" dgamma_dT = " << gamma.
dT(T1) << std::endl
88 <<
" dgamma_dT exact = " << dgamma_exact << std::endl;
virtual void set_params(const std::vector< libMesh::Real > ¶ms)
virtual libMesh::Real dT(const libMesh::Real T) const