39 #include "converters/ck2ct.h"
41 using namespace Cantera;
45 cout <<
"\nck2cti: convert a CK-format reaction mechanism file to Cantera input format.\n"
46 <<
"\n D. G. Goodwin, Caltech \n"
47 <<
" Version 1.0, August 2003.\n\n"
49 cout <<
"options:" << endl;
50 cout <<
" -i <input file> \n"
51 <<
" -t <thermo database> \n"
52 <<
" -tr <transport database> \n"
53 <<
" -id <identifier> \n"
54 <<
" -d print debugging output \n\n"
55 <<
" -v validate the input file \n\n"
56 <<
"The results are written to the standard output.\n";
60 string getp(
int& i,
int argc,
char** args)
64 a = string(args[i+1]);
75 int main(
int argc,
char** argv)
78 _set_output_format(_TWO_DIGIT_EXPONENT);
80 string infile=
"chem.inp", dbfile=
"", trfile=
"", logfile;
83 bool validate =
false;
90 string arg = string(argv[i]);
92 infile = getp(i,argc,argv);
93 }
else if (arg ==
"-t") {
94 dbfile = getp(i,argc,argv);
95 }
else if (arg ==
"-tr") {
96 trfile = getp(i,argc,argv);
97 }
else if (arg ==
"-id") {
98 idtag = getp(i,argc,argv);
99 }
else if (arg ==
"-d") {
101 cout <<
"### DEBUG MODE ###" << endl;
102 }
else if (arg ==
"-v") {
104 cout <<
"### VALIDATION ENABLED ###" << endl;
105 }
else if (arg ==
"-h" || argc < 3) {
108 cout <<
"unknown option:" << arg << endl;
114 int ierr = pip::convert_ck(infile.c_str(), dbfile.c_str(), trfile.c_str(),
115 idtag.c_str(), debug, validate);