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