Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

sigma.C

Go to the documentation of this file.
00001 
00031 
00032 // Starlab application:  get_sigma.
00033 
00034 #include "sigma_MPI.h"
00035 
00036 #ifdef TOOLBOX
00037 
00038 main(int argc, char **argv) {
00039 
00040   sigma_input input;
00041 
00042   // identical binary collision
00043   char* default_init  
00044         = "-M 1 -rm 3 -v 1 -t -r1 0 -r2 0 -q 1 -p -a 1 -q 1 -r1 0 -r2 0";
00045 
00046 
00047   // I-orionis problem with zero radii stars
00048   //char* default_init  
00049   // = "-M 0.5 -v 0 -r 1 -t -r1 0 -r2 0 -q 0.5 -p -a 1 -q 0.00001 -r1 0 -r2 0";        
00050 
00051   // Simplified I-orionis problem with zero radii stars
00052   //char* default_init  
00053   //  = "-M 0.66667 -v 0 -r 1 -t -r1 0 -r2 0 -q 0.50 -p -a 1 -q 1 -r1 0 -r2 0";
00054 
00055   // Simplified I-orionis problem with non-zero radii stars
00056   //  char* default_init  
00057   //      = "-M 0.879 -v 2 -r 1 -t -r1 0.0508 -r2 0.0348 -q 0.567 -p -a 1 -q 1 -r1 0.0394 -r2 0.0394";
00058 
00059   strcpy(&input.init_string[0], default_init);
00060 
00061     check_help();
00062 
00063     real  delta_t = VERY_LARGE_NUMBER;       // time span of the integration
00064     real  dt_out = VERY_LARGE_NUMBER;       // time output interval
00065 
00066     extern char *poptarg;
00067     int c;
00068     char* param_string = "A:c:C:d:D:e:g:Ii:m:M:N:pqQs:t:v:V:";
00069 
00070     while ((c = pgetopt(argc, argv, param_string)) != -1)
00071         switch(c) {
00072             case 'A': input.eta = atof(poptarg);
00073                       break;
00074             case 'c': input.cpu_time_check = 3600*atof(poptarg);
00075                                              // (Specify in hours)
00076                       break;
00077 #if 0
00078             case 'C': if (!pvm) 
00079                           input.snap_cube_size = atof(poptarg);
00080                       else
00081                           cerr << "\"-C\" option disallowed in PVM mode\n";
00082                       break;
00083 #endif
00084             case 'd': input.max_trial_density = atof(poptarg);
00085                       break;
00086             case 'D': input.dt_out = atof(poptarg);
00087 #if 0
00088             case 'D': if (!pvm) {
00089                           input.dt_snap = atof(poptarg);
00090                       } else
00091                           cerr << "\"-D\" option disallowed in PVM mode\n";
00092                       break;
00093 #endif
00094                       //            case 'e': input.ecc = atof(poptarg);
00095                       //                      input.ecc_flag = 1;
00096                       //                      break;
00097             case 'g': input.tidal_tol_factor = atof(poptarg);
00098                       break;
00099                       //case 'I': intermediate_sigma = 1 - intermediate_sigma;
00100                       //break;
00101             case 'i': strcpy(input.init_string, poptarg);
00102                       break;
00103             case 'M': input.pmass = atof(poptarg);
00104                       break;
00105             case 'm': input.pmass = atof(poptarg);
00106                       break;
00107             case 'N': input.n_rand = atoi(poptarg);
00108                       break;
00109                       // case 'p': print_counts = 1 - print_counts;
00110                       // break;
00111 #if 0
00112             case 'q': if (scatter_summary_level > 0)
00113                           scatter_summary_level = 0;
00114                       else
00115                           scatter_summary_level = 1;
00116                       break;
00117             case 'Q': if (scatter_summary_level > 0)
00118                           scatter_summary_level = 0;
00119                       else
00120                           scatter_summary_level = 2;
00121                       break;
00122 #endif
00123             case 's': input.seed = atoi(poptarg);
00124                       break;
00125             case 't': input.delta_t = atof(poptarg);
00126                       break;
00127             case 'v': input.v_inf = atof(poptarg);
00128                       break;
00129             case 'V': //input.debug = atoi(poptarg);
00130                       input.verbose = atoi(poptarg);
00131                       break;
00132             case '?': params_to_usage(cerr, argv[0], param_string);
00133                       get_help();
00134         }
00135 
00136     execute_sigma_experiment(input);
00137     
00138 }
00139 
00140 #endif

Generated at Sun Feb 24 09:57:15 2002 for STARLAB by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001