00001
00031
00032
00033
00034 #include "sigma_MPI.h"
00035
00036 #ifdef TOOLBOX
00037
00038 main(int argc, char **argv) {
00039
00040 sigma_input input;
00041
00042
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
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059 strcpy(&input.init_string[0], default_init);
00060
00061 check_help();
00062
00063 real delta_t = VERY_LARGE_NUMBER;
00064 real dt_out = VERY_LARGE_NUMBER;
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
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
00095
00096
00097 case 'g': input.tidal_tol_factor = atof(poptarg);
00098 break;
00099
00100
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
00110
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':
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