cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
parse_print.cpp
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2022 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 "broke.h"
8 #include "rfield.h"
9 #include "iso.h"
10 #include "iterations.h"
11 #include "called.h"
12 #include "elementnames.h"
13 #include "ionbal.h"
14 #include "prt.h"
15 #include "lines.h"
16 #include "h2.h"
17 #include "parser.h"
18 #include "version.h"
19 #include "atmdat.h"
20 #include "input.h"
21 
22 /*prt_constants print physical constants */
23 STATIC void prt_constants(void);
24 
25 
26 // PrtMacros - print macros in cddefines.h and their status - *print macros*
27 STATIC 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( "IONI" ) && p.nMatch( "LEVE" ) )
141  {
142  fprintf( ioQQQ, "Please use either IONIZATION or LEVEL keywords\n" );
143  cdEXIT( EXIT_FAILURE );
144  }
145  else if( p.nMatch( "IONI" ) )
146  {
147  if( p.nMatch( "ONLY" ) )
148  {
149  /* returns element number on C scale */
150  if( (nelem = p.GetElem())<0 )
151  {
152  fprintf(ioQQQ,"An element name must appear on this PRINT ARRAYS ONLY xx command.\n");
154  }
155  /* have the element number, turn on its print */
156  prt.lgPrtArry[nelem] = true;
157  }
158  else
159  {
160  /* this flag, print arrays for all elements */
161  for( nelem=ipHYDROGEN; nelem<LIMELM; ++nelem )
162  {
163  prt.lgPrtArry[nelem] = true;
164  }
165  }
166  }
167  else if( p.nMatch( "LEVEL" ) )
168  {
169  string species;
170  p.GetQuote( species );
171  if( species == "" )
172  {
173  fprintf( ioQQQ, "Invalid species label: ''\n" );
174  cdEXIT( EXIT_FAILURE );
175  }
176 
177  prt.matrix.setSpecies( species );
178  }
179  else
180  {
181  fprintf( ioQQQ, "Please use either the IONIZATION or the LEVEL keywords\n" );
182  cdEXIT( EXIT_FAILURE );
183  }
184  }
185 
186  else if( p.nMatch("CITA") )
187  {
188  prt.lgPrtCitations = true;
189  }
190 
191  else if( p.nMatch("COLU") && p.nMatch("DENS") )
192  {
193  if( p.nMatch(" ON ") )
194  {
195  /* print column densities of elements - this is default */
196  prt.lgPrintColumns = true;
197  }
198  else if( p.nMatch(" OFF") )
199  {
200  /* print column densities of elements */
201  prt.lgPrintColumns = false;
202  }
203  }
204 
205  /* option to print departure coefficients in addition to level pops
206  * keywords He-like to do He-like sequence element, else do h-like
207  * element name, if not recognized, does hydrogen
208  * so with no options prints hydrogen itself */
209  else if( p.nMatch("DEPA") )
210  {
211  if( p.nMatch("HE-L") )
212  {
213  ipISO = ipHE_LIKE;
214  }
215  else
216  {
217  ipISO = ipH_LIKE;
218  }
219 
220  /* now check for element name */
221  nelem = p.GetElem( );
222 
223  /* return value is < 0 if no element recognized - in this case use root of sequence */
224  nelem = MAX2( nelem, ipISO );
225 
226  /* print departure coefficients instead of hydrogen level populations */
227  iso_sp[ipISO][nelem].lgPrtDepartCoef = true;
228  }
229 
230  else if( p.nMatch("CONS") )
231  {
232  /* print physical constants, routine is below */
233  prt_constants();
234  }
235 
236  else if( p.nMatch("ERRO") )
237  {
238  /* print errors to special window */
239  lgPrnErr = true;
240  }
241 
242  else if( p.nMatch("FIXI") )
243  {
244  broke.lgPrintFixits = true;
245  }
246 
247  else if( p.nMatch("HEAT") )
248  {
249  /* print heat arrays */
250  prt.lgPrintHeating = true;
251  }
252 
253  else if( p.nMatch("MODU") )
254  {
255  /* list loaded modules */
256  fprintf(ioQQQ,"Loaded Cloudy modules are:\n");
257  fprintf(ioQQQ,"--------------------------\n");
258  vector<module*>& mods=module_list::Inst().m_l;
259  for (vector<module*>::iterator mi = mods.begin(); mi != mods.end(); ++mi)
260  {
261  fprintf(ioQQQ,"%s\n",(*mi)->chName());
262  }
263  fprintf(ioQQQ,"--------------------------\n");
264  }
265 
266  else if( p.nMatch("PATH") )
267  {
268  /* print the path */
269  cpu.i().printDataPath();
270  }
271 
272  /*else if( p.nMatch("H-LI"))*/
273  else if( p.nMatch("POPU"))
274  {
275  if( p.nMatch("HE-L") )
276  {
277  ipISO = ipHE_LIKE;
278  }
279  else
280  {
281  ipISO = ipH_LIKE;
282  }
283 
284  /* now check for element name */
285  nelem = p.GetElem( );
286  /* return value is < 0 if no element recognized - in this case use H */
287  nelem = MAX2(0,nelem);
288 
289  /* if no element specified but he-like iso, then use helium */
290  if( nelem==0 && ipISO==ipHE_LIKE )
291  nelem = ipHELIUM;
292 
293  if( nelem < ipISO )
294  {
295  fprintf(ioQQQ,"This iso-sequence (%s) and element (%s) are impossible.\n",
297  elementnames.chElementName[nelem]);
299  }
300 
301  /* print hydrogenic H-like level populations */
302  iso_sp[ipISO][nelem].lgPrtLevelPops = true;
303  }
304 
305  /* option to only print last iteration */
306  else if( p.nMatch("LAST") )
307  {
308  prt.lgPrtLastIt = true;
309  }
310 
311  /* the print line command as several options */
312  else if( p.nMatch("LINE") )
313  {
314  if( p.nMatch(" ALL") )
315  {
316  /* turn on all printed components */
317  prt.lgPrnPump = true;
318  prt.lgPrnColl = true;
319  prt.lgPrnHeat = true;
320  }
321 
322  else if( p.nMatch("CELL") )
323  {
324  /* print line cell on physics scale, first cell in continuum is 1
325  * give all lines in this cell */
326  prt.lgPrnLineCell = true;
327  prt.nPrnLineCell = (long)p.FFmtRead();
328  if( p.lgEOL() )
329  p.NoNumb("cell for line print" );
330  if( prt.nPrnLineCell < 1 )
331  {
332  /* non-positive cells are not allowed */
333  fprintf(ioQQQ , "The cell number on the PRINT LINE CELL command must be positive.\n");
334  fprintf(ioQQQ , "The cell number was %li.\n" , prt.nPrnLineCell);
335  }
336  }
337 
338  else if( p.nMatch("COLL") )
339  {
340  /* either print line collisions or print line iso collapsed */
341  /* also print collisional contributions */
342  if( p.nMatch(" ISO") )
343  {
344  if( p.nMatch(" OFF") )
345  prt.lgPrnIsoCollapsed = false;
346  else
347  /* print predictions from collapsed levels of iso sequences */
348  prt.lgPrnIsoCollapsed = true;
349  }
350  else
351  {
352  /* print line collisions */
353  prt.lgPrnColl = true;
354  }
355  }
356 
357  else if( p.nMatch("COLU") )
358  {
359  /* option to print main line array as a single column */
360  prt.lgPrtLineArray = false;
361  /* this also has an option - LINEAR - to print linear quantity
362  * in exponential format */
363  if( p.nMatch("LINEAR") )
364  prt.lgPrtLineLog = false;
365  }
366 
367  else if( p.nMatch("FAIN") && !(p.nMatch("OPTI")&&p.nMatch("DEPT")) )
368  {
369  /* print line faint - above do not trigger on optical depth
370  * option to adjust intensity of faintest line to print */
371  /* >> 01 feb 01, move print faint into print line faint */
372  /* faintest line, rel to norm line, to print; either linear of log */
373  a = p.FFmtRead();
374 
375  /* option for, if no number, keyword=" OFF", to print all lines */
376  if( p.lgEOL() )
377  {
378  if( p.nMatch(" OFF") )
379  {
380  prt.lgFaintOn = false;
381  }
382  else
383  {
384  fprintf( ioQQQ,
385  " There faintest line to print must be on this line, sorry.\n" );
387  }
388  }
389 
390  prt.lgFntSet = true;
391  if( a <= 0. || p.nMatch(" LOG") )
392  {
393  prt.TooFaint = (realnum)exp10(a);
394  }
395  else
396  {
397  prt.TooFaint = (realnum)a;
398  }
399  }
400 
401  else if( p.nMatch("FLUX") && p.nMatch("EART"))
402  {
403  /* print line flux seen at earth */
404  prt.lgPrintFluxEarth = true;
405  }
406 
407  else if( p.nMatch(" H2") && p.nMatch("ELEC") )
408  {
409  /* print H2 electronic lines too - -1 since number of electronic
410  * levels is not yet known, will set when H2 actually called */
411  h2.nElecLevelOutput = -1;
412  }
413 
414  else if( p.nMatch("HEAT") )
415  {
416  /* also print heating contributions */
417  prt.lgPrnHeat = true;
418  }
419 
420  else if( p.nMatch("INWA") )
421  {
422  /* also print inward contributions */
423  prt.lgPrnInwd = true;
424  }
425 
426  else if( p.nMatch(" OFF") )
427  {
428  if( p.nMatch( "INTR" ) )
429  prt.lgPrintBlockIntrinsic = false;
430  else if( p.nMatch( "EMER" ) )
431  prt.lgPrintBlockEmergent = false;
432  else
433  prt.lgPrintBlock = false;
434  }
435 
436  else if( p.nMatch("OPTI") && p.nMatch("DEPT") )
437  {
438  /* print line optical depths, with option for smallest to print */
439  if( p.nMatch(" OFF") )
440  {
441  /* turn off or on printing of optical depths - default off */
442  prt.lgPrtTau = false;
443  }
444  else
445  {
446  prt.lgPrtTau = true;
447  }
448  if( p.nMatch("FAIN") )
449  {
450  /* log of faintest optical depth, default is linear value of 0.1 */
452  if( p.lgEOL() )
453  {
454  fprintf( ioQQQ, " There must be a number for the FAINT option. They are HEAD and ZONE. Sorry.\n" );
456  }
457  }
458  }
459 
460  else if( p.nMatch("PRECISION"))
461  {
462  /* print line precision (number of significant figures)
463  * this affects all aspects of reading and writing lines */
464  LineSave.sig_figs = (int) p.FFmtRead();
465  if (p.lgEOL())
466  {
467  p.NoNumb("line precision");
468  }
470  {
471  fprintf(ioQQQ,
472  " print line precision currently only works for up to %ld significant figures.\n",
475  }
476  }
477 
478  else if( p.nMatch("PUMP") )
479  {
480  /* also print pump contributions */
481  prt.lgPrnPump = true;
482  }
483 
484  else if( p.nMatch("SORT") )
485  {
486  /* >>chng 01 aug 18, print sort command works after all these years,
487  * sort by wavelength or intensity */
488  /* turn on sorting with respect to wavelength */
489  prt.lgSortLines = true;
490  if( p.nMatch("WAVE") )
491  {
492  /* sort by wavelength */
493  /* remember which one to do */
494  prt.lgSortLineIntensity = false;
495  prt.lgSortLineWavelength = true;
496 
497  /* wavelength has range option */
498  /* option to only certain print range of lines */
499  if( p.nMatch("RANG") )
500  {
501  prt.wlSort1 = (realnum)p.getWave();
502 
503  prt.wlSort2 = (realnum)p.getWave();
504 
505  if( p.lgEOL() )
506  {
507  fprintf( ioQQQ, " There must be two numbers for the RANGE option, the lower and upper wavelength. Sorry.\n" );
509  }
510  if( prt.wlSort1 <0. || prt.wlSort2 <0. ||
511  prt.wlSort1 >= prt.wlSort2 )
512  {
513  fprintf( ioQQQ, " The lower and upper wavelength must be positive and in the correct order. Sorry.\n" );
515  }
516  }
517  else
518  {
519  prt.wlSort1 = -1;
520  prt.wlSort2 = 1e30f;
521  }
522  }
523  else if( p.nMatch("INTE") )
524  {
525  /* sort by intensity/luminosity */
526  /* remember which one to do */
527  prt.lgSortLineIntensity = true;
528  prt.lgSortLineWavelength = false;
529  }
530  else
531  {
532  fprintf( ioQQQ, "I can sort by wavelength or intensity - one must be specified.\nSorry.\n" );
534  }
535  }
536 
537  else if( p.nMatch(" SUM") )
538  {
539  /* option to read in set of lines to sum over */
540  ParsePrtLineSum( p );
541  }
542 
543  else if( p.nMatch("SURF") && p.nMatch("BRIG") )
544  {
545  /* print surface brightness rather than 4pi J */
546  prt.lgSurfaceBrightness = true;
547  /* default is per sr, arcsec option changes to sq arcsec */
548  if( p.nMatch("ARCS" ) )
549  {
550  /* use sr */
551  prt.lgSurfaceBrightness_SR = false;
552  }
553  else
554  {
555  /* use sq arcsec */
557  }
558  }
559 
560  else if( p.nMatch("CUMU") )
561  {
562  /* print lines cumulative - integral of line emission over time */
563  prt.lgPrintLineCumulative = true;
564  }
565 
566  else if( p.nMatch("VACUUM") )
567  {
568  /* print lines vacuum - use vacuum wavelengths */
570  }
571 
572  else
573  {
574  fprintf( ioQQQ, "One of the keys should have appeared. \nPlease consult Hazy.\nSorry.\n" );
576  }
577  }
578 
579  /* print maser lines when TAV is called */
580  else if( p.nMatch("MASE") )
581  {
582  prt.lgPrtMaser = true;
583  }
584 
585  else if( p.nMatch("ONLY") )
586  {
587  if( p.nMatch("ZONE") )
588  prt.lgOnlyZone = true;
589 
590  else if( p.nMatch("HEAD") )
591  prt.lgOnlyHead = true;
592 
593  else
594  {
595  fprintf( ioQQQ, " There must be a keyword for the ONLY option. They are HEAD and ZONE. Sorry.\n" );
597  }
598  }
599 
600  else if( p.nMatch("STAR") )
601  {
602  /* start printout at specified zone */
603  called.lgTalk = false;
604  prt.lgPrtStart = true;
605  prt.nstart = (long int)p.FFmtRead();
606  if( p.lgEOL() )
607  {
608  fprintf( ioQQQ,
609  " The zone on which the print is to start MUST be entered on this line. Sorry.\n" );
611  }
612  }
613 
614  /* print continuum command */
615  else if( p.nMatch("CONT") )
616  {
617  if( p.nMatch("BLOC") )
618  {
619  /* option to print emergent continuum at end of calculation*/
620  fprintf(ioQQQ , " PROBLEM The PRINT CONTINUUM BLOCK command has been removed. Ignored for now.\n");
621  }
622  else if( p.nMatch("INDI" ))
623  {
624  /* option to print lines and continuum that go into each continuum
625  * index the continuum index is the cell within the continuum
626  * array - this identifies lines that occur within each
627  * continuum cell */
628  prt.lgPrtContIndices = true;
629  /* these are lower and upper limits to the energy range in Rydbergs.
630  * they are the first and second number on the command line, lower and
631  * upper bounds of the code are used if not specified */
632  /* if no number on line then zero is returned, this is fine, since
633  * we want the lower energy bound of the code */
634  prt.lgPrtContIndices_lo_E = (realnum)p.FFmtRead();
635  prt.lgPrtContIndices_hi_E = (realnum)p.FFmtRead();
636  /* if we hit end of line then use high-energy limit of code - that is,
637  * include all energies */
638  if( p.lgEOL() )
640  }
641  else
642  {
643  /* option to print continuum points within emission lines block */
644  fprintf( ioQQQ, " PROBLEM PRINT CONTINUUM command is now the default, and the command has been removed.\n" );
645  }
646  }
647 
648  else if( p.nMatch("COOL") )
649  {
650  /* print cooling array for a specified one */
651  prt.nzdump = (long int)p.FFmtRead();
652 
653  /* dump all zones if argument is zero or not present */
654  if( p.lgEOL() )
655  {
656  prt.nzdump = 0;
657  }
658  }
659 
660  else if( p.nMatch("QUIE") || (p.nMatch(" OFF") &&
661  !p.nMatch("FAIN" )) )
662  {
663  /* in above, there is also a 'print faint off' command
664  * QUIET or OFF means turn off printout */
665  called.lgTalk = false;
666  input.lgVisibilityStatus = false;
667  }
668 
669  else if( p.nMatch("MACR") )
670  {
671  // print status of macros in cddefines.ht */
672  PrtMacros();
673  }
674 
675  else if( p.nMatch(" ON ") )
676  {
677  /* on means turn on printout, lgTalkIsOK is set false in grid_do.cpp.
678  * this keeps printout quiet during optimize, even when init files are parsed */
679  /* called.lgTalkForcedOff was set true with cdTalk(false), if this was
680  * set then do not respect this command. this is to prevent print on at end
681  * of init file from turning on print in grids when print is turned off */
683  {
684  called.lgTalk = cpu.i().lgMPI_talk();
685  }
686  input.lgVisibilityStatus = true;
687  }
688 
689  else if (p.nMatch("RECOMB"))
690  {
691  /* option to print recombination rates then exit */
693  }
694 
695  else if( p.nMatch("SHOR") )
696  {
697  /* make short printout, don't print last */
698  prt.lgPrtShort = true;
699  if( !prt.lgFntSet )
700  prt.TooFaint = 0.001f;
701  }
702 
703  else if( p.nMatch( " UTA" ) && p.nMatch( "REFE" ) )
704  {
705  atmdat.lgUTAprint = true;
706  }
707 
708  else if( p.nMatch("VERS") )
709  {
710  /* print compiler and code version information */
711  fprintf( ioQQQ, "\nThis is Cloudy %s\n%s\n\n" ,
712  t_version::Inst().chVersion,
713  t_version::Inst().chInfo );
714  }
715 
716  else if( p.nMatch("ZONE") || p.nMatch("EVER") )
717  {
718  /* print every nth zone - command was originally print every but
719  * is being changed to print zone */
720  num1 = (long int)p.FFmtRead();
721  if( p.lgEOL() )
722  {
723  fprintf( ioQQQ, " The number of zones to print MUST be entered on this line. Sorry.\n" );
725  }
726 
727  iterations.IterPrnt[0] = MAX2(num1,1);
728 
729  for( j=1; j < iterations.iter_malloc; j++ )
730  {
731  iterations.IterPrnt[j] = (long int)p.FFmtRead();
732  if( p.lgEOL() )
733  {
735  }
736  }
737  }
738 
739  /* check if no keywords were recognized. */
740  else
741  {
742  fprintf( ioQQQ, " There MUST be a keyword on the following line. Sorry.\n" );
743  fprintf( ioQQQ, " The PRINT FAINT command is now the PRINT LINE FAINT command.\n" );
744  p.PrintLine(ioQQQ);
746  }
747  return;
748 }
749 
750 /*prt_constants print physical and machine constants */
752 {
753  DEBUG_ENTRY( "prt_constants()" );
754 
755  fprintf(ioQQQ,"\n\nPhysical constants used by Cloudy, taken from physconst.h\n");
756 
758  fprintf(ioQQQ,"\n");
759 
760  fprintf(ioQQQ,"Some other interesting sizes:\n");
761  fprintf(ioQQQ,"bool\t%lu\n",(unsigned long)sizeof(bool));
762  fprintf(ioQQQ,"char\t%lu\n",(unsigned long)sizeof(char));
763  fprintf(ioQQQ,"int\t%lu\n",(unsigned long)sizeof(int));
764  fprintf(ioQQQ,"long int\t%lu\n",(unsigned long)sizeof(long int));
765  fprintf(ioQQQ,"unsigned int\t%lu\n",(unsigned long)sizeof(unsigned int));
766  fprintf(ioQQQ,"float\t%lu\n",(unsigned long)sizeof(sys_float));
767  fprintf(ioQQQ,"realnum\t%lu\n",(unsigned long)sizeof(realnum));
768  fprintf(ioQQQ,"double\t%lu\n",(unsigned long)sizeof(double));
769  fprintf(ioQQQ,"double*\t%lu\n",(unsigned long)sizeof(double*));
770  fprintf(ioQQQ,"\n");
771 
772  fprintf(ioQQQ,"Some float constants (from float.h and cpu.h):\n");
773  /* some constants from float.h */
774  fprintf(ioQQQ,"DBL_DIG \t%i\n", DBL_DIG); /* # of decimal digits of precision */
775  fprintf(ioQQQ,"DBL_EPSILON \t%.15g\n",DBL_EPSILON); /* smallest such that 1.0+DBL_EPSILON != 1.0 */
776  fprintf(ioQQQ,"DBL_MANT_DIG\t%i\n",DBL_MANT_DIG); /* # of bits in mantissa */
777  fprintf(ioQQQ,"DBL_MAX\t%.15g\n", DBL_MAX); /* max value */
778  fprintf(ioQQQ,"DBL_MAX_10_EXP\t%i\n", DBL_MAX_10_EXP); /* max decimal exponent */
779  fprintf(ioQQQ,"DBL_MAX_EXP\t%i\n", DBL_MAX_EXP); /* max binary exponent */
780  fprintf(ioQQQ,"DBL_MIN\t%.15g\n", DBL_MIN); /* min positive value */
781 
782  fprintf(ioQQQ,"FLT_DIG\t%i\n", FLT_DIG); /* # of decimal digits of precision */
783  fprintf(ioQQQ,"FLT_EPSILON\t%.15g\n", FLT_EPSILON); /* smallest such that 1.0+FLT_EPSILON != 1.0 */
784  fprintf(ioQQQ,"FLT_MANT_DIG\t%i\n", FLT_MANT_DIG); /* # of bits in mantissa */
785  fprintf(ioQQQ,"FLT_MAX\t%.15g\n", FLT_MAX); /* max value */
786  fprintf(ioQQQ,"FLT_MAX_10_EXP\t%i\n", FLT_MAX_10_EXP);/* max decimal exponent */
787  fprintf(ioQQQ,"FLT_MAX_EXP\t%i\n", FLT_MAX_EXP); /* max binary exponent */
788  fprintf(ioQQQ,"FLT_MIN\t%.15g\n", FLT_MIN); /* min positive value */
789  fprintf(ioQQQ,"\n");
790 
791  /* some constants from cpu.h */
792  fprintf(ioQQQ,"BIGFLOAT\t%.15g\n", BIGFLOAT);
793  fprintf(ioQQQ,"SMALLFLOAT\t%.15g\n", SMALLFLOAT);
794  fprintf(ioQQQ,"BIGDOUBLE\t%.15g\n", BIGDOUBLE);
795  fprintf(ioQQQ,"SMALLDOUBLE\t%.15g\n", SMALLDOUBLE);
796  fprintf(ioQQQ,"\n");
797 
798 
799  fprintf(ioQQQ,"Some integer constants (from limits.h and cpu.h):\n");
800  /* some constants from limits.h */
801  fprintf(ioQQQ,"INT_MAX\t%i\n", INT_MAX);
802  fprintf(ioQQQ,"INT_MIN\t%i\n", INT_MIN);
803  fprintf(ioQQQ,"UINT_MAX\t%u\n", UINT_MAX);
804  fprintf(ioQQQ,"LONG_MAX\t%li\n", LONG_MAX);
805  fprintf(ioQQQ,"LONG_MIN\t%li\n", LONG_MIN);
806  fprintf(ioQQQ,"ULONG_MAX\t%lu\n", ULONG_MAX);
807  fprintf(ioQQQ,"\n");
808 
809  /* some constants from cpu.h */
810  fprintf(ioQQQ,"INT16_MAX\t%i\n", INT16_MAX);
811  fprintf(ioQQQ,"INT16_MIN\t%i\n", INT16_MIN);
812  fprintf(ioQQQ,"UINT16_MAX\t%u\n", UINT16_MAX);
813  fprintf(ioQQQ,"INT32_MAX\t%li\n", (long)INT32_MAX);
814  fprintf(ioQQQ,"INT32_MIN\t%li\n", (long)INT32_MIN);
815  fprintf(ioQQQ,"UINT32_MAX\t%lu\n", (long)UINT32_MAX);
816 #ifdef HAVE_INT64
817 # if LONG_MAX > INT32_MAX
818  fprintf(ioQQQ,"INT64_MAX\t%li\n", (long) INT64_MAX);
819  fprintf(ioQQQ,"INT64_MIN\t%li\n", (long) INT64_MIN);
820 # else
821  fprintf(ioQQQ,"INT64_MAX\t%lli\n", INT64_MAX);
822  fprintf(ioQQQ,"INT64_MIN\t%lli\n", INT64_MIN);
823 # endif
824 #endif
825 #ifdef HAVE_UINT64
826 # if ULONG_MAX > UINT32_MAX
827  fprintf(ioQQQ,"UINT64_MAX\t%lu\n", (unsigned long) UINT64_MAX);
828 # else
829  fprintf(ioQQQ,"UINT64_MAX\t%llu\n", UINT64_MAX);
830 # endif
831 #endif
832  fprintf(ioQQQ,"\n");
833 
834 
835  fprintf(ioQQQ,"\nThis machine has %ld threads.\n", cpu.i().nCPU() );
836 
837  return;
838 }
bool nMatch(const char *chKey) const
Definition: parser.h:150
realnum wlSort2
Definition: prt.h:150
long int iter_malloc
Definition: iterations.h:40
t_atmdat atmdat
Definition: atmdat.cpp:6
bool lgPrtStart
Definition: prt.h:227
bool lgPrtTau
Definition: prt.h:171
realnum lgPrtContIndices_hi_E
Definition: prt.h:203
#define INT16_MIN
Definition: cpu.h:25
double FFmtRead(void)
Definition: parser.cpp:472
double exp10(double x)
Definition: cddefines.h:1368
const int ipHE_LIKE
Definition: iso.h:65
t_input input
Definition: input.cpp:12
const double BIGDOUBLE
Definition: cpu.h:249
bool lgPrtMaser
Definition: prt.h:168
bool lgPrnHeat
Definition: prt.h:188
const realnum SMALLFLOAT
Definition: cpu.h:246
t_cpu_i & i()
Definition: cpu.h:419
bool lgPrintLineCumulative
Definition: prt.h:268
const double SMALLDOUBLE
Definition: cpu.h:250
long int nPrnLineCell
Definition: prt.h:256
int GetQuote(string &chLabel)
Definition: parser.cpp:213
#define INT32_MAX
Definition: cpu.h:49
t_LineSave LineSave
Definition: lines.cpp:10
vector< module * > m_l
Definition: module.h:14
bool lgPrintLineAirWavelengths
Definition: prt.h:274
int nElecLevelOutput
Definition: h2_priv.h:356
bool lgFntSet
Definition: prt.h:249
FILE * ioQQQ
Definition: cddefines.cpp:7
bool lgRecom_Badnell_print
Definition: ionbal.h:207
double getWave()
Definition: parser.cpp:379
bool lgTalk
Definition: called.h:12
bool lgPrtDepartCoef
Definition: iso.h:499
bool lgPrtCitations
Definition: prt.h:294
realnum wlSort1
Definition: prt.h:150
Definition: parser.h:43
bool lgSortLineIntensity
Definition: prt.h:146
void ParsePrint(Parser &p)
static module_list & Inst()
Definition: cddefines.h:209
t_elementnames elementnames
Definition: elementnames.cpp:5
t_iso_sp iso_sp[NISO][LIMELM]
Definition: iso.cpp:11
bool lgPrintBlockIntrinsic
Definition: prt.h:134
vector< long int > IterPrnt
Definition: iterations.h:43
t_ionbal ionbal
Definition: ionbal.cpp:8
bool lgPrtArry[LIMELM]
Definition: prt.h:236
bool lgPrnIsoCollapsed
Definition: prt.h:195
bool lgPrintHeating
Definition: prt.h:233
realnum TooFaint
Definition: prt.h:244
bool lgPrnLineCell
Definition: prt.h:253
#define INT16_MAX
Definition: cpu.h:22
bool lgPrtLastIt
Definition: prt.h:216
#define STATIC
Definition: cddefines.h:118
bool lgPrtContIndices
Definition: prt.h:199
bool lgSurfaceBrightness
Definition: prt.h:179
bool lgOnlyZone
Definition: prt.h:222
bool lgPrintBlockEmergent
Definition: prt.h:138
t_rfield rfield
Definition: rfield.cpp:9
bool lgPrintFixits
Definition: broke.h:34
float realnum
Definition: cddefines.h:124
long int nstart
Definition: prt.h:230
#define EXIT_FAILURE
Definition: cddefines.h:168
float sys_float
Definition: cddefines.h:127
bool lgOnlyHead
Definition: prt.h:224
const realnum BIGFLOAT
Definition: cpu.h:244
void printDataPath() const
Definition: cpu.cpp:566
bool lgFaintOn
Definition: prt.h:245
bool lgPrtLevelPops
Definition: iso.h:502
bool lgSurfaceBrightness_SR
Definition: prt.h:179
#define cdEXIT(FAIL)
Definition: cddefines.h:482
bool lgMPI_talk() const
Definition: cpu.h:397
t_broke broke
Definition: broke.cpp:10
NORETURN void NoNumb(const char *chDesc) const
Definition: parser.cpp:345
#define UINT32_MAX
Definition: cpu.h:64
long int GetElem(void) const
Definition: parser.cpp:321
diatomics h2("h2", 4100.,&hmi.H2_total, Yan_H2_CS)
t_iterations iterations
Definition: iterations.cpp:6
long int sig_figs
Definition: lines.h:109
bool lgPrtShort
Definition: prt.h:219
t_prt prt
Definition: prt.cpp:14
bool lgUTAprint
Definition: atmdat.h:433
bool lgPrtLineLog
Definition: prt.h:264
STATIC void prt_constants(void)
bool lgPrintBlock
Definition: prt.h:130
void ParsePrtLineSum(Parser &p)
Definition: prt_linesum.cpp:18
realnum PrtTauFnt
Definition: prt.h:182
bool lgSortLines
Definition: prt.h:142
bool lgVisibilityStatus
Definition: input.h:99
const int ipH_LIKE
Definition: iso.h:64
const int LIMELM
Definition: cddefines.h:308
t_prt_matrix matrix
Definition: prt.h:238
#define DEBUG_ENTRY(funcname)
Definition: cddefines.h:723
void setSpecies(const string &sspec)
Definition: prt.cpp:193
const int ipHELIUM
Definition: cddefines.h:350
bool lgTalkForcedOff
Definition: called.h:19
bool lgPrnAges
Definition: prt.h:164
double egamry() const
Definition: mesh.h:97
#define UINT16_MAX
Definition: cpu.h:37
bool lgPrnPump
Definition: prt.h:188
long int nzdump
Definition: prt.h:291
bool lgPrintFluxEarth
Definition: prt.h:175
bool lgEOL(void) const
Definition: parser.h:113
#define MAX2(a, b)
Definition: cddefines.h:824
bool lgPrintColumns
Definition: prt.h:157
int fprintf(const Output &stream, const char *format,...)
Definition: service.cpp:1121
realnum lgPrtContIndices_lo_E
Definition: prt.h:203
bool lgPrnErr
Definition: cddefines.cpp:13
long nCPU() const
Definition: cpu.h:388
char chElementName[LIMELM][CHARS_ELEMENT_NAME]
Definition: elementnames.h:17
static const long sig_figs_max
Definition: lines.h:110
static t_cpu cpu
Definition: cpu.h:427
bool lgPrnColl
Definition: prt.h:188
const int ipHYDROGEN
Definition: cddefines.h:349
void prt_phys_constants(FILE *io)
Definition: physconst.cpp:55
#define INT32_MIN
Definition: cpu.h:52
t_called called
Definition: called.cpp:4
bool lgPrnInwd
Definition: prt.h:188
bool lgTalkIsOK
Definition: called.h:23
bool lgSortLineWavelength
Definition: prt.h:146
bool lgPrtLineArray
Definition: prt.h:260
STATIC void PrtMacros(void)
Definition: parse_print.cpp:27