GRINS-0.8.0
Functions
constant_catalycity.C File Reference
#include "grins/constant_catalycity.h"
Include dependency graph for constant_catalycity.C:

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

int main ( )

Definition at line 28 of file constant_catalycity.C.

References GRINS::ConstantCatalycity::dT(), and GRINS::ConstantCatalycity::set_params().

29 {
30  double gamma0 = 0.01;
31 
32  GRINS::ConstantCatalycity gamma( gamma0 );
33 
34  double T1 = 10.0;
35 
36  double tol = std::numeric_limits<double>::epsilon()*10;
37 
38  int return_flag = 0;
39 
40  if( std::fabs( gamma(T1) - gamma0 ) > tol )
41  {
42  std::cerr << "Error: mismatch in gamma" << std::endl
43  << " gamma = " << gamma(T1) << std::endl
44  << " gamma exact = " << gamma0 << std::endl;
45 
46  return_flag = 1;
47  }
48 
49  if( std::fabs( gamma.dT(T1) ) > tol )
50  {
51  std::cerr << "Error: mismatch in dgamma_dT" << std::endl
52  << " dgamma_dT = " << gamma.dT(T1) << std::endl
53  << " dgamma_dT exact = " << 0.0 << std::endl;
54 
55  return_flag = 1;
56  }
57 
58  std::vector<double> gamma1;
59  gamma1.push_back( 1.0e-5 );
60 
61  gamma.set_params( gamma1 );
62 
63  if( std::fabs( gamma(T1) - gamma1[0] ) > tol )
64  {
65  std::cerr << "Error: mismatch in gamma" << std::endl
66  << " gamma = " << gamma(T1) << std::endl
67  << " gamma exact = " << gamma0 << std::endl;
68 
69  return_flag = 1;
70  }
71 
72  if( std::fabs( gamma.dT(T1) ) > tol )
73  {
74  std::cerr << "Error: mismatch in dgamma_dT" << std::endl
75  << " dgamma_dT = " << gamma.dT(T1) << std::endl
76  << " dgamma_dT exact = " << 0.0 << std::endl;
77 
78  return_flag = 1;
79  }
80 
81  return return_flag;
82 }

Generated on Tue Dec 19 2017 12:47:29 for GRINS-0.8.0 by  doxygen 1.8.9.1