cloudy trunk
|
00001 /* This file is part of Cloudy and is copyright (C)1978-2008 by Gary J. Ferland and 00002 * others. For conditions of distribution and use see copyright notice in license.txt */ 00003 /*ParsePrint parse the print command */ 00004 /*prt_constants print physical constants */ 00005 #include "cddefines.h" 00006 #include "physconst.h" 00007 #include "rfield.h" 00008 #include "iso.h" 00009 #include "iterations.h" 00010 #include "lines.h" 00011 #include "called.h" 00012 #include "elementnames.h" 00013 #include "prt.h" 00014 #include "h2.h" 00015 #include "parse.h" 00016 #include "version.h" 00017 /*prt_constants print physical constants */ 00018 STATIC void prt_constants(void); 00019 00020 void ParsePrint( 00021 /* input line was converted to caps by calling routine */ 00022 char *chCARD_CAPS ) 00023 { 00024 bool lgEOL; 00025 int ipISO; 00026 long int i, 00027 j, 00028 nelem, 00029 num1; 00030 double a; 00031 double sum; 00032 00033 DEBUG_ENTRY( "ParsePrint()" ); 00034 00035 /* >>chng 01 aug 91, had been series of if branches, and could hit more than 00036 * one key - dangerous! changed to else if so only one hit per line possible */ 00037 if( nMatch("AGES",chCARD_CAPS) ) 00038 { 00039 /* print all estimates of cloud timescales */ 00040 prt.lgPrnAges = true; 00041 } 00042 00043 else if( nMatch("ARRA",chCARD_CAPS) ) 00044 { 00045 /* print arrays for ionization balance of heavy elements */ 00046 if( nMatch( "ONLY" , chCARD_CAPS ) ) 00047 { 00048 /* returns element number on C scale */ 00049 if( (nelem = GetElem(chCARD_CAPS))<0 ) 00050 { 00051 fprintf(ioQQQ,"An element name must appear on this PRINT ARRAYS ONLY xx command.\n"); 00052 cdEXIT(EXIT_FAILURE); 00053 } 00054 /* have the element number, turn on its print */ 00055 prt.lgPrtArry[nelem] = true; 00056 } 00057 else 00058 { 00059 /* this flag, print arrays for all elements */ 00060 for( nelem=ipHYDROGEN; nelem<LIMELM; ++nelem ) 00061 { 00062 prt.lgPrtArry[nelem] = true; 00063 } 00064 } 00065 } 00066 00067 else if( nMatch("CITA",chCARD_CAPS) ) 00068 { 00069 /* the print citations command */ 00070 fprintf( ioQQQ, "\n\nCloudy is a research project that involves the creative" 00071 " efforts of many people. It should be cited as follows:\n" ); 00072 fprintf( ioQQQ, "Calculations were performed with version %s of Cloudy," 00073 " last described by %s.\n\n", 00074 t_version::Inst().chVersion, 00075 t_version::Inst().chCitationShort); 00076 fprintf( ioQQQ, "The reference is:\n%s\n\n", t_version::Inst().chCitation ); 00077 fprintf( ioQQQ, "In Latex this is:\n%s\n\n", t_version::Inst().chCitationLatex ); 00078 } 00079 00080 else if( nMatch("COLU",chCARD_CAPS) && nMatch("DENS",chCARD_CAPS) ) 00081 { 00082 if( nMatch(" ON ",chCARD_CAPS) ) 00083 { 00084 /* print column densities of elements - this is default */ 00085 prt.lgPrintColumns = true; 00086 } 00087 else if( nMatch(" OFF",chCARD_CAPS) ) 00088 { 00089 /* print column densities of elements */ 00090 prt.lgPrintColumns = false; 00091 } 00092 } 00093 00094 else if( nMatch("VERS",chCARD_CAPS) ) 00095 { 00096 /* print compiler and code version information */ 00097 fprintf( ioQQQ, "\nThis is Cloudy %s\n%s\n\n" , 00098 t_version::Inst().chVersion, 00099 t_version::Inst().chInfo ); 00100 } 00101 00102 /* option to print departure coefficients in addition to level pops 00103 * keywords He-like to do He-like sequence element, else do h-like 00104 * element name, if not recognized, does hydrogen 00105 * so with no options prints hydrogen itself */ 00106 else if( nMatch("DEPA",chCARD_CAPS) ) 00107 { 00108 if( nMatch("HE-L",chCARD_CAPS) ) 00109 { 00110 ipISO = ipHE_LIKE; 00111 } 00112 else 00113 { 00114 ipISO = ipH_LIKE; 00115 } 00116 00117 /* now check for element name */ 00118 nelem = GetElem( chCARD_CAPS ); 00119 00120 /* return value is < 0 if no element recognized - in this case use root of sequence */ 00121 nelem = MAX2( nelem, ipISO ); 00122 00123 /* print departure coefficients instead of hydrogen level populations */ 00124 iso.lgPrtDepartCoef[ipISO][nelem] = true; 00125 } 00126 00127 else if( nMatch("CONS",chCARD_CAPS) ) 00128 { 00129 /* print physical constants, routine is below */ 00130 prt_constants(); 00131 } 00132 00133 else if( nMatch("ERRO",chCARD_CAPS) ) 00134 { 00135 /* print errors to special window */ 00136 lgPrnErr = true; 00137 } 00138 00139 else if( nMatch("HEAT",chCARD_CAPS) ) 00140 { 00141 /* print heat arrays */ 00142 prt.lgPrintHeating = true; 00143 } 00144 00145 else if( nMatch("PATH",chCARD_CAPS) ) 00146 { 00147 /* print the path */ 00148 cpu.printDataPath(); 00149 } 00150 00151 /*else if( nMatch("H-LI",chCARD_CAPS))*/ 00152 else if( nMatch("POPU",chCARD_CAPS)) 00153 { 00154 if( nMatch("HE-L",chCARD_CAPS) ) 00155 { 00156 ipISO = ipHE_LIKE; 00157 } 00158 else 00159 { 00160 ipISO = ipH_LIKE; 00161 } 00162 00163 /* now check for element name */ 00164 nelem = GetElem( chCARD_CAPS ); 00165 /* return value is < 0 if no element recognized - in this case use H */ 00166 nelem = MAX2(0,nelem); 00167 00168 /* if no element specified but he-like iso, then use helium */ 00169 if( nelem==0 && ipISO==ipHE_LIKE ) 00170 nelem = ipHELIUM; 00171 00172 if( nelem < ipISO ) 00173 { 00174 fprintf(ioQQQ,"This iso-sequence (%s) and element (%s) are impossible.\n", 00175 elementnames.chElementName[ipISO], 00176 elementnames.chElementName[nelem]); 00177 cdEXIT(EXIT_FAILURE); 00178 } 00179 00180 /* print hydrogenic H-like level populations */ 00181 iso.lgPrtLevelPops[ipISO][nelem] = true; 00182 } 00183 00184 /* option to only print last iteration */ 00185 else if( nMatch("LAST",chCARD_CAPS) ) 00186 { 00187 prt.lgPrtLastIt = true; 00188 } 00189 00190 /* the print line command as several options */ 00191 else if( nMatch("LINE",chCARD_CAPS) ) 00192 { 00193 if( nMatch(" ALL",chCARD_CAPS) ) 00194 { 00195 /* turn on all printed components */ 00196 prt.lgPrnPump = true; 00197 prt.lgPrnColl = true; 00198 prt.lgPrnHeat = true; 00199 } 00200 00201 else if( nMatch("CELL",chCARD_CAPS) ) 00202 { 00203 /* print line cell on physics scale, first cell in continuum is 1 00204 * give all lines in this cell */ 00205 prt.lgPrnLineCell = true; 00206 i = 5; 00207 prt.nPrnLineCell = (long)FFmtRead(chCARD_CAPS,&i,INPUT_LINE_LENGTH,&lgEOL); 00208 if( lgEOL ) 00209 NoNumb( chCARD_CAPS ); 00210 if( prt.nPrnLineCell < 1 ) 00211 { 00212 /* non-positive cells are not allowed */ 00213 fprintf(ioQQQ , "The cell number on the PRINT LINE CELL command must be positive.\n"); 00214 fprintf(ioQQQ , "The cell number was %li.\n" , prt.nPrnLineCell); 00215 } 00216 } 00217 00218 else if( nMatch("COLL",chCARD_CAPS) ) 00219 { 00220 /* also print collisional contributions */ 00221 prt.lgPrnColl = true; 00222 } 00223 00224 else if( nMatch("COLU",chCARD_CAPS) ) 00225 { 00226 /* option to print main line array as a single column */ 00227 prt.lgPrtLineArray = false; 00228 /* this also has an option - liNEAR - to print linear quantity 00229 * in exponential format */ 00230 if( nMatch("NEAR",chCARD_CAPS) ) 00231 prt.lgPrtLineLog = false; 00232 } 00233 00234 /* force printing emergent intensities */ 00235 else if( nMatch("EMER",chCARD_CAPS) && nMatch("GENT",chCARD_CAPS) ) 00236 { 00237 prt.lgPrtLineEmergent = true; 00238 LineSave.lgLineEmergent = true; 00239 } 00240 00241 else if( nMatch("FAIN",chCARD_CAPS) && !(nMatch("OPTI",chCARD_CAPS)&&nMatch("DEPT",chCARD_CAPS)) ) 00242 { 00243 /* print line faint - above do not trigger on optical depth 00244 * option to adjust intensity of faintest line to print */ 00245 /* >> 01 feb 01, move print faint into print line faint */ 00246 /* faintest line, rel to norm line, to print; either linear of log */ 00247 i = 5; 00248 a = FFmtRead(chCARD_CAPS,&i,INPUT_LINE_LENGTH,&lgEOL); 00249 00250 /* option for, if no number, keyword=" OFF", to print all lines */ 00251 if( lgEOL ) 00252 { 00253 if( nMatch(" OFF",chCARD_CAPS) ) 00254 { 00255 prt.lgFaintOn = false; 00256 } 00257 else 00258 { 00259 fprintf( ioQQQ, 00260 " There faintest line to print must be on this line, sorry.\n" ); 00261 cdEXIT(EXIT_FAILURE); 00262 } 00263 } 00264 00265 prt.lgFntSet = true; 00266 if( a <= 0. ) 00267 { 00268 prt.TooFaint = (realnum)pow(10.,a); 00269 } 00270 else 00271 { 00272 prt.TooFaint = (realnum)a; 00273 } 00274 } 00275 00276 else if( nMatch("FLUX",chCARD_CAPS) && nMatch("EART",chCARD_CAPS)) 00277 { 00278 /* print line flux seen at earth */ 00279 prt.lgPrintFluxEarth = true; 00280 } 00281 00282 else if( nMatch(" H2",chCARD_CAPS) && nMatch("ELEC",chCARD_CAPS) ) 00283 { 00284 /* print H2 electronic lines too - -1 since number of electronic 00285 * levels is not yet known, will set when H2 actually called */ 00286 h2.nElecLevelOutput = -1; 00287 } 00288 00289 else if( nMatch("HEAT",chCARD_CAPS) ) 00290 { 00291 /* also print heating contributions */ 00292 prt.lgPrnHeat = true; 00293 } 00294 00295 else if( nMatch("INWA",chCARD_CAPS) ) 00296 { 00297 /* also print inward contributions */ 00298 prt.lgPrnInwd = true; 00299 } 00300 00301 else if( nMatch("OPTI",chCARD_CAPS) && nMatch("DEPT",chCARD_CAPS) ) 00302 { 00303 /* print line optical depths, with option for smallest to print */ 00304 if( nMatch(" OFF",chCARD_CAPS) ) 00305 { 00306 /* turn off or on printing of optical depths - default off */ 00307 prt.lgPrtTau = false; 00308 } 00309 else 00310 { 00311 prt.lgPrtTau = true; 00312 } 00313 if( nMatch("FAIN",chCARD_CAPS) ) 00314 { 00315 /* log of faintest optical depth, default is linear value of 0.1 */ 00316 i = 5; 00317 prt.PrtTauFnt = (realnum)pow(10.,FFmtRead(chCARD_CAPS,&i,INPUT_LINE_LENGTH,&lgEOL)); 00318 if( lgEOL ) 00319 { 00320 fprintf( ioQQQ, " There must be a number for the FAINT option. They are HEAD and ZONE. Sorry.\n" ); 00321 cdEXIT(EXIT_FAILURE); 00322 } 00323 } 00324 } 00325 00326 else if( nMatch("PUMP",chCARD_CAPS) ) 00327 { 00328 /* also print pump contributions */ 00329 prt.lgPrnPump = true; 00330 } 00331 00332 else if( nMatch("SORT",chCARD_CAPS) ) 00333 { 00334 /* >>chng 01 aug 18, print sort command works after all these years, 00335 * sort by wavelength or intensity */ 00336 /* turn on sorting with respect to wavelength */ 00337 prt.lgSortLines = true; 00338 if( nMatch("WAVE",chCARD_CAPS) ) 00339 { 00340 /* sort by wavelength */ 00341 /* remember which one to do */ 00342 prt.lgSortLineIntensity = false; 00343 prt.lgSortLineWavelength = true; 00344 00345 /* wavelength has range option */ 00346 /* option to only certain print range of lines */ 00347 if( nMatch("RANG",chCARD_CAPS) ) 00348 { 00349 i = 5; 00350 prt.wlSort1 = (realnum)FFmtRead(chCARD_CAPS,&i,INPUT_LINE_LENGTH,&lgEOL); 00351 /* line was entered, look for possible micron or cm label */ 00352 if( chCARD_CAPS[i-1] == 'M' ) 00353 { 00354 /* microns */ 00355 prt.wlSort1 *= 1e4; 00356 } 00357 else if( chCARD_CAPS[i-1] == 'C' ) 00358 { 00359 /* microns */ 00360 prt.wlSort1 *= 1e8; 00361 } 00362 prt.wlSort2 = (realnum)FFmtRead(chCARD_CAPS,&i,INPUT_LINE_LENGTH,&lgEOL); 00363 /* line was entered, look for possible micron or cm label */ 00364 if( chCARD_CAPS[i-1] == 'M' ) 00365 { 00366 /* microns */ 00367 prt.wlSort2 *= 1e4; 00368 } 00369 else if( chCARD_CAPS[i-1] == 'C' ) 00370 { 00371 /* microns */ 00372 prt.wlSort2 *= 1e8; 00373 } 00374 if( lgEOL ) 00375 { 00376 fprintf( ioQQQ, " There must be two numbers for the RANGE option, the lower and upper wavelength. Sorry.\n" ); 00377 cdEXIT(EXIT_FAILURE); 00378 } 00379 if( prt.wlSort1 <0. || prt.wlSort2 <0. || 00380 prt.wlSort1 >= prt.wlSort2 ) 00381 { 00382 fprintf( ioQQQ, " The lower and upper wavelength must be positive and in the correct order. Sorry.\n" ); 00383 cdEXIT(EXIT_FAILURE); 00384 } 00385 } 00386 else 00387 { 00388 prt.wlSort1 = -1; 00389 prt.wlSort2 = 1e30f; 00390 } 00391 } 00392 else if( nMatch("INTE",chCARD_CAPS) ) 00393 { 00394 /* sort by intensity/luminosity */ 00395 /* remember which one to do */ 00396 prt.lgSortLineIntensity = true; 00397 prt.lgSortLineWavelength = false; 00398 } 00399 else 00400 { 00401 fprintf( ioQQQ, "I can sort by wavelength or intensity - one must be specified.\nSorry.\n" ); 00402 cdEXIT(EXIT_FAILURE); 00403 } 00404 } 00405 00406 else if( nMatch(" SUM",chCARD_CAPS) ) 00407 { 00408 /* option to read in set of lines to sum over */ 00409 sum = PrtLineSum( "READ" ); 00410 /* sum is not used anywhere, following makes lint shut up */ 00411 if( false ) fprintf(ioQQQ,"%.2e\n", sum); 00412 } 00413 00414 else if( nMatch("SURF",chCARD_CAPS) && nMatch("BRIG",chCARD_CAPS) ) 00415 { 00416 /* print surface brightness rather than 4pi J */ 00417 prt.lgSurfaceBrightness = true; 00418 /* default is per sr, arcsec option changes to sq arcsec */ 00419 if( nMatch("ARCS",chCARD_CAPS ) ) 00420 { 00421 /* use sr */ 00422 prt.lgSurfaceBrightness_SR = false; 00423 } 00424 else 00425 { 00426 /* use sq arcsec */ 00427 prt.lgSurfaceBrightness_SR = true; 00428 } 00429 } 00430 else 00431 { 00432 fprintf( ioQQQ, "One of the keys should have appeared. \nPlease consult Hazy.\nSorry.\n" ); 00433 cdEXIT(EXIT_FAILURE); 00434 } 00435 } 00436 00437 /* print maser lines when TAV is called */ 00438 else if( nMatch("MASE",chCARD_CAPS) ) 00439 { 00440 prt.lgPrtMaser = true; 00441 } 00442 00443 else if( nMatch("ONLY",chCARD_CAPS) ) 00444 { 00445 if( nMatch("ZONE",chCARD_CAPS) ) 00446 prt.lgOnlyZone = true; 00447 00448 else if( nMatch("HEAD",chCARD_CAPS) ) 00449 prt.lgOnlyHead = true; 00450 00451 else 00452 { 00453 fprintf( ioQQQ, " There must be a keyword for the ONLY option. They are HEAD and ZONE. Sorry.\n" ); 00454 cdEXIT(EXIT_FAILURE); 00455 } 00456 } 00457 00458 else if( nMatch("STAR",chCARD_CAPS) ) 00459 { 00460 /* start printout at specified zone */ 00461 called.lgTalk = false; 00462 prt.lgPrtStart = true; 00463 i = 5; 00464 prt.nstart = (long int)FFmtRead(chCARD_CAPS,&i,INPUT_LINE_LENGTH,&lgEOL); 00465 if( lgEOL ) 00466 { 00467 fprintf( ioQQQ, 00468 " The zone on which the print is to start MUST be entered on this line. Sorry.\n" ); 00469 cdEXIT(EXIT_FAILURE); 00470 } 00471 } 00472 00473 /* print continuum command */ 00474 else if( nMatch("CONT",chCARD_CAPS) ) 00475 { 00476 /* >>chng 01 jun 30, logic of keys swapped around, so no keyword gets nFnu info */ 00477 /* print continuum diffuse turns on nFnu continuum at many energies */ 00478 if( nMatch("BLOC",chCARD_CAPS) ) 00479 { 00480 /* option to print emergent continuum at end of calculation*/ 00481 prt.lgPrtCont = true; 00482 } 00483 else if( nMatch("INDI" , chCARD_CAPS )) 00484 { 00485 /* option to print lines and continuum that go into each continuum 00486 * index the continuum index is the cell within the continuum 00487 * array - this identifies lines that occur within each 00488 * continuum cell */ 00489 prt.lgPrtContIndices = true; 00490 /* these are lower and upper limits to the energy range in Rydbergs. 00491 * they are the first and second number on the command line, lower and 00492 * upper bounds of the code are used if not specified */ 00493 i = 5; 00494 /* if no number on line then zero is returned, this is fine, since 00495 * we want the lower energy bound of the code */ 00496 prt.lgPrtContIndices_lo_E = (realnum)FFmtRead(chCARD_CAPS,&i,INPUT_LINE_LENGTH,&lgEOL); 00497 prt.lgPrtContIndices_hi_E = (realnum)FFmtRead(chCARD_CAPS,&i,INPUT_LINE_LENGTH,&lgEOL); 00498 /* if we hit end of line then use high-energy limit of code - that is, 00499 * include all energies */ 00500 if( lgEOL ) 00501 prt.lgPrtContIndices_hi_E = (realnum)rfield.egamry; 00502 } 00503 else 00504 { 00505 /* option to print continuum points within emission lines block */ 00506 prt.lgPrnDiff = true; 00507 } 00508 } 00509 00510 else if( nMatch("COOL",chCARD_CAPS) ) 00511 { 00512 /* print cooling array for a specified one */ 00513 i = 5; 00514 prt.nzdump = (long int)FFmtRead(chCARD_CAPS,&i,INPUT_LINE_LENGTH,&lgEOL); 00515 00516 /* dump all zones if argument is zero or not present */ 00517 if( lgEOL ) 00518 { 00519 prt.nzdump = 0; 00520 } 00521 } 00522 00523 else if( nMatch("QUIE",chCARD_CAPS) || (nMatch(" OFF",chCARD_CAPS) && 00524 !nMatch("FAIN" ,chCARD_CAPS)) ) 00525 { 00526 /* in above, there is also a 'print faint off' command 00527 * QUIET or OFF means turn off printout */ 00528 called.lgTalk = false; 00529 } 00530 00531 else if( nMatch(" ON ",chCARD_CAPS) ) 00532 { 00533 /* on means turn on printout, lgTalkIsOK is set true in cdInit, but set 00534 * false in dooptimize. this keeps printout quiet during optimize, 00535 * even when init files are parsed */ 00536 /* called.lgTalkForcedOff was set true with cdTalk(false), if this was 00537 * set then do not respect this command. this is to prevent print on at end 00538 * of init file from turning on print in grids when print is turned off */ 00539 if( called.lgTalkIsOK && !called.lgTalkForcedOff ) 00540 { 00541 called.lgTalk = true; 00542 } 00543 } 00544 00545 else if( nMatch("SHOR",chCARD_CAPS) ) 00546 { 00547 /* make short printout, don't print last */ 00548 prt.lgPrtShort = true; 00549 if( !prt.lgFntSet ) 00550 prt.TooFaint = 0.001f; 00551 } 00552 00553 else if( nMatch("EVER",chCARD_CAPS) ) 00554 { 00555 /* print every nth zone */ 00556 i = 5; 00557 num1 = (long int)FFmtRead(chCARD_CAPS,&i,INPUT_LINE_LENGTH,&lgEOL); 00558 if( lgEOL ) 00559 { 00560 fprintf( ioQQQ, " The number of zones to print MUST be entered on this line. Sorry.\n" ); 00561 cdEXIT(EXIT_FAILURE); 00562 } 00563 00564 iterations.IterPrnt[0] = MAX2(num1,1); 00565 00566 for( j=1; j < iterations.iter_malloc; j++ ) 00567 { 00568 iterations.IterPrnt[j] = (long int)FFmtRead(chCARD_CAPS,&i,INPUT_LINE_LENGTH,&lgEOL); 00569 if( lgEOL ) 00570 { 00571 iterations.IterPrnt[j] = iterations.IterPrnt[j-1]; 00572 } 00573 } 00574 } 00575 00576 /* check if no keywords were recognized. */ 00577 else 00578 { 00579 fprintf( ioQQQ, " There MUST be a keyword on the following line. Sorry.\n" ); 00580 fprintf( ioQQQ, " The PRINT FAINT command is now the PRINT LINE FAINT command.\n" ); 00581 fprintf( ioQQQ, " %80.80s\n", chCARD_CAPS ); 00582 cdEXIT(EXIT_FAILURE); 00583 } 00584 return; 00585 } 00586 00587 /*prt_constants print physical and machine constants */ 00588 STATIC void prt_constants(void) 00589 { 00590 00591 DEBUG_ENTRY( "prt_constants()" ); 00592 00593 fprintf(ioQQQ,"\n\nPhysical constants used by Cloudy, taken from physconst.h\n"); 00594 00595 fprintf(ioQQQ,"EE\t%.15g\n",EE); 00596 fprintf(ioQQQ,"EULER\t%.15g\n",EULER); 00597 fprintf(ioQQQ,"PI\t%.15g\n",PI); 00598 fprintf(ioQQQ,"PI2\t%.15g\n",PI2); 00599 fprintf(ioQQQ,"PI4\t%.15g\n",PI4); 00600 fprintf(ioQQQ,"PI8\t%.15g\n",PI8); 00601 fprintf(ioQQQ,"SQRT2\t%.15g\n",SQRT2); 00602 fprintf(ioQQQ,"SQRTPI\t%.15g\n",SQRTPI); 00603 fprintf(ioQQQ,"SQRTPIBY2\t%.15g\n",SQRTPIBY2); 00604 fprintf(ioQQQ,"LN_TWO\t%.15g\n",LN_TWO); 00605 fprintf(ioQQQ,"LN_TEN\t%.15g\n",LN_TEN); 00606 fprintf(ioQQQ,"LOG10_E\t%.15g\n",LOG10_E); 00607 fprintf(ioQQQ,"OPTDEP2EXTIN\t%.15g\n",OPTDEP2EXTIN); 00608 fprintf(ioQQQ,"RADIAN\t%.15g\n",RADIAN); 00609 fprintf(ioQQQ,"SOLAR_MASS\t%.15g\n",SOLAR_MASS); 00610 fprintf(ioQQQ,"SOLAR_LUMINOSITY\t%.15g\n",SOLAR_LUMINOSITY); 00611 fprintf(ioQQQ,"AU\t%.15g\n",AU); 00612 fprintf(ioQQQ,"ATOMIC_MASS_UNIT\t%.15g\n",ATOMIC_MASS_UNIT); 00613 fprintf(ioQQQ,"ELECTRON_MASS\t%.15g\n",ELECTRON_MASS); 00614 fprintf(ioQQQ,"PROTON_MASS\t%.15g\n",PROTON_MASS); 00615 fprintf(ioQQQ,"BOLTZMANN\t%.15g\n",BOLTZMANN); 00616 fprintf(ioQQQ,"SPEEDLIGHT\t%.15g\n",SPEEDLIGHT); 00617 fprintf(ioQQQ,"HPLANCK\t%.15g\n",HPLANCK); 00618 fprintf(ioQQQ,"GRAV_CONST\t%.15g\n",GRAV_CONST); 00619 fprintf(ioQQQ,"ELEM_CHARGE\t%.15g\n",ELEM_CHARGE); 00620 fprintf(ioQQQ,"RYD_INF\t%.15g\n",RYD_INF); 00621 fprintf(ioQQQ,"HIONPOT\t%.15g\n",HIONPOT); 00622 fprintf(ioQQQ,"PARSEC\t%.15g\n",PARSEC); 00623 fprintf(ioQQQ,"H_BAR \t%.15g\n",H_BAR ); 00624 fprintf(ioQQQ,"ELEM_CHARGE_ESU \t%.15g\n",ELEM_CHARGE_ESU ); 00625 fprintf(ioQQQ,"ELECTRIC_CONST\t%.15g\n",ELECTRIC_CONST); 00626 fprintf(ioQQQ,"HION_LTE_POP\t%.15g\n",HION_LTE_POP); 00627 fprintf(ioQQQ,"SAHA\t%.15g\n",SAHA); 00628 fprintf(ioQQQ,"ERG1CM\t%.15g\n",ERG1CM); 00629 fprintf(ioQQQ,"T1CM\t%.15g\n",T1CM); 00630 fprintf(ioQQQ,"WAVNRYD\t%.15g\n",WAVNRYD); 00631 fprintf(ioQQQ,"RYDLAM\t%.15g\n",RYDLAM); 00632 fprintf(ioQQQ,"EN1RYD\t%.15g\n",EN1RYD); 00633 fprintf(ioQQQ,"TE1RYD\t%.15g\n",TE1RYD); 00634 fprintf(ioQQQ,"EVDEGK\t%.15g\n",EVDEGK); 00635 fprintf(ioQQQ,"EVRYD\t%.15g\n",EVRYD); 00636 fprintf(ioQQQ,"EN1EV\t%.15g\n",EN1EV); 00637 fprintf(ioQQQ,"FR1RYD\t%.15g\n",FR1RYD); 00638 fprintf(ioQQQ,"HNU3C2\t%.15g\n",HNU3C2); 00639 fprintf(ioQQQ,"FR1RYDHYD\t%.15g\n",FR1RYDHYD ); 00640 fprintf(ioQQQ,"HBAReV\t%.15g\n",HBAReV ); 00641 fprintf(ioQQQ,"RYDLAMHYD\t%.15g\n",RYDLAMHYD ); 00642 fprintf(ioQQQ,"STEFAN_BOLTZ\t%.15g\n",STEFAN_BOLTZ); 00643 fprintf(ioQQQ,"FREQ_1EV\t%.15g\n",FREQ_1EV); 00644 fprintf(ioQQQ,"FINE_STRUCTURE\t%.15g\n",FINE_STRUCTURE); 00645 fprintf(ioQQQ,"BOHR_RADIUS_CM\t%.15g\n",BOHR_RADIUS_CM); 00646 fprintf(ioQQQ,"TWO_PHOT_CONST\t%.15g\n",TWO_PHOT_CONST); 00647 fprintf(ioQQQ,"COLL_CONST\t%.15g\n",COLL_CONST); 00648 fprintf(ioQQQ,"MILNE_CONST\t%.15g\n",MILNE_CONST); 00649 fprintf(ioQQQ,"TRANS_PROB_CONST\t%.15g\n",TRANS_PROB_CONST); 00650 fprintf(ioQQQ,"\n"); 00651 00652 fprintf(ioQQQ,"Some other interesting sizes:\n"); 00653 fprintf(ioQQQ,"bool\t%lu\n",(unsigned long)sizeof(bool)); 00654 fprintf(ioQQQ,"char\t%lu\n",(unsigned long)sizeof(char)); 00655 fprintf(ioQQQ,"int\t%lu\n",(unsigned long)sizeof(int)); 00656 fprintf(ioQQQ,"long int\t%lu\n",(unsigned long)sizeof(long int)); 00657 fprintf(ioQQQ,"unsigned int\t%lu\n",(unsigned long)sizeof(unsigned int)); 00658 fprintf(ioQQQ,"float\t%lu\n",(unsigned long)sizeof(sys_float)); 00659 fprintf(ioQQQ,"realnum\t%lu\n",(unsigned long)sizeof(realnum)); 00660 fprintf(ioQQQ,"double\t%lu\n",(unsigned long)sizeof(double)); 00661 fprintf(ioQQQ,"double*\t%lu\n",(unsigned long)sizeof(double*)); 00662 fprintf(ioQQQ,"\n"); 00663 00664 fprintf(ioQQQ,"Some constants from float.h.\n"); 00665 /* some constants from float.h */ 00666 fprintf(ioQQQ,"DBL_DIG \t%i\n", DBL_DIG); /* # of decimal digits of precision */ 00667 fprintf(ioQQQ,"DBL_EPSILON \t%.15g\n",DBL_EPSILON); /* smallest such that 1.0+DBL_EPSILON != 1.0 */ 00668 fprintf(ioQQQ,"DBL_MANT_DIG\t%i\n",DBL_MANT_DIG); /* # of bits in mantissa */ 00669 fprintf(ioQQQ,"DBL_MAX\t%.15g\n", DBL_MAX); /* max value */ 00670 fprintf(ioQQQ,"DBL_MAX_10_EXP\t%i\n", DBL_MAX_10_EXP); /* max decimal exponent */ 00671 fprintf(ioQQQ,"DBL_MAX_EXP\t%i\n", DBL_MAX_EXP); /* max binary exponent */ 00672 fprintf(ioQQQ,"DBL_MIN\t%.15g\n", DBL_MIN); /* min positive value */ 00673 00674 fprintf(ioQQQ,"FLT_DIG\t%i\n", FLT_DIG); /* # of decimal digits of precision */ 00675 fprintf(ioQQQ,"FLT_EPSILON\t%.15g\n", FLT_EPSILON); /* smallest such that 1.0+FLT_EPSILON != 1.0 */ 00676 fprintf(ioQQQ,"FLT_MANT_DIG\t%i\n", FLT_MANT_DIG); /* # of bits in mantissa */ 00677 fprintf(ioQQQ,"FLT_MAX\t%.15g\n", FLT_MAX); /* max value */ 00678 fprintf(ioQQQ,"FLT_MAX_10_EXP\t%i\n", FLT_MAX_10_EXP);/* max decimal exponent */ 00679 fprintf(ioQQQ,"FLT_MAX_EXP\t%i\n", FLT_MAX_EXP); /* max binary exponent */ 00680 fprintf(ioQQQ,"FLT_MIN\t%.15g\n", FLT_MIN); /* min positive value */ 00681 00682 fprintf(ioQQQ,"\n\n\n"); 00683 00684 return; 00685 }