main.cc File Reference

This is the driver routine. More...

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Detailed Description

This is the driver routine.

Author:
Luca Maccione luca.maccione@desy.de It takes in input the name for the run and the dimensions of the grid. Then it instantiates an object of type DRAGON, makes the initializations and takes care of the printout of the final results.
See also:
Input

Definition in file main.cc.


Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 97 of file main.cc.

References DRAGON::Print(), and DRAGON::Run().

00097                                 {
00098 
00099 #ifdef HAVE_DS
00100   if (argc != 20) {
00101     cout << "Usage:\n./DRAGON <run_name> Ekin_factor dimr dimz D0 (in units of 1e28 cm^2/s) zt zmax (in kpc) delta index_radial mx tau vA (km/s) v_conv_0 (km/s) dvdz_conv (km/s/kpc) etaT sigmav DMmode DMprof set_profile" << endl;
00102     return -1;
00103   }
00104 #else
00105   if (argc != 17) {
00106     cerr << "Usage:\n./DRAGON <run_name> Ekin_factor dimr dimz D0 (in units of 1e28 cm^2/s) zt zmax (in kpc) delta index_radial ab_C ab_N (irrelevant if not propagating 12C and 14N) vA (km/s) v_conv_0 (km/s) dvdz_conv (km/s/kpc) etaT set_profile" << endl;
00107     return 1;
00108   }
00109 #endif
00110 
00111   time_t time_s;
00112   time_t time_e;
00113   
00114   time(&time_s); // fix initial time
00115 
00116   cout << "Creating DRAGON...\n";
00117 
00118   DRAGON* dr = new DRAGON(new Input(argv, argc));
00119   
00120   cout << "done" << endl;
00121 
00122   dr->Print();
00123 
00124   double norm = 1.0;
00125   double normel = 1.0;
00126 
00127   dr->Run(norm, normel);
00128 
00129   // Print B/C, C/O, N/O, 10Be/9Be ratios in ASCII file
00130   //if (Zmax > 8)  dr->PrintRatios();
00131 
00132   delete dr;
00133 
00134   time(&time_e); // fix final time
00135   cout << "Solution found in " << (double)(time_e-time_s) << " s." << endl;
00136 
00137   return 0;
00138 }

 All Classes Namespaces Files Functions Variables Enumerations Enumerator
Generated on Mon Sep 27 12:59:57 2010 for DRAGON by  doxygen 1.6.3