00001
00002
00003
00004 #include "cddefines.h"
00005 #include "atomfeii.h"
00006 #include "input.h"
00007 #include "iso.h"
00008 #include "monitor_results.h"
00009 #include "parser.h"
00010
00011 void ParseTest(Parser &p)
00012 {
00013 char chStuff[INPUT_LINE_LENGTH];
00014
00015 DEBUG_ENTRY( "ParseTest()" );
00016
00017
00018
00019
00020
00021 int nPrintTest = p.nMatch("PRIN" );
00022
00023 bool lgH2 = p.nMatch(" H2 ");
00024 bool lgFeII = p.nMatch("FEII") || p.nMatch("FE II");
00025 bool lgLARG = p.nMatch("LARG");
00026 bool lgMOLE = p.nMatch("MOLE");
00027
00028
00029 if( lgH2 )
00030 {
00031
00032
00033 sprintf( chStuff , "ATOM H2 LIMIT -20 " );
00034 if( nPrintTest )
00035 fprintf(ioQQQ , "%s\n" , chStuff );
00036 p.setline(chStuff);
00037 p.set_point(4);
00038 ParseAtomH2(p);
00039 }
00040
00041
00042 if( lgFeII )
00043 {
00044 sprintf( chStuff , "ATOM FEII " );
00045 if( nPrintTest )
00046 fprintf(ioQQQ , "%s\n" , chStuff );
00047 p.setline(chStuff);
00048 p.set_point(4);
00049 ParseAtomFeII(p);
00050 }
00051
00052
00053 if( lgLARG )
00054 {
00055 sprintf( chStuff , "ATOM H-LIKE ELEMENT HYDROGEN LEVELS LARGER " );
00056 if( nPrintTest )
00057 fprintf(ioQQQ , "%s\n" , chStuff );
00058 p.setline(chStuff);
00059 p.set_point(4);
00060 ParseAtomISO(ipH_LIKE,p);
00061 }
00062
00063 if( lgMOLE )
00064 {
00065 # if 0
00066 {
00067
00068 sprintf( chStuff , "TRACE TEMPERATURE CONVERGENCE " );
00069 if( nPrintTest )
00070 fprintf(ioQQQ , "%s\n" , chStuff );
00071 p.setline(chStuff);
00072 p.set_point(4);
00073 ParseTrace(chStuff);
00074 }
00075 # endif
00076
00077 {
00078
00079 sprintf( chStuff , "HDEN 5 " );
00080 if( nPrintTest )
00081 fprintf(ioQQQ , "%s\n" , chStuff );
00082 p.setline(chStuff);
00083 p.set_point(4);
00084 ParseHDEN(p);
00085 }
00086
00087 {
00088
00089 sprintf( chStuff , "CONSTANT TEMPER 50K " );
00090 if( nPrintTest )
00091 fprintf(ioQQQ , "%s\n" , chStuff );
00092 p.setline(chStuff);
00093 p.set_point(4);
00094 ParseConstant(p);
00095 }
00096
00097 {
00098
00099 sprintf( chStuff , "TABLE ISM " );
00100 if( nPrintTest )
00101 fprintf(ioQQQ , "%s\n" , chStuff );
00102 p.setline(chStuff);
00103 p.set_point(4);
00104 ParseTable( p);
00105 }
00106
00107 {
00108
00109 sprintf( chStuff , "EXTINGUISH 23 " );
00110 if( nPrintTest )
00111 fprintf(ioQQQ , "%s\n" , chStuff );
00112 p.setline(chStuff);
00113 p.set_point(4);
00114 ParseExtinguish( p );
00115 }
00116
00117 {
00118
00119 sprintf( chStuff , "STOP ZONE 2 " );
00120 if( nPrintTest )
00121 fprintf(ioQQQ , "%s\n" , chStuff );
00122 p.setline(chStuff);
00123 p.set_point(4);
00124 ParseStop(p);
00125 }
00126
00127 {
00128
00129 sprintf( chStuff , "SET DR 0 " );
00130 if( nPrintTest )
00131 fprintf(ioQQQ , "%s\n" , chStuff );
00132 p.setline(chStuff);
00133 p.set_point(4);
00134 ParseSet(p);
00135 }
00136
00137 {
00138
00139 sprintf( chStuff , "CASE B " );
00140 if( nPrintTest )
00141 fprintf(ioQQQ , "%s\n" , chStuff );
00142 p.setline(chStuff);
00143 p.set_point(4);
00144 ParseCaseB( p );
00145 }
00146
00147 {
00148
00149
00150 sprintf( chStuff , "COSMIC RAY BACKGROUND linear 0.1266 " );
00151 if( nPrintTest )
00152 fprintf(ioQQQ , "%s\n" , chStuff );
00153 p.setline(chStuff);
00154 p.set_point(4);
00155 ParseCosmicRays( p );
00156 }
00157
00158 {
00159
00160 sprintf( chStuff , "ABUNDANCES ISM " );
00161 if( nPrintTest )
00162 fprintf(ioQQQ , "%s\n" , chStuff );
00163 p.setline(chStuff);
00164 p.set_point(4);
00165 ParseAbundances( p );
00166 }
00167
00168 {
00169
00170 sprintf( chStuff , "CONSTANT GRAIN TEMPERATURE 20K " );
00171 if( nPrintTest )
00172 fprintf(ioQQQ , "%s\n" , chStuff );
00173 p.setline(chStuff);
00174 p.set_point(4);
00175 ParseConstant( p );
00176 }
00177
00178
00179 sprintf( chStuff , "MONITOR EDEN 0.625 " );
00180 if( nPrintTest )
00181 fprintf(ioQQQ , "%s\n" , chStuff );
00182 p.setline(chStuff);
00183 ParseMonitorResults(p);
00184
00185
00186 sprintf( chStuff , "MONITOR MOLECULAR FRACTION H2 -1.528 " );
00187 if( nPrintTest )
00188 fprintf(ioQQQ , "%s\n" , chStuff );
00189 p.setline(chStuff);
00190 ParseMonitorResults(p);
00191
00192
00193 sprintf( chStuff , "MONITOR COLUMN CO 0.987 " );
00194 if( nPrintTest )
00195 fprintf(ioQQQ , "%s\n" , chStuff );
00196 p.setline(chStuff);
00197 ParseMonitorResults(p);
00198
00199
00200 sprintf( chStuff , "MONITOR EDEN 0.625 " );
00201 if( nPrintTest )
00202 fprintf(ioQQQ , "%s\n" , chStuff );
00203 p.setline(chStuff);
00204 ParseMonitorResults(p);
00205
00206
00207 sprintf( chStuff , "MONITOR HYDROGEN 1 TEMPERATURE 50K " );
00208 if( nPrintTest )
00209 fprintf(ioQQQ , "%s\n" , chStuff );
00210 p.setline(chStuff);
00211 ParseMonitorResults(p);
00212 }
00213
00214 else
00215 {
00216 {
00217
00218 sprintf( chStuff , "HDEN 4 " );
00219 if( nPrintTest )
00220 fprintf(ioQQQ , "%s\n" , chStuff );
00221 p.setline(chStuff);
00222 p.set_point(4);
00223 ParseHDEN( p );
00224 }
00225
00226 {
00227
00228 sprintf( chStuff , "CONSTANT TEMPER 4 " );
00229 if( nPrintTest )
00230 fprintf(ioQQQ , "%s\n" , chStuff );
00231 p.setline(chStuff);
00232 p.set_point(4);
00233 ParseConstant( p );
00234 }
00235
00236 {
00237
00238 sprintf( chStuff , "TABLE AGN " );
00239 if( nPrintTest )
00240 fprintf(ioQQQ , "%s\n" , chStuff );
00241 p.setline(chStuff);
00242 p.set_point(4);
00243 ParseTable( p);
00244 }
00245
00246 {
00247
00248 sprintf( chStuff , "IONIZATION PARAMETER -2 " );
00249 if( nPrintTest )
00250 fprintf(ioQQQ , "%s\n" , chStuff );
00251 p.setline(chStuff);
00252 p.set_point(4);
00253 ParseIonParI( p);
00254 }
00255
00256 {
00257
00258 sprintf( chStuff , "ABUNDANCES OLD SOLAR 84 " );
00259 if( nPrintTest )
00260 fprintf(ioQQQ , "%s\n" , chStuff );
00261 p.setline(chStuff);
00262 p.set_point(4);
00263 ParseAbundances(p);
00264 }
00265
00266 {
00267
00268
00269
00270 sprintf( chStuff , "STOP LYMAN OPTICAL -4 " );
00271 if( nPrintTest )
00272 fprintf(ioQQQ , "%s\n" , chStuff );
00273 p.setline(chStuff);
00274 p.set_point(4);
00275 ParseStop(p);
00276 }
00277
00278 {
00279
00280 sprintf( chStuff , "STOP ZONE 2 " );
00281 if( nPrintTest )
00282 fprintf(ioQQQ , "%s\n" , chStuff );
00283 p.setline(chStuff);
00284 p.set_point(4);
00285 ParseStop(p);
00286 }
00287
00288 {
00289
00290 sprintf( chStuff , "SET DR 0 " );
00291 if( nPrintTest )
00292 fprintf(ioQQQ , "%s\n" , chStuff );
00293 p.setline(chStuff);
00294 p.set_point(4);
00295 ParseSet(p);
00296 }
00297
00298
00299 sprintf( chStuff , "MONITOR HYDROGEN 1 IONIZATION -3.052 " );
00300 if( nPrintTest )
00301 fprintf(ioQQQ , "%s\n" , chStuff );
00302 p.setline(chStuff);
00303 ParseMonitorResults(p);
00304
00305 sprintf( chStuff , "MONITOR HELIUM 2 IONIZATION -1.076 " );
00306 if( nPrintTest )
00307 fprintf(ioQQQ , "%s\n" , chStuff );
00308 p.setline(chStuff);
00309 ParseMonitorResults(p);
00310
00311 sprintf( chStuff , "MONITOR CARBON 2 IONIZATION -2.377 " );
00312 if( nPrintTest )
00313 fprintf(ioQQQ , "%s\n" , chStuff );
00314 p.setline(chStuff);
00315 ParseMonitorResults(p);
00316
00317
00318 sprintf( chStuff , "MONITOR CARBON 3 IONIZATION -0.596 " );
00319 if( nPrintTest )
00320 fprintf(ioQQQ , "%s\n" , chStuff );
00321 p.setline(chStuff);
00322 ParseMonitorResults(p);
00323
00324
00325 sprintf( chStuff , "MONITOR CARBON 4 IONIZATION -0.361 " );
00326 if( nPrintTest )
00327 fprintf(ioQQQ , "%s\n" , chStuff );
00328 p.setline(chStuff);
00329 ParseMonitorResults(p);
00330
00331
00332 sprintf( chStuff , "MONITOR CARBON 5 IONIZATION -0.514 " );
00333 if( nPrintTest )
00334 fprintf(ioQQQ , "%s\n" , chStuff );
00335 p.setline(chStuff);
00336 ParseMonitorResults(p);
00337
00338
00339
00340 sprintf( chStuff , "MONITOR OXYGEN 3 IONIZATION -0.935 " );
00341 if( nPrintTest )
00342 fprintf(ioQQQ , "%s\n" , chStuff );
00343 p.setline(chStuff);
00344 ParseMonitorResults(p);
00345
00346
00347 sprintf( chStuff , "MONITOR OXYGEN 4 IONIZATION -0.148 " );
00348 if( nPrintTest )
00349 fprintf(ioQQQ , "%s\n" , chStuff );
00350 p.setline(chStuff);
00351 ParseMonitorResults(p);
00352
00353
00354 sprintf( chStuff , "MONITOR OXYGEN 5 IONIZATION -0.790 " );
00355 if( nPrintTest )
00356 fprintf(ioQQQ , "%s\n" , chStuff );
00357 p.setline(chStuff);
00358 ParseMonitorResults(p);
00359
00360
00361
00362 sprintf( chStuff , "MONITOR LINE \"CA B\" 4861.36 1.108 " );
00363 if( nPrintTest )
00364 fprintf(ioQQQ , "%s\n" , chStuff );
00365
00366 p.setline(chStuff);
00367 ParseMonitorResults(p);
00368
00369
00370
00371
00372
00373
00374 sprintf( chStuff , "MONITOR LINE \"O 3\" 5007 2.695 " );
00375 if( nPrintTest )
00376 fprintf(ioQQQ , "%s\n" , chStuff );
00377
00378 p.setline(chStuff);
00379 ParseMonitorResults(p);
00380
00381 sprintf( chStuff , "MONITOR HTOT -15.019" );
00382 if( nPrintTest )
00383 fprintf(ioQQQ , "%s\n" , chStuff );
00384 p.setline(chStuff);
00385 ParseMonitorResults(p);
00386 }
00387
00388 return;
00389 }