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