40 double tol = std::numeric_limits<double>::epsilon()*10;
45 double gamma_exact = gamma0*std::pow(T1/Tref, alpha);
46 double dgamma_exact = gamma0*alpha/T1*std::pow(T1/Tref, alpha);
48 if( std::fabs( gamma(T1) - gamma_exact ) > tol )
50 std::cerr <<
"Error: mismatch in gamma" << std::endl
51 <<
" gamma = " << gamma(T1) << std::endl
52 <<
" gamma exact = " << gamma_exact << std::endl;
57 if( std::fabs( gamma.
dT(T1) - dgamma_exact ) > tol )
59 std::cerr <<
"Error: mismatch in dgamma_dT" << std::endl
60 <<
" dgamma_dT = " << gamma.
dT(T1) << std::endl
61 <<
" dgamma_dT exact = " << dgamma_exact << std::endl;
67 std::vector<double> params;
68 params.push_back( 1.0e-5 );
69 params.push_back( 400.0 );
70 params.push_back( 0.3 );
75 double gamma_exact = params[0]*std::pow(T1/params[1], params[2]);
76 double dgamma_exact = params[0]*params[2]/T1*std::pow(T1/params[1], params[2]);
78 if( std::fabs( gamma(T1) - gamma_exact ) > tol )
80 std::cerr <<
"Error: mismatch in gamma" << std::endl
81 <<
" gamma = " << gamma(T1) << std::endl
82 <<
" gamma exact = " << gamma_exact << std::endl;
87 if( std::fabs( gamma.
dT(T1) - dgamma_exact ) > tol )
89 std::cerr <<
"Error: mismatch in dgamma_dT" << std::endl
90 <<
" dgamma_dT = " << gamma.
dT(T1) << std::endl
91 <<
" dgamma_dT exact = " << dgamma_exact << std::endl;
virtual libMesh::Real dT(const libMesh::Real T) const
virtual void set_params(const std::vector< libMesh::Real > ¶ms)