cloudy trunk
Loading...
Searching...
No Matches
parse_print.cpp
Go to the documentation of this file.
1/* This file is part of Cloudy and is copyright (C)1978-2013 by Gary J. Ferland and
2 * others. For conditions of distribution and use see copyright notice in license.txt */
3/*ParsePrint parse the print command */
4/*prt_constants print physical constants */
5/* PrtMacros - print macros in cddefines.h and their status - *print macros* */
6#include "cddefines.h"
7#include "physconst.h"
8#include "rfield.h"
9#include "rt.h"
10#include "cpu.h"
11#include "iso.h"
12#include "iterations.h"
13#include "lines.h"
14#include "called.h"
15#include "elementnames.h"
16#include "thirdparty.h"
17#include "ionbal.h"
18#include "prt.h"
19#include "h2.h"
20#include "parser.h"
21#include "version.h"
22/*prt_constants print physical constants */
23STATIC void prt_constants(void);
24
25
26// PrtMacros - print macros in cddefines.h and their status - *print macros*
27STATIC void PrtMacros( void )
28{
29
30 DEBUG_ENTRY( "PrtMacros()" );
31
32 fprintf( ioQQQ," PrtMacros:\n FLT_IS_DBL\t");
33# ifdef FLT_IS_DBL
34 fprintf( ioQQQ,"defined.\n");
35# endif
36
37 fprintf( ioQQQ , "\n DMALLOC\t");
38# ifdef DMALLOC
39 fprintf( ioQQQ,"defined");
40# endif
41
42 fprintf( ioQQQ , "\n SYS_CONFIG\t");
43# ifdef SYS_CONFIG
44 fprintf( ioQQQ,"defined");
45# endif
46
47 fprintf( ioQQQ , "\n MPI_GRID_RUN\t");
48# ifdef MPI_GRID_RUN
49 fprintf( ioQQQ,"defined");
50# endif
51
52 fprintf( ioQQQ , "\n USE_GPROF\t");
53# ifdef USE_GPROF
54 fprintf( ioQQQ,"defined");
55# endif
56
57 fprintf( ioQQQ , "\n HAVE_FUNC\t");
58# ifdef HAVE_FUNC
59 fprintf( ioQQQ,"defined");
60# endif
61
62 fprintf( ioQQQ , "\n _MSC_VER\t");
63# ifdef _MSC_VER
64 fprintf( ioQQQ,"defined");
65# endif
66
67 fprintf( ioQQQ , "\n __INTEL_COMPILER\t");
68# ifdef __INTEL_COMPILER
69 fprintf( ioQQQ,"defined");
70# endif
71
72 fprintf( ioQQQ , "\n OLD_ASSERT\t");
73# ifdef OLD_ASSERT
74 fprintf( ioQQQ,"defined");
75# endif
76
77 fprintf( ioQQQ , "\n HAVE_POWI\t");
78# ifdef HAVE_POWI
79 fprintf( ioQQQ,"defined");
80# endif
81
82 fprintf( ioQQQ , "\n HAVE_POW_DOUBLE_INT\t");
83# ifdef HAVE_POW_DOUBLE_INT
84 fprintf( ioQQQ,"defined");
85# endif
86
87 fprintf( ioQQQ , "\n HAVE_POW_DOUBLE_LONG\t");
88# ifdef HAVE_POW_DOUBLE_LONG
89 fprintf( ioQQQ,"defined");
90# endif
91
92 fprintf( ioQQQ , "\n HAVE_POW_FLOAT_INT\t");
93# ifdef HAVE_POW_FLOAT_INT
94 fprintf( ioQQQ,"defined");
95# endif
96
97 fprintf( ioQQQ , "\n HAVE_POW_FLOAT_LONG\t");
98# ifdef HAVE_POW_FLOAT_LONG
99 fprintf( ioQQQ,"defined");
100# endif
101
102 fprintf( ioQQQ , "\n HAVE_POW_FLOAT_DOUBLE\t");
103# ifdef HAVE_POW_FLOAT_DOUBLE
104 fprintf( ioQQQ,"defined");
105# endif
106
107 fprintf( ioQQQ , "\n HAVE_POW_DOUBLE_FLOAT\t");
108# ifdef HAVE_POW_DOUBLE_FLOAT
109 fprintf( ioQQQ,"defined");
110# endif
111
112 fprintf( ioQQQ , "\n");
113
114}
115
117 /* input line was converted to caps by calling routine */
118 Parser &p )
119{
120 int ipISO;
121 long int
122 j,
123 nelem,
124 num1;
125 double a;
126
127 DEBUG_ENTRY( "ParsePrint()" );
128
129 /* >>chng 01 aug 91, had been series of if branches, and could hit more than
130 * one key - dangerous! changed to else if so only one hit per line possible */
131 if( p.nMatch("AGES") )
132 {
133 /* print all estimates of cloud timescales */
134 prt.lgPrnAges = true;
135 }
136
137 else if( p.nMatch("ARRA") )
138 {
139 /* print arrays for ionization balance of heavy elements */
140 if( p.nMatch( "ONLY" ) )
141 {
142 /* returns element number on C scale */
143 if( (nelem = p.GetElem())<0 )
144 {
145 fprintf(ioQQQ,"An element name must appear on this PRINT ARRAYS ONLY xx command.\n");
147 }
148 /* have the element number, turn on its print */
149 prt.lgPrtArry[nelem] = true;
150 }
151 else
152 {
153 /* this flag, print arrays for all elements */
154 for( nelem=ipHYDROGEN; nelem<LIMELM; ++nelem )
155 {
156 prt.lgPrtArry[nelem] = true;
157 }
158 }
159 }
160
161 else if( p.nMatch("CITA") )
162 {
163 prt.lgPrtCitations = true;
164 }
165
166 else if( p.nMatch("COLU") && p.nMatch("DENS") )
167 {
168 if( p.nMatch(" ON ") )
169 {
170 /* print column densities of elements - this is default */
171 prt.lgPrintColumns = true;
172 }
173 else if( p.nMatch(" OFF") )
174 {
175 /* print column densities of elements */
176 prt.lgPrintColumns = false;
177 }
178 }
179
180 /* option to print departure coefficients in addition to level pops
181 * keywords He-like to do He-like sequence element, else do h-like
182 * element name, if not recognized, does hydrogen
183 * so with no options prints hydrogen itself */
184 else if( p.nMatch("DEPA") )
185 {
186 if( p.nMatch("HE-L") )
187 {
188 ipISO = ipHE_LIKE;
189 }
190 else
191 {
192 ipISO = ipH_LIKE;
193 }
194
195 /* now check for element name */
196 nelem = p.GetElem( );
197
198 /* return value is < 0 if no element recognized - in this case use root of sequence */
199 nelem = MAX2( nelem, ipISO );
200
201 /* print departure coefficients instead of hydrogen level populations */
202 iso_sp[ipISO][nelem].lgPrtDepartCoef = true;
203 }
204
205 else if( p.nMatch("CONS") )
206 {
207 /* print physical constants, routine is below */
209 }
210
211 else if( p.nMatch("ERRO") )
212 {
213 /* print errors to special window */
214 lgPrnErr = true;
215 }
216
217 else if( p.nMatch("HEAT") )
218 {
219 /* print heat arrays */
220 prt.lgPrintHeating = true;
221 }
222
223 else if( p.nMatch("PATH") )
224 {
225 /* print the path */
226 cpu.i().printDataPath();
227 }
228
229 /*else if( p.nMatch("H-LI"))*/
230 else if( p.nMatch("POPU"))
231 {
232 if( p.nMatch("HE-L") )
233 {
234 ipISO = ipHE_LIKE;
235 }
236 else
237 {
238 ipISO = ipH_LIKE;
239 }
240
241 /* now check for element name */
242 nelem = p.GetElem( );
243 /* return value is < 0 if no element recognized - in this case use H */
244 nelem = MAX2(0,nelem);
245
246 /* if no element specified but he-like iso, then use helium */
247 if( nelem==0 && ipISO==ipHE_LIKE )
248 nelem = ipHELIUM;
249
250 if( nelem < ipISO )
251 {
252 fprintf(ioQQQ,"This iso-sequence (%s) and element (%s) are impossible.\n",
253 elementnames.chElementName[ipISO],
254 elementnames.chElementName[nelem]);
256 }
257
258 /* print hydrogenic H-like level populations */
259 iso_sp[ipISO][nelem].lgPrtLevelPops = true;
260 }
261
262 /* option to only print last iteration */
263 else if( p.nMatch("LAST") )
264 {
265 prt.lgPrtLastIt = true;
266 }
267
268 /* the print line command as several options */
269 else if( p.nMatch("LINE") )
270 {
271 if( p.nMatch(" ALL") )
272 {
273 /* turn on all printed components */
274 prt.lgPrnPump = true;
275 prt.lgPrnColl = true;
276 prt.lgPrnHeat = true;
277 }
278
279 else if( p.nMatch("CELL") )
280 {
281 /* print line cell on physics scale, first cell in continuum is 1
282 * give all lines in this cell */
283 prt.lgPrnLineCell = true;
284 prt.nPrnLineCell = (long)p.FFmtRead();
285 if( p.lgEOL() )
286 p.NoNumb("cell for line print" );
287 if( prt.nPrnLineCell < 1 )
288 {
289 /* non-positive cells are not allowed */
290 fprintf(ioQQQ , "The cell number on the PRINT LINE CELL command must be positive.\n");
291 fprintf(ioQQQ , "The cell number was %li.\n" , prt.nPrnLineCell);
292 }
293 }
294
295 else if( p.nMatch("COLL") )
296 {
297 /* either print line collisions or print line iso collapsed */
298 /* also print collisional contributions */
299 if( p.nMatch(" ISO") )
300 {
301 /* print predictions from collapsed levels of iso sequences */
302 prt.lgPrnIsoCollapsed = true;
303 }
304 else
305 {
306 /* print line collisions */
307 prt.lgPrnColl = true;
308 }
309 }
310
311 else if( p.nMatch("COLU") )
312 {
313 /* option to print main line array as a single column */
314 prt.lgPrtLineArray = false;
315 /* this also has an option - liNEAR - to print linear quantity
316 * in exponential format */
317 if( p.nMatch("NEAR") )
318 prt.lgPrtLineLog = false;
319 }
320
321 else if( p.nMatch("FAIN") && !(p.nMatch("OPTI")&&p.nMatch("DEPT")) )
322 {
323 /* print line faint - above do not trigger on optical depth
324 * option to adjust intensity of faintest line to print */
325 /* >> 01 feb 01, move print faint into print line faint */
326 /* faintest line, rel to norm line, to print; either linear of log */
327 a = p.FFmtRead();
328
329 /* option for, if no number, keyword=" OFF", to print all lines */
330 if( p.lgEOL() )
331 {
332 if( p.nMatch(" OFF") )
333 {
334 prt.lgFaintOn = false;
335 }
336 else
337 {
338 fprintf( ioQQQ,
339 " There faintest line to print must be on this line, sorry.\n" );
341 }
342 }
343
344 prt.lgFntSet = true;
345 if( a <= 0. || p.nMatch(" LOG") )
346 {
347 prt.TooFaint = (realnum)pow(10.,a);
348 }
349 else
350 {
351 prt.TooFaint = (realnum)a;
352 }
353 }
354
355 else if( p.nMatch("FLUX") && p.nMatch("EART"))
356 {
357 /* print line flux seen at earth */
358 prt.lgPrintFluxEarth = true;
359 }
360
361 else if( p.nMatch(" H2") && p.nMatch("ELEC") )
362 {
363 /* print H2 electronic lines too - -1 since number of electronic
364 * levels is not yet known, will set when H2 actually called */
365 h2.nElecLevelOutput = -1;
366 }
367
368 else if( p.nMatch("HEAT") )
369 {
370 /* also print heating contributions */
371 prt.lgPrnHeat = true;
372 }
373
374 else if( p.nMatch("INWA") )
375 {
376 /* also print inward contributions */
377 prt.lgPrnInwd = true;
378 }
379
380 else if( p.nMatch("OPTI") && p.nMatch("DEPT") )
381 {
382 /* print line optical depths, with option for smallest to print */
383 if( p.nMatch(" OFF") )
384 {
385 /* turn off or on printing of optical depths - default off */
386 prt.lgPrtTau = false;
387 }
388 else
389 {
390 prt.lgPrtTau = true;
391 }
392 if( p.nMatch("FAIN") )
393 {
394 /* log of faintest optical depth, default is linear value of 0.1 */
395 prt.PrtTauFnt = (realnum)pow(10.,p.FFmtRead());
396 if( p.lgEOL() )
397 {
398 fprintf( ioQQQ, " There must be a number for the FAINT option. They are HEAD and ZONE. Sorry.\n" );
400 }
401 }
402 }
403
404 else if( p.nMatch("PUMP") )
405 {
406 /* also print pump contributions */
407 prt.lgPrnPump = true;
408 }
409
410 else if( p.nMatch("SORT") )
411 {
412 /* >>chng 01 aug 18, print sort command works after all these years,
413 * sort by wavelength or intensity */
414 /* turn on sorting with respect to wavelength */
415 prt.lgSortLines = true;
416 if( p.nMatch("WAVE") )
417 {
418 /* sort by wavelength */
419 /* remember which one to do */
420 prt.lgSortLineIntensity = false;
421 prt.lgSortLineWavelength = true;
422
423 /* wavelength has range option */
424 /* option to only certain print range of lines */
425 if( p.nMatch("RANG") )
426 {
427 prt.wlSort1 = (realnum)p.getWaveOpt();
428
429 prt.wlSort2 = (realnum)p.getWaveOpt();
430
431 if( p.lgEOL() )
432 {
433 fprintf( ioQQQ, " There must be two numbers for the RANGE option, the lower and upper wavelength. Sorry.\n" );
435 }
436 if( prt.wlSort1 <0. || prt.wlSort2 <0. ||
437 prt.wlSort1 >= prt.wlSort2 )
438 {
439 fprintf( ioQQQ, " The lower and upper wavelength must be positive and in the correct order. Sorry.\n" );
441 }
442 }
443 else
444 {
445 prt.wlSort1 = -1;
446 prt.wlSort2 = 1e30f;
447 }
448 }
449 else if( p.nMatch("INTE") )
450 {
451 /* sort by intensity/luminosity */
452 /* remember which one to do */
453 prt.lgSortLineIntensity = true;
454 prt.lgSortLineWavelength = false;
455 }
456 else
457 {
458 fprintf( ioQQQ, "I can sort by wavelength or intensity - one must be specified.\nSorry.\n" );
460 }
461 }
462
463 else if( p.nMatch(" SUM") )
464 {
465 /* option to read in set of lines to sum over */
466 ParsePrtLineSum( p );
467 }
468
469 else if( p.nMatch("SURF") && p.nMatch("BRIG") )
470 {
471 /* print surface brightness rather than 4pi J */
472 prt.lgSurfaceBrightness = true;
473 /* default is per sr, arcsec option changes to sq arcsec */
474 if( p.nMatch("ARCS" ) )
475 {
476 /* use sr */
477 prt.lgSurfaceBrightness_SR = false;
478 }
479 else
480 {
481 /* use sq arcsec */
482 prt.lgSurfaceBrightness_SR = true;
483 }
484 }
485
486 else if( p.nMatch("CUMU") )
487 {
488 /* print lines cumulative - integral of line emission over time */
489 prt.lgPrintLineCumulative = true;
490 }
491
492 else
493 {
494 fprintf( ioQQQ, "One of the keys should have appeared. \nPlease consult Hazy.\nSorry.\n" );
496 }
497 }
498
499 /* print maser lines when TAV is called */
500 else if( p.nMatch("MASE") )
501 {
502 prt.lgPrtMaser = true;
503 }
504
505 else if( p.nMatch("ONLY") )
506 {
507 if( p.nMatch("ZONE") )
508 prt.lgOnlyZone = true;
509
510 else if( p.nMatch("HEAD") )
511 prt.lgOnlyHead = true;
512
513 else
514 {
515 fprintf( ioQQQ, " There must be a keyword for the ONLY option. They are HEAD and ZONE. Sorry.\n" );
517 }
518 }
519
520 else if( p.nMatch("STAR") )
521 {
522 /* start printout at specified zone */
523 called.lgTalk = false;
524 prt.lgPrtStart = true;
525 prt.nstart = (long int)p.FFmtRead();
526 if( p.lgEOL() )
527 {
528 fprintf( ioQQQ,
529 " The zone on which the print is to start MUST be entered on this line. Sorry.\n" );
531 }
532 }
533
534 /* print continuum command */
535 else if( p.nMatch("CONT") )
536 {
537 if( p.nMatch("BLOC") )
538 {
539 /* option to print emergent continuum at end of calculation*/
540 fprintf(ioQQQ , " PROBLEM The PRINT CONTINUUM BLOCK command has been removed. Ignored for now.\n");
541 }
542 else if( p.nMatch("INDI" ))
543 {
544 /* option to print lines and continuum that go into each continuum
545 * index the continuum index is the cell within the continuum
546 * array - this identifies lines that occur within each
547 * continuum cell */
548 prt.lgPrtContIndices = true;
549 /* these are lower and upper limits to the energy range in Rydbergs.
550 * they are the first and second number on the command line, lower and
551 * upper bounds of the code are used if not specified */
552 /* if no number on line then zero is returned, this is fine, since
553 * we want the lower energy bound of the code */
554 prt.lgPrtContIndices_lo_E = (realnum)p.FFmtRead();
555 prt.lgPrtContIndices_hi_E = (realnum)p.FFmtRead();
556 /* if we hit end of line then use high-energy limit of code - that is,
557 * include all energies */
558 if( p.lgEOL() )
559 prt.lgPrtContIndices_hi_E = (realnum)rfield.egamry;
560 }
561 else
562 {
563 /* option to print continuum points within emission lines block */
564 fprintf( ioQQQ, " PROBLEM PRINT CONTINUUM command is now the default, and the command has been removed.\n" );
565 }
566 }
567
568 else if( p.nMatch("COOL") )
569 {
570 /* print cooling array for a specified one */
571 prt.nzdump = (long int)p.FFmtRead();
572
573 /* dump all zones if argument is zero or not present */
574 if( p.lgEOL() )
575 {
576 prt.nzdump = 0;
577 }
578 }
579
580 else if( p.nMatch("QUIE") || (p.nMatch(" OFF") &&
581 !p.nMatch("FAIN" )) )
582 {
583 /* in above, there is also a 'print faint off' command
584 * QUIET or OFF means turn off printout */
585 called.lgTalk = false;
586 }
587
588 else if( p.nMatch("MACR") )
589 {
590 // print status of macros in cddefines.ht */
591 PrtMacros();
592 }
593
594 else if( p.nMatch(" ON ") )
595 {
596 /* on means turn on printout, lgTalkIsOK is set false in grid_do.cpp.
597 * this keeps printout quiet during optimize, even when init files are parsed */
598 /* called.lgTalkForcedOff was set true with cdTalk(false), if this was
599 * set then do not respect this command. this is to prevent print on at end
600 * of init file from turning on print in grids when print is turned off */
601 if( called.lgTalkIsOK && !called.lgTalkForcedOff )
602 {
603 called.lgTalk = cpu.i().lgMPI_talk();
604 }
605 }
606
607 else if (p.nMatch("RECOMB"))
608 {
609 ionbal.lgRecom_Badnell_print = true;
610 /* option to print recombination rates then exit */
611 }
612
613 else if( p.nMatch("SHOR") )
614 {
615 /* make short printout, don't print last */
616 prt.lgPrtShort = true;
617 if( !prt.lgFntSet )
618 prt.TooFaint = 0.001f;
619 }
620
621 else if( p.nMatch("VERS") )
622 {
623 /* print compiler and code version information */
624 fprintf( ioQQQ, "\nThis is Cloudy %s\n%s\n\n" ,
625 t_version::Inst().chVersion,
626 t_version::Inst().chInfo );
627 }
628
629 else if( p.nMatch("VOIGT") )
630 {
631 /* Voigt function debugging print - parameter is damping constant a */
632 realnum damp = (realnum)p.FFmtRead();
633 if( p.lgEOL() )
634 {
635 fprintf( ioQQQ, " The damping constant must appear on the print voigt command. Sorry.\n" );
637 }
638
639 const long NVOIGT=100;
640 realnum xprofile[NVOIGT], profileVoigtH[NVOIGT];
641 for( long i=0; i<NVOIGT; ++i )
642 xprofile[i] = (realnum)i * 10.f / (realnum)NVOIGT;
643
644 VoigtH( damp, xprofile, profileVoigtH, NVOIGT );
645
646 fprintf(ioQQQ,"\n x VoigtH\n");
647 for( long int i=0; i<NVOIGT; ++i )
648 {
649 fprintf(ioQQQ,"%.4e %.4e\n", xprofile[i], profileVoigtH[i] );
650 }
651 }
652
653 else if( p.nMatch("ZONE") || p.nMatch("EVER") )
654 {
655 /* print every nth zone - command was originally print every but
656 * is being changed to print zone */
657 num1 = (long int)p.FFmtRead();
658 if( p.lgEOL() )
659 {
660 fprintf( ioQQQ, " The number of zones to print MUST be entered on this line. Sorry.\n" );
662 }
663
664 iterations.IterPrnt[0] = MAX2(num1,1);
665
666 for( j=1; j < iterations.iter_malloc; j++ )
667 {
668 iterations.IterPrnt[j] = (long int)p.FFmtRead();
669 if( p.lgEOL() )
670 {
671 iterations.IterPrnt[j] = iterations.IterPrnt[j-1];
672 }
673 }
674 }
675
676 /* check if no keywords were recognized. */
677 else
678 {
679 fprintf( ioQQQ, " There MUST be a keyword on the following line. Sorry.\n" );
680 fprintf( ioQQQ, " The PRINT FAINT command is now the PRINT LINE FAINT command.\n" );
681 p.PrintLine(ioQQQ);
683 }
684 return;
685}
686
687/*prt_constants print physical and machine constants */
689{
690
691 DEBUG_ENTRY( "prt_constants()" );
692
693 fprintf(ioQQQ,"\n\nPhysical constants used by Cloudy, taken from physconst.h\n");
694
695 fprintf(ioQQQ,"EE\t%.15g\n",EE);
696 fprintf(ioQQQ,"EULER\t%.15g\n",EULER);
697 fprintf(ioQQQ,"PI\t%.15g\n",PI);
698 fprintf(ioQQQ,"PI2\t%.15g\n",PI2);
699 fprintf(ioQQQ,"PI4\t%.15g\n",PI4);
700 fprintf(ioQQQ,"PI8\t%.15g\n",PI8);
701 fprintf(ioQQQ,"SQRT2\t%.15g\n",SQRT2);
702 fprintf(ioQQQ,"SQRTPI\t%.15g\n",SQRTPI);
703 fprintf(ioQQQ,"SQRTPIBY2\t%.15g\n",SQRTPIBY2);
704 fprintf(ioQQQ,"LN_TWO\t%.15g\n",LN_TWO);
705 fprintf(ioQQQ,"LN_TEN\t%.15g\n",LN_TEN);
706 fprintf(ioQQQ,"LOG10_E\t%.15g\n",LOG10_E);
707 fprintf(ioQQQ,"OPTDEP2EXTIN\t%.15g\n",OPTDEP2EXTIN);
708 fprintf(ioQQQ,"RADIAN\t%.15g\n",RADIAN);
709 fprintf(ioQQQ,"SOLAR_MASS\t%.15g\n",SOLAR_MASS);
710 fprintf(ioQQQ,"SOLAR_LUMINOSITY\t%.15g\n",SOLAR_LUMINOSITY);
711 fprintf(ioQQQ,"AU\t%.15g\n",AU);
712 fprintf(ioQQQ,"ATOMIC_MASS_UNIT\t%.15g\n",ATOMIC_MASS_UNIT);
713 fprintf(ioQQQ,"ELECTRON_MASS\t%.15g\n",ELECTRON_MASS);
714 fprintf(ioQQQ,"PROTON_MASS\t%.15g\n",PROTON_MASS);
715 fprintf(ioQQQ,"BOLTZMANN\t%.15g\n",BOLTZMANN);
716 fprintf(ioQQQ,"SPEEDLIGHT\t%.15g\n",SPEEDLIGHT);
717 fprintf(ioQQQ,"HPLANCK\t%.15g\n",HPLANCK);
718 fprintf(ioQQQ,"GRAV_CONST\t%.15g\n",GRAV_CONST);
719 fprintf(ioQQQ,"ELEM_CHARGE\t%.15g\n",ELEM_CHARGE);
720 fprintf(ioQQQ,"RYD_INF\t%.15g\n",RYD_INF);
721 fprintf(ioQQQ,"HIONPOT\t%.15g\n",HIONPOT);
722 fprintf(ioQQQ,"AS1RAD\t%.15g\n",AS1RAD);
723 fprintf(ioQQQ,"SQAS1SR\t%.15g\n",SQAS1SR);
724 fprintf(ioQQQ,"SQAS_SKY\t%.15g\n",SQAS_SKY);
725 fprintf(ioQQQ,"PARSEC\t%.15g\n",PARSEC);
726 fprintf(ioQQQ,"H_BAR \t%.15g\n",H_BAR );
727 fprintf(ioQQQ,"ELEM_CHARGE_ESU \t%.15g\n",ELEM_CHARGE_ESU );
728 fprintf(ioQQQ,"ELECTRIC_CONST\t%.15g\n",ELECTRIC_CONST);
729 fprintf(ioQQQ,"HION_LTE_POP\t%.15g\n",HION_LTE_POP);
730 fprintf(ioQQQ,"SAHA\t%.15g\n",SAHA);
731 fprintf(ioQQQ,"ERG1CM\t%.15g\n",ERG1CM);
732 fprintf(ioQQQ,"T1CM\t%.15g\n",T1CM);
733 fprintf(ioQQQ,"WAVNRYD\t%.15g\n",WAVNRYD);
734 fprintf(ioQQQ,"RYDLAM\t%.15g\n",RYDLAM);
735 fprintf(ioQQQ,"EN1RYD\t%.15g\n",EN1RYD);
736 fprintf(ioQQQ,"TE1RYD\t%.15g\n",TE1RYD);
737 fprintf(ioQQQ,"EVDEGK\t%.15g\n",EVDEGK);
738 fprintf(ioQQQ,"EVRYD\t%.15g\n",EVRYD);
739 fprintf(ioQQQ,"EN1EV\t%.15g\n",EN1EV);
740 fprintf(ioQQQ,"FR1RYD\t%.15g\n",FR1RYD);
741 fprintf(ioQQQ,"HNU3C2\t%.15g\n",HNU3C2);
742 fprintf(ioQQQ,"FR1RYDHYD\t%.15g\n",FR1RYDHYD );
743 fprintf(ioQQQ,"HBAReV\t%.15g\n",HBAReV );
744 fprintf(ioQQQ,"RYDLAMHYD\t%.15g\n",RYDLAMHYD );
745 fprintf(ioQQQ,"STEFAN_BOLTZ\t%.15g\n",STEFAN_BOLTZ);
746 fprintf(ioQQQ,"FREQ_1EV\t%.15g\n",FREQ_1EV);
747 fprintf(ioQQQ,"FINE_STRUCTURE\t%.15g\n",FINE_STRUCTURE);
748 fprintf(ioQQQ,"BOHR_RADIUS_CM\t%.15g\n",BOHR_RADIUS_CM);
749 fprintf(ioQQQ,"TWO_PHOT_CONST\t%.15g\n",TWO_PHOT_CONST);
750 fprintf(ioQQQ,"COLL_CONST\t%.15g\n",COLL_CONST);
751 fprintf(ioQQQ,"MILNE_CONST\t%.15g\n",MILNE_CONST);
752 fprintf(ioQQQ,"TRANS_PROB_CONST\t%.15g\n",TRANS_PROB_CONST);
753 fprintf(ioQQQ,"\n");
754
755 fprintf(ioQQQ,"Some other interesting sizes:\n");
756 fprintf(ioQQQ,"bool\t%lu\n",(unsigned long)sizeof(bool));
757 fprintf(ioQQQ,"char\t%lu\n",(unsigned long)sizeof(char));
758 fprintf(ioQQQ,"int\t%lu\n",(unsigned long)sizeof(int));
759 fprintf(ioQQQ,"long int\t%lu\n",(unsigned long)sizeof(long int));
760 fprintf(ioQQQ,"unsigned int\t%lu\n",(unsigned long)sizeof(unsigned int));
761 fprintf(ioQQQ,"float\t%lu\n",(unsigned long)sizeof(sys_float));
762 fprintf(ioQQQ,"realnum\t%lu\n",(unsigned long)sizeof(realnum));
763 fprintf(ioQQQ,"double\t%lu\n",(unsigned long)sizeof(double));
764 fprintf(ioQQQ,"double*\t%lu\n",(unsigned long)sizeof(double*));
765 fprintf(ioQQQ,"\n");
766
767 fprintf(ioQQQ,"Some constants from float.h.\n");
768 /* some constants from float.h */
769 fprintf(ioQQQ,"DBL_DIG \t%i\n", DBL_DIG); /* # of decimal digits of precision */
770 fprintf(ioQQQ,"DBL_EPSILON \t%.15g\n",DBL_EPSILON); /* smallest such that 1.0+DBL_EPSILON != 1.0 */
771 fprintf(ioQQQ,"DBL_MANT_DIG\t%i\n",DBL_MANT_DIG); /* # of bits in mantissa */
772 fprintf(ioQQQ,"DBL_MAX\t%.15g\n", DBL_MAX); /* max value */
773 fprintf(ioQQQ,"DBL_MAX_10_EXP\t%i\n", DBL_MAX_10_EXP); /* max decimal exponent */
774 fprintf(ioQQQ,"DBL_MAX_EXP\t%i\n", DBL_MAX_EXP); /* max binary exponent */
775 fprintf(ioQQQ,"DBL_MIN\t%.15g\n", DBL_MIN); /* min positive value */
776
777 fprintf(ioQQQ,"FLT_DIG\t%i\n", FLT_DIG); /* # of decimal digits of precision */
778 fprintf(ioQQQ,"FLT_EPSILON\t%.15g\n", FLT_EPSILON); /* smallest such that 1.0+FLT_EPSILON != 1.0 */
779 fprintf(ioQQQ,"FLT_MANT_DIG\t%i\n", FLT_MANT_DIG); /* # of bits in mantissa */
780 fprintf(ioQQQ,"FLT_MAX\t%.15g\n", FLT_MAX); /* max value */
781 fprintf(ioQQQ,"FLT_MAX_10_EXP\t%i\n", FLT_MAX_10_EXP);/* max decimal exponent */
782 fprintf(ioQQQ,"FLT_MAX_EXP\t%i\n", FLT_MAX_EXP); /* max binary exponent */
783 fprintf(ioQQQ,"FLT_MIN\t%.15g\n", FLT_MIN); /* min positive value */
784
785 fprintf(ioQQQ,"BIGFLOAT\t%.15g\n", BIGFLOAT);
786 fprintf(ioQQQ,"SMALLFLOAT\t%.15g\n", SMALLFLOAT);
787 fprintf(ioQQQ,"BIGDOUBLE\t%.15g\n", BIGDOUBLE);
788 fprintf(ioQQQ,"SMALLDOUBLE\t%.15g\n", SMALLDOUBLE);
789
790 fprintf(ioQQQ,"\nThis machine has %ld threads.\n", cpu.i().nCPU() );
791
792 return;
793}
t_called called
Definition called.cpp:5
FILE * ioQQQ
Definition cddefines.cpp:7
bool lgPrnErr
Definition cddefines.cpp:13
float sys_float
Definition cddefines.h:106
#define STATIC
Definition cddefines.h:97
const int LIMELM
Definition cddefines.h:258
#define EXIT_FAILURE
Definition cddefines.h:140
#define cdEXIT(FAIL)
Definition cddefines.h:434
const int ipHELIUM
Definition cddefines.h:306
float realnum
Definition cddefines.h:103
#define MAX2
Definition cddefines.h:782
const int ipHYDROGEN
Definition cddefines.h:305
#define DEBUG_ENTRY(funcname)
Definition cddefines.h:684
long int GetElem(void) const
Definition parser.cpp:209
double FFmtRead(void)
Definition parser.cpp:353
bool nMatch(const char *chKey) const
Definition parser.h:135
double getWaveOpt()
Definition parser.cpp:244
bool lgEOL(void) const
Definition parser.h:98
NORETURN void NoNumb(const char *chDesc) const
Definition parser.cpp:233
int PrintLine(FILE *fp) const
Definition parser.h:204
static t_version & Inst()
Definition cddefines.h:175
static t_cpu cpu
Definition cpu.h:355
UNUSED const realnum BIGFLOAT
Definition cpu.h:189
const double BIGDOUBLE
Definition cpu.h:194
const double SMALLDOUBLE
Definition cpu.h:195
const realnum SMALLFLOAT
Definition cpu.h:191
t_elementnames elementnames
diatomics h2("h2", 4100., &hmi.H2_total, Yan_H2_CS)
t_ionbal ionbal
Definition ionbal.cpp:5
t_iso_sp iso_sp[NISO][LIMELM]
Definition iso.cpp:8
const int ipHE_LIKE
Definition iso.h:63
const int ipH_LIKE
Definition iso.h:62
t_iterations iterations
Definition iterations.cpp:5
STATIC void PrtMacros(void)
void ParsePrint(Parser &p)
STATIC void prt_constants(void)
void ParsePrtLineSum(Parser &p)
UNUSED const double H_BAR
Definition physconst.h:144
UNUSED const double SOLAR_MASS
Definition physconst.h:71
UNUSED const double AS1RAD
Definition physconst.h:129
UNUSED const double TRANS_PROB_CONST
Definition physconst.h:237
UNUSED const double FR1RYD
Definition physconst.h:195
UNUSED const double PI
Definition physconst.h:29
UNUSED const double BOHR_RADIUS_CM
Definition physconst.h:222
UNUSED const double STEFAN_BOLTZ
Definition physconst.h:210
UNUSED const double LOG10_E
Definition physconst.h:56
UNUSED const double HPLANCK
Definition physconst.h:103
UNUSED const double FINE_STRUCTURE
Definition physconst.h:216
UNUSED const double PI4
Definition physconst.h:35
UNUSED const double SPEEDLIGHT
Definition physconst.h:100
UNUSED const double BOLTZMANN
Definition physconst.h:97
UNUSED const double HIONPOT
Definition physconst.h:119
UNUSED const double PI2
Definition physconst.h:32
UNUSED const double ELECTRON_MASS
Definition physconst.h:91
UNUSED const double SQAS_SKY
Definition physconst.h:135
UNUSED const double T1CM
Definition physconst.h:167
UNUSED const double LN_TWO
Definition physconst.h:50
UNUSED const double FREQ_1EV
Definition physconst.h:213
UNUSED const double SOLAR_LUMINOSITY
Definition physconst.h:75
UNUSED const double SAHA
Definition physconst.h:161
UNUSED const double RYDLAMHYD
Definition physconst.h:207
UNUSED const double LN_TEN
Definition physconst.h:53
UNUSED const double RYD_INF
Definition physconst.h:115
UNUSED const double SQRTPIBY2
Definition physconst.h:47
UNUSED const double EN1RYD
Definition physconst.h:179
UNUSED const double EVRYD
Definition physconst.h:189
UNUSED const double EN1EV
Definition physconst.h:192
UNUSED const double OPTDEP2EXTIN
Definition physconst.h:60
UNUSED const double ERG1CM
Definition physconst.h:164
UNUSED const double GRAV_CONST
Definition physconst.h:109
UNUSED const double EULER
Definition physconst.h:26
UNUSED const double SQAS1SR
Definition physconst.h:132
UNUSED const double PROTON_MASS
Definition physconst.h:94
UNUSED const double ELECTRIC_CONST
Definition physconst.h:150
UNUSED const double EVDEGK
Definition physconst.h:186
UNUSED const double SQRT2
Definition physconst.h:41
UNUSED const double RADIAN
Definition physconst.h:63
UNUSED const double SQRTPI
Definition physconst.h:44
UNUSED const double ATOMIC_MASS_UNIT
Definition physconst.h:88
UNUSED const double HNU3C2
Definition physconst.h:198
UNUSED const double ELEM_CHARGE
Definition physconst.h:112
UNUSED const double PI8
Definition physconst.h:38
UNUSED const double COLL_CONST
Definition physconst.h:229
UNUSED const double HBAReV
Definition physconst.h:204
UNUSED const double ELEM_CHARGE_ESU
Definition physconst.h:147
UNUSED const double AU
Definition physconst.h:80
UNUSED const double MILNE_CONST
Definition physconst.h:233
UNUSED const double TWO_PHOT_CONST
Definition physconst.h:225
UNUSED const double WAVNRYD
Definition physconst.h:173
UNUSED const double EE
Definition physconst.h:23
UNUSED const double TE1RYD
Definition physconst.h:183
UNUSED const double PARSEC
Definition physconst.h:138
UNUSED const double HION_LTE_POP
Definition physconst.h:157
UNUSED const double FR1RYDHYD
Definition physconst.h:201
UNUSED const double RYDLAM
Definition physconst.h:176
t_prt prt
Definition prt.cpp:10
t_rfield rfield
Definition rfield.cpp:8
void VoigtH(realnum a, const realnum v[], realnum y[], int n)
Definition thirdparty.h:350