cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
parse_drive.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 /*ParseDrive parse the drive command - drive calls to various subs */
4 /*DrvCaseBHS allow user to query hydrogen A's, asks for up, low level, gives A, drive hyas */
5 /*DrvHyas allow user to query hydrogen A's, asks for up, low level, gives A, drive hyas */
6 /*dgaunt drive gaunt factor routines by letting user query values */
7 #include "cddefines.h"
8 #include "trace.h"
9 #include "hydro_bauman.h"
10 #include "atmdat.h"
11 #include "abund.h"
12 #include "rt_escprob.h"
13 #include "rt.h"
14 #include "mc_escape.h"
15 #include "parser.h"
16 #include "thirdparty.h"
17 #include "atmdat_gaunt.h"
18 
19 /*dgaunt drive gaunt factor routines by letting user query values */
20 STATIC void dgaunt(void);
21 
22 /*DrvHyas allow user to query hydrogen A's, asks for up, low level, gives A, drive hyas */
23 STATIC void DrvHyas(void);
24 
25 /* drive escape probability routines */
26 STATIC void DrvEscP( void );
27 
28 /*DrvCaseBHS allow user to query hydrogen A's, asks for up, low level, gives A, drive hyas */
29 STATIC void DrvCaseBHS(void);
30 
31 void ParseDrive(Parser &p )
32 {
33  bool lgEOL;
34  long int n,
35  i;
36  double fac,
37  zed;
38 
39  DEBUG_ENTRY( "ParseDrive()" );
40 
41  /* NB evolve all following names to style DrvSomething */
42 
43  /* option to drive cloudy, which one? */
44  if( p.nMatch("FFMT") )
45  {
46  /* free format parser */
47  char chInput[INPUT_LINE_LENGTH];
48  fprintf( ioQQQ, " FFmtRead ParseDrive entered. Enter number.\n" );
49  lgEOL = false;
50  while( !lgEOL )
51  {
52  if( read_whole_line( chInput , (int)sizeof(chInput) , ioStdin ) == NULL )
53  {
54  fprintf( ioQQQ, " ParseDrive.dat error getting magic number\n" );
56  }
57  i = 1;
58  fac = FFmtRead(chInput,&i,sizeof(chInput),&lgEOL);
59  if( lgEOL )
60  {
61  fprintf( ioQQQ, " FFmtRead hit the EOL with no value, return=%10.2e\n",
62  fac );
63  break;
64  }
65  else if( fac == 0. )
66  {
67  break;
68  }
69  else
70  {
71  fprintf( ioQQQ, " FFmtRead returned with value%11.4e\n",
72  fac );
73  }
74  fprintf( ioQQQ, " Enter 0 to stop, or another value.\n" );
75  }
76  fprintf( ioQQQ, " FFmtRead ParseDrive exits.\n" );
77  }
78 
79  else if( p.nMatch("CASE") )
80  {
81  /* option to interpolate on Hummer and Storey case b hydrogenic emission routines */
82  DrvCaseBHS( );
83  }
84 
85  else if( p.nMatch("CDLI") )
86  {
87  /* drive cdLine to check that it finds all the right lines, routine is in lines.c */
88  trace.lgDrv_cdLine = true;
89  }
90 
91  else if( p.nMatch(" E1 ") )
92  {
93  // option to drive exponential integral routines
94  // first, special case given in Abramowitz & Stegun
95  double tau = 1.275;
96  for( i=0; i<50; ++i )
97  {
98  fprintf(ioQQQ,"tau\t%.3e\t exp-tau\t%.5e\t e1 tau\t%.5e \t e2 "
99  "\t%.5e \te2n %.5e \t e3\t%.5e \t e4\t%.5e \n",
100  tau, sexp(tau), e1(tau), e2(tau), expn(2, tau),
101  expn(3, tau), expn(4, tau) );
102  tau = exp10( ((double)i/4. - 9.) );
103  }
105  }
106 
107  else if( p.nMatch("ESCA") )
108  {
109  if ( p.nMatch("VALI") )
110  {
111  double tau = p.FFmtRead();
112  double a = p.FFmtRead();
113  if (p.lgEOL())
114  {
115  a = 0.0;
116  }
117  double beta = p.FFmtRead();
118  if (p.lgEOL())
119  {
120  beta = 0.0;
121  }
122  mc_escape(tau, a, beta);
124  }
125 
126  /* option to drive escape probability routines */
127  DrvEscP( );
128  }
129 
130  else if( p.nMatch("HYAS") )
131  {
132  /* option to drive Jason's hydrogen transition probabilities */
133  DrvHyas();
134  }
135 
136  else if( p.nMatch("GAUN") )
137  {
138  /* drive gaunt factor routine */
139  if( p.nMatch("CHEC") )
140  {
141  double Z = p.FFmtRead();
142  if( p.lgEOL() )
143  Z = 1.;
144  else
145  {
146  Z = floor(Z);
147  if( Z <= 0. || Z > LIMELM )
148  {
149  fprintf( ioQQQ, " invalid value for charge %ld\n", long(Z) );
151  }
152  }
153  dgaunt_check(Z);
154  }
155  else
156  dgaunt();
157  }
158 
159  else if( p.nMatch("PUMP") )
160  {
161  if( p.nMatch("VALI") )
162  {
163  double damp = p.FFmtRead();
164  if (p.lgEOL())
165  {
166  damp = 0.0;
167  }
168  DrivePump(damp);
170  }
171  char chInput[INPUT_LINE_LENGTH];
172  lgEOL = false;
173  fprintf( ioQQQ, " Continuum pump ParseDrive entered - Enter log tau\n" );
174  while( !lgEOL )
175  {
176  if( read_whole_line( chInput , (int)sizeof(chInput) , ioStdin ) == NULL )
177  {
178  fprintf( ioQQQ, " Parse Drive error getting optical depth\n" );
180  }
181  /* get tau */
182  i = 1;
183  double tau = FFmtRead(chInput,&i,sizeof(chInput),&lgEOL);
184  if( lgEOL )
185  break;
186  tau = exp10(tau);
187  fprintf( ioQQQ, " Tau =%11.4e\n", tau );
188  double damp = 0.;
189  fac = DrvContPump(tau, damp);
190  fprintf( ioQQQ, " ContPump =%11.4e\n", fac );
191  fprintf( ioQQQ, " Enter null to stop, or another value.\n" );
192  }
193  fprintf( ioQQQ, " ContPump ParseDrive exits.\n" );
194  }
195 
196  else if( p.nMatch("STAR") )
197  {
198  char chInput[INPUT_LINE_LENGTH];
199  /* get starburst abundances */
200  for( i=0; i < 40; i++ )
201  {
202  zed = ((double)i+1.)/4. + 0.01;
203  sprintf( chInput, "starburst, zed=%10.4f", zed );
204  p.setline(chInput);
205  abund_starburst(p);
206  fprintf( ioQQQ, "%8.1e", zed );
207  for(n=0; n < LIMELM; n++)
208  fprintf( ioQQQ, "%8.1e", abund.solar[n] );
209  fprintf( ioQQQ, "\n" );
210  }
211  }
212 
213  else if( p.nMatch("VOIGT") )
214  {
215  string file;
216  bool hasstr = ( p.GetQuote(file) == 0 );
217  FILE *ioVOIGT = ioQQQ;
218  if (hasstr)
219  ioVOIGT = open_data(file.c_str(), "w");
220 
221  if( p.nMatch("TABLE") )
222  {
223  /* create tab-delimited table giving Voigt function */
224  fprintf(ioVOIGT,"x \\ a");
225  const realnum DampLogMin = -4., DampLogMax = 4.01;
226  for( realnum damplog=DampLogMin; damplog<DampLogMax; ++damplog)
227  fprintf(ioVOIGT,"\ta=%.3e",exp10(damplog));
228  fprintf(ioVOIGT , "\n");
229 
230  for( realnum x=-2.; x<5.;x+=0.05)
231  {
232  realnum xlin = exp10(x);
233  fprintf(ioVOIGT,"%.3e",xlin);
234  for( realnum damplog=DampLogMin; damplog<DampLogMax; ++damplog)
235  {
236  realnum xval[1];
237  xval[0] = xlin;
238  realnum damp = exp10(damplog);
239  realnum yval[1];
240  VoigtH(damp,xval,yval,1);
241  fprintf(ioVOIGT , "\t%.3e",yval[0]);
242  }
243  fprintf(ioVOIGT , "\n");
244  }
245  }
246  else
247  {
248  /* Voigt function debugging print - parameter is damping constant a */
249  realnum damp = (realnum)p.FFmtRead();
250  if( p.lgEOL() )
251  {
252  fprintf( ioVOIGT, " The damping constant must appear on the print voigt command. Sorry.\n" );
254  }
255 
256  const long NVOIGT=100;
257  realnum xprofile[NVOIGT], profileVoigtH[NVOIGT];
258  for( long i=0; i<NVOIGT; ++i )
259  xprofile[i] = (realnum)i * 10.f / (realnum)NVOIGT;
260 
261  VoigtH( damp, xprofile, profileVoigtH, NVOIGT );
262 
263  fprintf(ioVOIGT,"\n x VoigtH\n");
264  for( long int i=0; i<NVOIGT; ++i )
265  {
266  fprintf(ioVOIGT,"%.4e %.4e\n", xprofile[i], profileVoigtH[i] );
267  }
268  }
269 
270  if (ioVOIGT != ioQQQ)
271  fclose(ioVOIGT);
273  }
274 
275  else
276  {
277  fprintf( ioQQQ,
278  " Unrecognized key; keys are CASE, CDLIne, E1 , ESCApe, FFMTread, GAUNt, "
279  "HYAS, PUMP, STAR, and VOIGt. Sorry.\n" );
281  }
282  return;
283 }
284 
285 /*DrvEscP user queries escape probability routines, which return values */
286 STATIC void DrvEscP( void )
287 {
288  char chCard[INPUT_LINE_LENGTH];
289  bool lgEOL;
290  long i;
291  double tau;
292 
293  DEBUG_ENTRY( "DrvEscP()" );
294 
295  /* this routine is enterd with the command escape probability, and
296  * drives the escape probability routine to compare answers */
297  fprintf( ioQQQ, " Enter the log of the one-sided optical depth; line with no number to stop.\n" );
298 
299  lgEOL = false;
300  while( !lgEOL )
301  {
302  if( read_whole_line( chCard , (int)sizeof(chCard) , ioStdin ) == NULL )
303  {
304  break;
305  }
306 
307  i = 1;
308  tau = FFmtRead(chCard,&i,sizeof(chCard),&lgEOL);
309  if( lgEOL )
310  {
311  break;
312  }
313 
314  tau = exp10(tau);
315  fprintf( ioQQQ, "tau was %e\n", tau );
316  fprintf( ioQQQ, " ESCINC=%11.3e\n", esc_PRD_1side(tau,1e-4) );
317  fprintf( ioQQQ, " ESCCOM=%11.3e\n", esc_CRDwing_1side(tau,1e-4 ) );
318  fprintf( ioQQQ, " ESCA0K2=%11.3e\n", esca0k2(tau) );
319 
320  }
321  return;
322 }
323 
324 /*DrvCaseBHS allow user to query hydrogen A's, asks for up, low level, gives A, drive hyas */
325 STATIC void DrvCaseBHS(void)
326 {
327  char chCard[INPUT_LINE_LENGTH];
328  bool lgEOL,
329  lgHit;
330  long int i,
331  n1,
332  nelem ,
333  n2;
334  double Temperature,
335  Density;
336 
337  DEBUG_ENTRY( "DrvCaseBHS()" );
338 
339  /* this routine is entered with the command DRIVE CASEB, and
340  * interpolates on the Hummer & Storey case b data set */
341 
342  /* read in some external data files, but only if this is first call */
343  fprintf(ioQQQ," I will get needed H data files. This will take a second.\n");
344  atmdat_readin();
345 
346  {
347  /* following should be set true to print input lines */
348  /*@-redef@*/
349  enum {DEBUG_LOC=false};
350  /*@+redef@*/
351  if( DEBUG_LOC )
352  {
353  double xLyman , alpha;
354  long int ipHi;
355  nelem = 2;
356  Temperature = 2e4;
357  Density = 1e2;
358  for( ipHi=3; ipHi<25; ++ipHi )
359  {
360  double photons = (1./POW2(ipHi-1.)-1./POW2((double)ipHi) ) /(1.-1./ipHi/ipHi );
361  xLyman = atmdat_HS_caseB(1,ipHi, nelem,Temperature , Density , 'A' );
362  alpha = atmdat_HS_caseB(ipHi-1,ipHi, nelem,Temperature , Density , 'A' );
363  fprintf(ioQQQ,"%li\t%.3e\t%.3e\n", ipHi, xLyman/alpha*photons, photons );
364  }
366  }
367  }
368 
369  /* first get the charge, only H and He at present */
370  lgHit = false;
371  nelem = 0;
372  while( !lgHit )
373  {
374  fprintf( ioQQQ, " Enter atomic number of species, either 1(H) or 2(He).\n" );
375  if( read_whole_line( chCard , (int)sizeof(chCard) , ioStdin ) == NULL )
376  {
377  fprintf( ioQQQ, " error getting species \n" );
379  }
380 
381  i = 1;
382  nelem = (long int)FFmtRead(chCard,&i,sizeof(chCard),&lgEOL);
383  if( lgEOL || nelem< 1 || nelem > 2 )
384  {
385  fprintf( ioQQQ, " must be either 1 or 2!\n" );
386  }
387  else
388  {
389  lgHit = true;
390  }
391  }
392 
393  fprintf(ioQQQ," In the following temperatures <10 are log, >=10 linear.\n");
394  fprintf(ioQQQ," The density is always a log.\n");
395  fprintf(ioQQQ," The order of the quantum numbers do not matter.\n");
396  fprintf(ioQQQ," The smallest must not be smaller than 2,\n");
397  fprintf(ioQQQ," and the largest must not be larger than 25.\n");
398  fprintf(ioQQQ," Units of emissivity are erg cm^3 s^-1\n\n");
399  fprintf(ioQQQ," The limits of the HS tables are 2 <= n <= 25.\n");
400 
401  lgHit = true;
402  /* this is always true */
403  while( lgHit )
404  {
405  fprintf( ioQQQ, " Enter 4 numbers, temperature, density, 2 quantum numbers, null line stop.\n" );
406  if( read_whole_line( chCard , (int)sizeof(chCard) , ioStdin ) == NULL )
407  {
408  fprintf( ioQQQ, " Thanks for interpolating on the Hummer & Storey data set!\n" );
410  }
411 
412  i = 1;
413  Temperature = FFmtRead(chCard,&i,sizeof(chCard),&lgEOL);
414  if( lgEOL )
415  {
416  fprintf( ioQQQ, " error getting temperature!\n" );
417  break;
418  }
419 
420  /* log if less than 10 */
421  if( Temperature < 10. )
422  {
423  Temperature = exp10( Temperature );
424  }
425  fprintf(ioQQQ," Temperature is %g\n", Temperature );
426 
427  Density = FFmtRead(chCard,&i,sizeof(chCard),&lgEOL);
428  if( lgEOL )
429  {
430  fprintf( ioQQQ, " error getting density!\n" );
431  break;
432  }
433  Density = exp10( Density );
434  fprintf(ioQQQ," Density is %g\n", Density );
435 
436  /* these quantum numbers can be in any order */
437  n1 = (long)FFmtRead(chCard,&i,sizeof(chCard),&lgEOL);
438  if( lgEOL )
439  {
440  fprintf( ioQQQ, " error getting quantum number!\n" );
441  break;
442  }
443 
444  n2 = (long)FFmtRead(chCard,&i,sizeof(chCard),&lgEOL);
445  if( lgEOL )
446  {
447  fprintf( ioQQQ, " error getting quantum number!\n" );
448  break;
449  }
450 
451  if( MAX2( n1 , n2 ) > 25 )
452  {
453  fprintf( ioQQQ," The limits of the HS tables are 2 <= n <= 25. Sorry.\n");
454  break;
455  }
456 
457  fprintf( ioQQQ,
458  " 4pJ(%ld,%ld)/n_e n_p=%11.3e\n",
459  n1, n2,
460  atmdat_HS_caseB(n1,n2, nelem,Temperature , Density , 'B' ) );
461 
462  /* this is check that we were in bounds */
463 #if 0
464  {
465  long j;
466  double tempTable[33] = {
467  11870.,12490.,12820.,
468  11060.,17740.,12560.,
469  16390.,16700.,11360.,
470  10240.,20740.,12030.,
471  14450.,19510.,12550.,
472  16470.,16560.,12220.,
473  15820.,12960.,10190.,
474  12960.,14060.,12560.,
475  11030.,10770.,13360.,
476  10780.,11410.,11690.,
477  12500.,13190.,21120. };
478  double edenTable[33] = {
479  10.,270.,80.,10.,70.,
480  110.,200.,10.,40.,90.,
481  340.,80.,60.,340.,30.,
482  120.,10.,50.,450.,30.,
483  180.,20.,170.,60.,20.,
484  40.,30.,20.,100.,130.,
485  10.,10.,110. };
486 
487 
488  for( j=0; j<33; j++ )
489  {
490  double halpha, hbeta, hgamma;
491 
492  halpha = atmdat_HS_caseB(2,3, 1,tempTable[j] , edenTable[j] , 'B' );
493  hbeta = atmdat_HS_caseB(2,4, 1,tempTable[j] , edenTable[j] , 'B' );
494  hgamma = atmdat_HS_caseB(2,5, 1,tempTable[j] , edenTable[j] , 'B' );
495 
496  fprintf( ioQQQ, "%e\t%e\t%e\t%e\n",
497  tempTable[j],
498  edenTable[j],
499  halpha/hbeta,
500  hgamma/hbeta );
501  }
502  }
503 #endif
504  }
505 
506  fprintf( ioQQQ, " Thanks for interpolating on the Hummer & Storey data set!\n" );
508 
509 }
510 
511 /*DrvHyas allow user to query hydrogen A's, asks for up, low level, gives A, drive hyas */
512 STATIC void DrvHyas(void)
513 {
514  char chCard[INPUT_LINE_LENGTH];
515  bool lgEOL;
516  long int i, nHi, lHi, nLo, lLo;
517 
518  DEBUG_ENTRY( "DrvHyas()" );
519 
520  /* this routine is entered with the command DRIVE HYAS, and
521  * drives Jason's hydrogen einstein A routines */
522 
523  nHi = 1;
524  /* nHi never lt 1 */
525  while( nHi != 0 )
526  {
527  fprintf( ioQQQ, " Enter four quantum numbers (n, l, n', l'), null line to stop.\n" );
528  if( read_whole_line( chCard , (int)sizeof(chCard) , ioStdin ) == NULL )
529  {
530  fprintf( ioQQQ, " error getting drvhyas \n" );
532  }
533 
534  i = 1;
535  nHi = (long int)FFmtRead(chCard,&i,sizeof(chCard),&lgEOL);
536  if( lgEOL )
537  break;
538 
539  lHi = (long int)FFmtRead(chCard,&i,sizeof(chCard),&lgEOL);
540  if( lgEOL )
541  {
542  fprintf( ioQQQ, " must be four numbers!\n" );
543  break;
544  }
545 
546  if( lHi >= nHi )
547  {
548  fprintf( ioQQQ, " l must be less than n!\n" );
549  break;
550  }
551 
552  nLo = (long int)FFmtRead(chCard,&i,sizeof(chCard),&lgEOL);
553  if( lgEOL )
554  {
555  fprintf( ioQQQ, " must be four numbers!\n" );
556  break;
557  }
558 
559  lLo = (long int)FFmtRead(chCard,&i,sizeof(chCard),&lgEOL);
560  if( lgEOL )
561  {
562  fprintf( ioQQQ, " must be four numbers!\n" );
563  break;
564  }
565 
566  if( lLo >= nLo )
567  {
568  fprintf( ioQQQ, " l must be less than n!\n" );
569  break;
570  }
571 
572  if( nLo > nHi )
573  {
574  long nTemp, lTemp;
575 
576  /* swap hi and lo */
577  nTemp = nLo;
578  lTemp = lLo;
579  nLo = nHi;
580  lLo = lHi;
581  nHi = nTemp;
582  lHi = lTemp;
583  }
584 
585  fprintf( ioQQQ, " A(%3ld,%3ld->%3ld,%3ld)=%11.3e\n",
586  nHi, lHi, nLo, lLo,
587  H_Einstein_A( nHi, lHi, nLo, lLo, 1 ) );
588 
589  }
590  fprintf( ioQQQ, " Driver exits, enter next line.\n" );
591 
592  return;
593 }
594 
595 /*dgaunt drive Gaunt factor routines by letting user query values */
597 {
598  DEBUG_ENTRY( "dgaunt()" );
599 
600  /* this routine is entered with the command DRIVE GAUNT, and
601  * drives the Gaunt factor routine to check range
602  * */
603  char chCard[INPUT_LINE_LENGTH];
604  bool lgEOL;
605 
606  fprintf( ioQQQ, " Enter 0 to input temp, energy, and net charge, or 1 for u, gamma**2, and net charge.\n" );
607  if( read_whole_line( chCard , (int)sizeof(chCard) , ioStdin ) == NULL )
608  {
609  fprintf( ioQQQ, " dgaunt error getting input line\n" );
611  }
612  long i = 1;
613  int inputflag = (int)FFmtRead(chCard,&i,sizeof(chCard),&lgEOL);
614 
615  if( inputflag == 0 )
616  {
617  fprintf( ioQQQ, " Enter the temperature (log if <=10), energy (Ryd), and net charge. Null line to stop.\n" );
618  /* >>chng 96 july 07, got rid of statement labels replacing with do while
619  * */
620  long ierror = 0;
621  while( ierror == 0 )
622  {
623  if( read_whole_line( chCard , (int)sizeof(chCard) , ioStdin ) == NULL )
624  {
625  fprintf( ioQQQ, " dgaunt error getting input line\n" );
627  }
628  i = 1;
629  double alogte = FFmtRead(chCard,&i,sizeof(chCard),&lgEOL);
630  /* the line may be trash but ierror will pick it up */
631  if( lgEOL )
632  {
633  fprintf( ioQQQ, " Gaunt driver exits, enter next line.\n" );
634  break;
635  }
636  /* numbers less than or equal to 10 are the log of the temperature */
637  double TeNew;
638  if( alogte > 10. )
639  TeNew = alogte;
640  else
641  TeNew = exp10(alogte);
642 
643  double enerlin = FFmtRead(chCard,&i,sizeof(chCard),&lgEOL);
644  if( lgEOL || enerlin == 0. )
645  fprintf( ioQQQ, " Sorry, but there should be two more numbers, energy and charge.\n" );
646 
647  double z = FFmtRead(chCard,&i,sizeof(chCard),&lgEOL);
648  if( lgEOL || z == 0. )
649  fprintf( ioQQQ, " Sorry, but there should be a third number, charge.\n" );
650 
651  /* This is thermally averaged Gaunt factor */
652  double mygaunt = t_gaunt::Inst().gauntff( long(z), TeNew, enerlin );
653  fprintf( ioQQQ, " Using my routine, Gff= %.4e\n", mygaunt );
654  }
655  }
656  else
657  {
658  /* this routine is entered with the command DRIVE GAUNT, and
659  * drives the Gaunt factor routine to check range
660  * */
661  fprintf( ioQQQ, " Enter log u, log gamma2, and net charge. Null line to stop.\n" );
662  long ierror = 0;
663  while( ierror == 0 )
664  {
665  if( read_whole_line( chCard , (int)sizeof(chCard) , ioStdin ) == NULL )
666  {
667  fprintf( ioQQQ, " dgaunt error getting input line\n" );
669  }
670  i = 1;
671  double logu = FFmtRead(chCard,&i,sizeof(chCard),&lgEOL);
672  /* the line may be trash but ierror will pick it up */
673  if( lgEOL )
674  {
675  fprintf( ioQQQ, " Gaunt driver exits, enter next line.\n" );
676  break;
677  }
678 
679  double loggamma2 = FFmtRead(chCard,&i,sizeof(chCard),&lgEOL);
680  if( lgEOL )
681  fprintf( ioQQQ, " Sorry, but there should be two more numbers, log gamma2 and charge.\n" );
682 
683  double z = FFmtRead(chCard,&i,sizeof(chCard),&lgEOL);
684  if( lgEOL )
685  fprintf( ioQQQ, " Sorry, but there should be another number, charge.\n" );
686 
687  /* This is my attempt to calculate thermally averaged Gaunt factors. */
688  double mygaunt = t_gaunt::Inst().gauntff( long(z), TE1RYD*pow2(z)/exp10(loggamma2),
689  pow2(z)*exp10(logu-loggamma2) );
690  fprintf( ioQQQ, " Using my routine, Gff= %.4e\n", mygaunt );
691  }
692  }
693 }
bool nMatch(const char *chKey) const
Definition: parser.h:140
FILE * open_data(const char *fname, const char *mode, access_scheme scheme)
Definition: cpu.cpp:751
STATIC void DrvEscP(void)
double FFmtRead(void)
Definition: parser.cpp:438
double exp10(double x)
Definition: cddefines.h:1383
void setline(const char *const card)
Definition: parser.h:79
bool lgDrv_cdLine
Definition: trace.h:115
double DrvContPump(double tau, double damp)
double e1(double x)
void DrivePump(double tau)
int GetQuote(string &chLabel)
Definition: parser.cpp:184
void dgaunt_check(double Z)
sys_float sexp(sys_float x)
Definition: service.cpp:1095
FILE * ioQQQ
Definition: cddefines.cpp:7
double expn(int n, double x)
Definition: parser.h:42
static t_gaunt & Inst()
Definition: cddefines.h:209
t_trace trace
Definition: trace.cpp:5
t_abund abund
Definition: abund.cpp:5
void mc_escape(double tau_in, double a, double beta)
Definition: mc_escape.cpp:92
#define POW2
Definition: cddefines.h:983
#define STATIC
Definition: cddefines.h:118
float realnum
Definition: cddefines.h:124
#define EXIT_FAILURE
Definition: cddefines.h:168
const int INPUT_LINE_LENGTH
Definition: cddefines.h:301
#define cdEXIT(FAIL)
Definition: cddefines.h:484
double atmdat_HS_caseB(long int iHi, long int iLo, long int iZ, double TempIn, double DenIn, char chCase)
void ParseDrive(Parser &p)
Definition: parse_drive.cpp:31
double esc_PRD_1side(double tau, double a)
Definition: rt_escprob.cpp:116
double gauntff(long Z, double Te, double anu)
const int LIMELM
Definition: cddefines.h:307
T pow2(T a)
Definition: cddefines.h:985
#define DEBUG_ENTRY(funcname)
Definition: cddefines.h:729
STATIC void DrvHyas(void)
STATIC void DrvCaseBHS(void)
bool lgEOL(void) const
Definition: parser.h:103
#define MAX2(a, b)
Definition: cddefines.h:828
void atmdat_readin(void)
int fprintf(const Output &stream, const char *format,...)
Definition: service.cpp:1217
void abund_starburst(Parser &p)
double e2(double x)
char * read_whole_line(char *chLine, int nChar, FILE *ioIN)
Definition: service.cpp:72
double esca0k2(double taume)
Definition: rt_escprob.cpp:376
double esc_CRDwing_1side(double tau, double a)
Definition: rt_escprob.cpp:165
double H_Einstein_A(long int n, long int l, long int np, long int lp, long int iz)
STATIC void dgaunt(void)
void VoigtH(realnum a, const realnum v[], realnum y[], int n)
Definition: thirdparty.h:418
FILE * ioStdin
Definition: cddefines.cpp:8
#define EXIT_SUCCESS
Definition: cddefines.h:166
double FFmtRead(const char *chCard, long int *ipnt, long int last, bool *lgEOL)
Definition: service.cpp:393
realnum solar[LIMELM]
Definition: abund.h:210