00001
00002
00003
00004 #include "cddefines.h"
00005 #include "atomfeii.h"
00006 #include "input.h"
00007 #include "assertresults.h"
00008 #include "parse.h"
00009
00010 void ParseTest(char *chCard ,
00011 long int *nqh,
00012 realnum *ar1,
00013 bool lgDSet)
00014 {
00015 char chStuff[INPUT_LINE_LENGTH];
00016
00017 DEBUG_ENTRY( "ParseTest()" );
00018
00019
00020
00021
00022
00023 int nPrintTest = nMatch("PRIN" , chCard );
00024
00025
00026 if( nMatch(" H2 ",chCard) )
00027 {
00028
00029
00030 sprintf( chStuff , "ATOM H2 LIMIT -20 " );
00031 if( nPrintTest )
00032 fprintf(ioQQQ , "%s\n" , chStuff );
00033 ParseAtomH2(chStuff);
00034 }
00035
00036
00037 if( nMatch("FEII",chCard) || nMatch("FE II",chCard) )
00038 {
00039 sprintf( chStuff , "ATOM FEII " );
00040 if( nPrintTest )
00041 fprintf(ioQQQ , "%s\n" , chStuff );
00042 ParseAtomFeII(chStuff);
00043 }
00044
00045
00046 if( nMatch("LARG",chCard) )
00047 {
00048 sprintf( chStuff , "ATOM H-LIKE ELEMENT HYDROGEN LEVELS LIMIT " );
00049 if( nPrintTest )
00050 fprintf(ioQQQ , "%s\n" , chStuff );
00051 ParseAtomISO(ipH_LIKE,chStuff);
00052 }
00053
00054 if( nMatch("MOLE",chCard) )
00055 {
00056 # if 0
00057
00058 sprintf( chStuff , "TRACE TEMPERATURE CONVERGENCE " );
00059 if( nPrintTest )
00060 fprintf(ioQQQ , "%s\n" , chStuff );
00061 ParseTrace(chStuff);
00062 # endif
00063
00064
00065 sprintf( chStuff , "HDEN 5 " );
00066 if( nPrintTest )
00067 fprintf(ioQQQ , "%s\n" , chStuff );
00068 ParseHDEN(chStuff);
00069
00070
00071 sprintf( chStuff , "CONSTANT TEMPER 50K " );
00072 if( nPrintTest )
00073 fprintf(ioQQQ , "%s\n" , chStuff );
00074 ParseConstant(chStuff);
00075
00076
00077 sprintf( chStuff , "TABLE ISM " );
00078 if( nPrintTest )
00079 fprintf(ioQQQ , "%s\n" , chStuff );
00080 ParseTable( nqh,chStuff, ar1);
00081
00082
00083 sprintf( chStuff , "EXTINGUISH 23 " );
00084 if( nPrintTest )
00085 fprintf(ioQQQ , "%s\n" , chStuff );
00086 ParseExtinguish( chStuff );
00087
00088
00089 sprintf( chStuff , "STOP ZONE 2 " );
00090 if( nPrintTest )
00091 fprintf(ioQQQ , "%s\n" , chStuff );
00092 ParseStop(chStuff);
00093
00094
00095 sprintf( chStuff , "SET DR 0 " );
00096 if( nPrintTest )
00097 fprintf(ioQQQ , "%s\n" , chStuff );
00098 ParseSet(chStuff);
00099
00100
00101 sprintf( chStuff , "CASE B " );
00102 if( nPrintTest )
00103 fprintf(ioQQQ , "%s\n" , chStuff );
00104 ParseCaseB(chStuff);
00105
00106
00107 sprintf( chStuff , "COSMIC RAY BACKGROUND " );
00108 if( nPrintTest )
00109 fprintf(ioQQQ , "%s\n" , chStuff );
00110 ParseCosmicRays(chStuff);
00111
00112
00113 sprintf( chStuff , "ABUNDANCES ISM " );
00114 if( nPrintTest )
00115 fprintf(ioQQQ , "%s\n" , chStuff );
00116 ParseAbundances(chStuff , lgDSet);
00117
00118
00119 sprintf( chStuff , "CONSTANT GRAIN TEMPERATURE 20K " );
00120 if( nPrintTest )
00121 fprintf(ioQQQ , "%s\n" , chStuff );
00122 ParseConstant(chStuff);
00123
00124
00125 sprintf( input.chCARDCAPS , "ASSERT EDEN 0.528 " );
00126 if( nPrintTest )
00127 fprintf(ioQQQ , "%s\n" , input.chCARDCAPS );
00128 ParseAssertResults();
00129
00130
00131 sprintf( input.chCARDCAPS , "ASSERT MOLECULAR FRACTION H2 -1.193 " );
00132 if( nPrintTest )
00133 fprintf(ioQQQ , "%s\n" , input.chCARDCAPS );
00134 ParseAssertResults();
00135
00136
00137 sprintf( input.chCARDCAPS , "ASSERT COLUMN CO 1.214 " );
00138 if( nPrintTest )
00139 fprintf(ioQQQ , "%s\n" , input.chCARDCAPS );
00140 ParseAssertResults();
00141
00142
00143 sprintf( input.chCARDCAPS , "ASSERT EDEN 0.528 " );
00144 if( nPrintTest )
00145 fprintf(ioQQQ , "%s\n" , input.chCARDCAPS );
00146 ParseAssertResults();
00147
00148
00149 sprintf( input.chCARDCAPS , "ASSERT HYDROGEN 1 TEMPERATURE 50K " );
00150 if( nPrintTest )
00151 fprintf(ioQQQ , "%s\n" , input.chCARDCAPS );
00152 ParseAssertResults();
00153 }
00154
00155 else
00156 {
00157
00158 sprintf( chStuff , "HDEN 4 " );
00159 if( nPrintTest )
00160 fprintf(ioQQQ , "%s\n" , chStuff );
00161 ParseHDEN(chStuff);
00162
00163
00164 sprintf( chStuff , "CONSTANT TEMPER 4 " );
00165 if( nPrintTest )
00166 fprintf(ioQQQ , "%s\n" , chStuff );
00167 ParseConstant(chStuff);
00168
00169
00170 sprintf( chStuff , "TABLE AGN " );
00171 if( nPrintTest )
00172 fprintf(ioQQQ , "%s\n" , chStuff );
00173 ParseTable( nqh,chStuff, ar1);
00174
00175
00176 sprintf( chStuff , "IONIZATION PARAMETER -2 " );
00177 if( nPrintTest )
00178 fprintf(ioQQQ , "%s\n" , chStuff );
00179 ParseIonPar( nqh,chStuff, ar1);
00180
00181
00182 sprintf( chStuff , "ABUNDANCES OLD SOLAR 84 " );
00183 if( nPrintTest )
00184 fprintf(ioQQQ , "%s\n" , chStuff );
00185 ParseAbundances(chStuff,lgDSet);
00186
00187
00188
00189
00190 sprintf( chStuff , "STOP LYMAN OPTICAL -4 " );
00191 if( nPrintTest )
00192 fprintf(ioQQQ , "%s\n" , chStuff );
00193 ParseStop(chStuff);
00194
00195
00196 sprintf( chStuff , "STOP ZONE 2 " );
00197 if( nPrintTest )
00198 fprintf(ioQQQ , "%s\n" , chStuff );
00199 ParseStop(chStuff);
00200
00201
00202 sprintf( chStuff , "SET DR 0 " );
00203 if( nPrintTest )
00204 fprintf(ioQQQ , "%s\n" , chStuff );
00205 ParseSet(chStuff);
00206
00207
00208 sprintf( input.chCARDCAPS , "ASSERT HYDROGEN 1 IONIZATION -3.040 " );
00209 if( nPrintTest )
00210 fprintf(ioQQQ , "%s\n" , input.chCARDCAPS );
00211 ParseAssertResults();
00212
00213 sprintf( input.chCARDCAPS , "ASSERT HELIUM 2 IONIZATION -1.067 " );
00214 if( nPrintTest )
00215 fprintf(ioQQQ , "%s\n" , input.chCARDCAPS );
00216 ParseAssertResults();
00217
00218 sprintf( input.chCARDCAPS , "ASSERT CARBON 2 IONIZATION -2.301 " );
00219 if( nPrintTest )
00220 fprintf(ioQQQ , "%s\n" , input.chCARDCAPS );
00221 ParseAssertResults();
00222
00223
00224 sprintf( input.chCARDCAPS , "ASSERT CARBON 3 IONIZATION -0.560 " );
00225 if( nPrintTest )
00226 fprintf(ioQQQ , "%s\n" , input.chCARDCAPS );
00227 ParseAssertResults();
00228
00229
00230 sprintf( input.chCARDCAPS , "ASSERT CARBON 4 IONIZATION -0.373 " );
00231 if( nPrintTest )
00232 fprintf(ioQQQ , "%s\n" , input.chCARDCAPS );
00233 ParseAssertResults();
00234
00235
00236 sprintf( input.chCARDCAPS , "ASSERT CARBON 5 IONIZATION -0.530 " );
00237 if( nPrintTest )
00238 fprintf(ioQQQ , "%s\n" , input.chCARDCAPS );
00239 ParseAssertResults();
00240
00241
00242 sprintf( input.chCARDCAPS , "ASSERT OXYGEN 3 IONIZATION -0.861 " );
00243 if( nPrintTest )
00244 fprintf(ioQQQ , "%s\n" , input.chCARDCAPS );
00245 ParseAssertResults();
00246
00247
00248 sprintf( input.chCARDCAPS , "ASSERT OXYGEN 4 IONIZATION -0.157 " );
00249 if( nPrintTest )
00250 fprintf(ioQQQ , "%s\n" , input.chCARDCAPS );
00251 ParseAssertResults();
00252
00253
00254 sprintf( input.chCARDCAPS , "ASSERT OXYGEN 5 IONIZATION -0.808 " );
00255 if( nPrintTest )
00256 fprintf(ioQQQ , "%s\n" , input.chCARDCAPS );
00257 ParseAssertResults();
00258
00259
00260
00261 sprintf( input.chCARDCAPS , "ASSERT LINE \"CA B\" 4861 1.108 " );
00262 if( nPrintTest )
00263 fprintf(ioQQQ , "%s\n" , input.chCARDCAPS );
00264
00265 strcpy( input.chOrgCard , input.chCARDCAPS);
00266 ParseAssertResults();
00267
00268
00269
00270
00271
00272 sprintf( input.chCARDCAPS , "ASSERT LINE \"O 3\" 5007 3.18 " );
00273 if( nPrintTest )
00274 fprintf(ioQQQ , "%s\n" , input.chCARDCAPS );
00275
00276 strcpy( input.chOrgCard , input.chCARDCAPS);
00277 ParseAssertResults();
00278
00279 sprintf( input.chCARDCAPS , "ASSERT HTOT -15.011" );
00280 if( nPrintTest )
00281 fprintf(ioQQQ , "%s\n" , input.chCARDCAPS );
00282 ParseAssertResults();
00283 }
00284 return;
00285 }