cloudy  trunk
transition.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 
4 #include "cddefines.h"
5 #include "transition.h"
6 #include "version.h"
7 #include "dense.h"
8 #include "elementnames.h"
9 #include "lines.h"
10 #include "lines_service.h"
11 #include "opacity.h"
12 #include "phycon.h"
13 #include "radius.h"
14 #include "rfield.h"
15 #include "rt.h"
16 #include "taulines.h"
17 #include "conv.h"
18 
19 /*outline - adds line photons to reflin and outlin */
20 /*PutLine enter local line intensity into the intensity stack for eventual printout */
21 /*PutExtra enter and 'extra' intensity source for some line */
22 /*DumpLine print various information about an emission line vector,
23  * used in debugging, print to std out, ioQQQ */
24 /*TexcLine derive excitation temperature of line from contents of line array */
25 /*transition::Zero zeros out transition */
26 /*LineConvRate2CS convert down coll rate back into electron cs in case other parts of code need this for reference */
27 /*OccupationNumberLine - derive the photon occupation number at line center for any line */
28 /*MakeCS compute collision strength by g-bar approximations */
29 /*gbar1 compute g-bar collision strength using Mewe approximations */
30 /*gbar0 compute g-bar gaunt factor for neutrals */
31 /*emit_frac returns fraction of populations the produce emission */
32 /*chIonLbl use information in line array to generate a null terminated ion label in "Fe 2" */
33 /*chLineLbl use information in line transfer arrays to generate a line label */
34 /*PutCS enter a collision strength into an individual line vector */
35 
36 /*outline - adds line photons to reflin and outlin */
38 {
39  bool lgDoChecks = true;
40  outline(Emis().ColOvTot(), lgDoChecks);
41 }
42 
43 /*outline - adds line photons to reflin and outlin */
44 void TransitionProxy::outline( double nonScatteredFraction,
45  bool lgDoChecks ) const
46 {
47  long int ip = ipCont()-1;
48 
49  DEBUG_ENTRY( "TransitionProxy::outline()" );
50 
51  if ( 0 && lgDoChecks)
52  {
53  // nothing to do if very small photon flux or below plasma frequency
54  ASSERT( Emis().phots() >= 0. );
55  if( Emis().phots() < SMALLFLOAT || EnergyErg() / EN1RYD <= rfield.plsfrq )
56  return;
57 
58  ASSERT( Emis().FracInwd() >= 0. );
59  ASSERT( radius.BeamInIn >= 0. );
60  ASSERT( radius.BeamInOut >= 0. );
61  double Ptot = Emis().Pesc() + Emis().Pelec_esc();
62  double PhotEmit = Emis().Aul()*Ptot*(*Hi()).Pop();
63  // do not assert accuracy if close to bounds of fp precision
64  double error = MAX2( SMALLFLOAT*1e3 , 3e-1*PhotEmit );
65  // do not assert if do not have valid solution
66  bool lgGoodSolution = conv.lgConvEden && conv.lgConvIoniz() &&
68  // see ticket #135 rt inconsistent results
69  // this assert trips on a regular basis. The fix is to rewrite
70  // the RT and level population solvers so that the level population
71  // and OTS rates are done simultaneously rather than sequentially
72  // For now do not throw the assert on a release version - we know
73  // about this problem
74  ASSERT( t_version::Inst().lgRelease || !lgGoodSolution ||
75  Ptot < 1e-3 || fp_equal_tol( Emis().phots(), PhotEmit , error ));
76  }
77 
78  bool lgTransStackLine = true;
79  outline_base(Emis().dampXvel(), Emis().damp(), lgTransStackLine, ip, Emis().phots(), Emis().FracInwd(),
80  nonScatteredFraction);
81 }
82 
83 /*emit_frac returns fraction of populations the produce emission */
84 double emit_frac(const TransitionProxy& t)
85 {
86  DEBUG_ENTRY( "emit_frac()" );
87 
88  ASSERT( t.ipCont() > 0 );
89 
90  /* collisional deexcitation and destruction by background opacities
91  * are loss of photons without net emission */
92  double deexcit_loss = t.Coll().col_str() * dense.cdsqte + t.Emis().Aul()*t.Emis().Pdest();
93  /* this is what is observed */
94  double rad_deexcit = t.Emis().Aul()*(t.Emis().Pelec_esc() + t.Emis().Pesc());
95  return rad_deexcit/(deexcit_loss + rad_deexcit);
96 }
97 
98 /*DumpLine print various information about an emission line vector,
99  * used in debugging, print to std out, ioQQQ */
100 void DumpLine(const TransitionProxy& t)
101 {
102  char chLbl[110];
103 
104  DEBUG_ENTRY( "DumpLine()" );
105 
106  ASSERT( t.ipCont() > 0 );
107 
108  /* routine to print contents of line arrays */
109  strcpy( chLbl, "DEBUG ");
110  strcat( chLbl, chLineLbl(t) );
111 
112  fprintf( ioQQQ,
113  "%10.10s Te%.2e eden%.1e CS%.2e Aul%.1e Tex%.2e cool%.1e het%.1e conopc%.1e albdo%.2e\n",
114  chLbl,
115  phycon.te,
116  dense.eden,
117  t.Coll().col_str(),
118  t.Emis().Aul(),
119  TexcLine(t),
120  t.Coll().cool(),
121  t.Coll().heat() ,
122  opac.opacity_abs[t.ipCont()-1],
123  opac.albedo[t.ipCont()-1]);
124 
125  fprintf( ioQQQ,
126  "Tin%.1e Tout%.1e Esc%.1e eEsc%.1e DesP%.1e Pump%.1e OTS%.1e PopL,U %.1e %.1e PopOpc%.1e\n",
127  t.Emis().TauIn(),
128  t.Emis().TauTot(),
129  t.Emis().Pesc(),
130  t.Emis().Pelec_esc(),
131  t.Emis().Pdest(),
132  t.Emis().pump(),
133  t.Emis().ots(),
134  (*t.Lo()).Pop(),
135  (*t.Hi()).Pop() ,
136  t.Emis().PopOpc() );
137  return;
138 }
139 
140 
141 /*OccupationNumberLine - derive the photon occupation number at line center for any line */
143 {
144  double OccupationNumberLine_v;
145 
146  DEBUG_ENTRY( "OccupationNumberLine()" );
147 
148  ASSERT( t.ipCont() > 0 );
149 
150  /* routine to evaluate line photon occupation number -
151  * return negative number if line is maser */
152  if( fabs(t.Emis().PopOpc()) > SMALLFLOAT )
153  {
154  /* the lower population with correction for stimulated emission */
155  OccupationNumberLine_v = ( (*t.Hi()).Pop() / (*t.Hi()).g() ) /
156  ( t.Emis().PopOpc() / (*t.Lo()).g() ) *
157  (1. - t.Emis().Pesc());
158  }
159  else
160  {
161  OccupationNumberLine_v = 0.;
162  }
163  /* return value is not guaranteed to be positive - negative if
164  * line mases */
165  return( OccupationNumberLine_v );
166 }
167 
168 /*TexcLine derive excitation temperature of line from contents of line array */
169 double TexcLine(const TransitionProxy& t)
170 {
171  double TexcLine_v;
172 
173  DEBUG_ENTRY( "TexcLine()" );
174 
175  /* routine to evaluate line excitation temp using contents of line array
176  * */
177  if( (*t.Hi()).Pop() * (*t.Lo()).Pop() > 0. )
178  {
179  TexcLine_v = ( (*t.Hi()).Pop() / (*t.Hi()).g() )/( (*t.Lo()).Pop() / (*t.Lo()).g() );
180  TexcLine_v = log(TexcLine_v);
181  /* protect against infinite temp limit */
182  if( fabs(TexcLine_v) > SMALLFLOAT )
183  {
184  TexcLine_v = - t.EnergyK() / TexcLine_v;
185  }
186  }
187  else
188  {
189  TexcLine_v = 0.;
190  }
191  return( TexcLine_v );
192 }
193 
194 /*chIonLbl use information in line array to generate a null terminated ion label in "Fe 2" */
195 void chIonLbl(char *chIonLbl_v, const TransitionProxy& t)
196 {
197  DEBUG_ENTRY( "chIonLbl()" );
198 
199  /* function to use information within the line array
200  * to generate an ion label, giving element and
201  * ionization stage
202  * */
203  if( (*t.Hi()).nelem() < 0 )
204  {
205  /* this line is to be ignored */
206  if( (*t.Hi()).chLabel()[0]=='\0' )
207  strcpy( chIonLbl_v, "Dumy" );
208  else
209  strcpy( chIonLbl_v, (*t.Hi()).chLabel() );
210  }
211  else
212  {
213  chIonLbl( chIonLbl_v, (*t.Hi()).nelem(), (*t.Hi()).IonStg() );
214  }
215  /* chIonLbl is four char null terminated string */
216  return/*( chIonLbl_v )*/;
217 }
218 
219 void chIonLbl(char *chIonLbl_v, const long& nelem, const long& IonStg)
220 {
221  DEBUG_ENTRY( "chIonLbl()" );
222 
223  // NB - nelem passed here is expected to be on the physical scale, not C (so hydrogen = 1).
224  ASSERT( nelem >= 1 );
225  ASSERT( nelem <= LIMELM );
226  /* ElmntSym.chElementSym is null terminated, 2 ch + null, string giving very
227  * short form of element name */
228  strcpy( chIonLbl_v , elementnames.chElementSym[nelem-1] );
229  /* chIonStage is four char null terminated string, starting with "_1__" */
230  strcat( chIonLbl_v, elementnames.chIonStage[IonStg-1] );
231  return;
232 }
233 
234 /*chLineLbl use information in line transfer arrays to generate a line label */
235 /* this label is null terminated */
236 /* ContCreatePointers has test this with full range of wavelengths */
237 char* chLineLbl(const TransitionProxy& t)
238 {
239  static char chLineLbl_v[11];
240  static char chSpecies[5];
241 
242  DEBUG_ENTRY( "chLineLbl()" );
243 
244  if( (*t.Hi()).nelem() < 1 && (*t.Hi()).IonStg() < 1 )
245  {
246  sprintf( chSpecies, "%4.4s", (*t.Hi()).chLabel() );
247  }
248  else
249  {
250  ASSERT( (*t.Hi()).nelem() >= 1 );
251  ASSERT( (*t.Hi()).IonStg() >= 1 && (*t.Hi()).IonStg() <= (*t.Hi()).nelem() + 1 );
252  sprintf( chSpecies, "%2.2s%2.2s",
253  elementnames.chElementSym[(*t.Hi()).nelem() -1],
254  elementnames.chIonStage[(*t.Hi()).IonStg()-1] );
255  }
256 
257  /* function to use information within the line array
258  * to generate a line label, giving element and
259  * ionization stage
260  * rhs are set in large block data */
261 
262  /* NB this function is profoundly slow due to sprintf statement
263  * also - it cannot be evaluated within a write statement itself*/
264 
265  if( t.WLAng() > (realnum)INT_MAX )
266  {
267  sprintf( chLineLbl_v, "%4.4s%5i%c", chSpecies,
268  (int)(t.WLAng()/1e8), 'c' );
269  }
270  else if( t.WLAng() > 9999999. )
271  {
272  /* wavelength is very large, convert to centimeters */
273  sprintf( chLineLbl_v, "%4.4s%5.2f%c", chSpecies,
274  t.WLAng()/1e8, 'c' );
275  }
276  else if( t.WLAng() > 999999. )
277  {
278  /* wavelength is very large, convert to microns */
279  sprintf( chLineLbl_v, "%4.4s%5i%c", chSpecies,
280  (int)(t.WLAng()/1e4), 'm' );
281  }
282  else if( t.WLAng() > 99999. )
283  {
284  /* wavelength is very large, convert to microns */
285  sprintf( chLineLbl_v, "%4.4s%5.1f%c", chSpecies,
286  t.WLAng()/1e4, 'm' );
287  }
288  else if( t.WLAng() > 9999. )
289  {
290  sprintf( chLineLbl_v, "%4.4s%5.2f%c", chSpecies,
291  t.WLAng()/1e4, 'm' );
292  }
293  else if( t.WLAng() >= 100. )
294  {
295  sprintf( chLineLbl_v, "%4.4s%5i%c", chSpecies,
296  (int)t.WLAng(), 'A' );
297  }
298  /* the following two formats should be changed for the
299  * wavelength to get more precision */
300  else if( t.WLAng() >= 10. )
301  {
302  sprintf( chLineLbl_v, "%4.4s%5.1f%c", chSpecies,
303  t.WLAng(), 'A' );
304  }
305  else
306  {
307  sprintf( chLineLbl_v, "%4.4s%5.2f%c", chSpecies,
308  t.WLAng(), 'A' );
309  }
310  /* make sure that string ends with null character - this should
311  * be redundant */
312  ASSERT( chLineLbl_v[10]=='\0' );
313  return( chLineLbl_v );
314 }
315 
316 /*PutCS enter a collision strength into an individual line vector */
317 void PutCS(double cs,
318  const TransitionProxy& t)
319 {
320  DEBUG_ENTRY( "PutCS()" );
321 
322  /* collision strength must be non-negative */
323  ASSERT( cs > 0. );
324 
325  t.Coll().col_str() = (realnum)cs;
326 
327  return;
328 }
329 
330 void GenerateTransitionConfiguration( const TransitionProxy &t, char *chComment )
331 {
332  strcpy( chComment, (*t.Lo()).chConfig() );
333  strcat( chComment, " - " );
334  strcat( chComment, (*t.Hi()).chConfig() );
335  return;
336 }
337 
339 
340 /*PutLine enter local line intensity into the intensity stack for eventual printout */
341 STATIC void PutLine_base(const TransitionProxy& t, const char *chComment, const char *chLabelTemp, bool lgLabel)
342 {
343  DEBUG_ENTRY( "PutLine_base()" );
344 
345  char chLabel[5];
346  double xIntensity,
347  other,
348  xIntensity_in;
349 
350  /* routine to use line array data to generate input
351  * for emission line array */
352  ASSERT( t.ipCont() > 0. );
353 
354  if (lgLabel == true)
355  {
356  strncpy( chLabel, chLabelTemp, 4 );
357  chLabel[4] = '\0';
358  }
359 
360  /* if ipass=0 then we must generate label info since first pass
361  * gt.0 then only need line intensity data */
362  if( LineSave.ipass == 0 )
363  {
364  if (lgLabel == false)
365  {
366  /* these variables not used by linadd if ipass ne 0 */
367  /* chIonLbl is function that generates a null terminated 4 char string, of form "C 2" */
368  chIonLbl(chLabel, t);
369  }
370  xIntensity = 0.;
371  }
372  else
373  {
374  /* both the counting and integrating modes comes here */
375  /* not actually used so set to safe value */
376  chLabel[0] = '\0';
377  /* total line intensity or luminosity
378  * these may not be defined in initial calls so define here */
379  xIntensity = t.Emis().xIntensity() + ExtraInten;
380  }
381 
382  /* initial counting case, where ipass == -1, just ignored above, call linadd below */
383 
384  /* ExtraInten is option that allows extra intensity (i.e., recomb)
385  * to be added to this line with Call PutExtra( exta )
386  * in main lines this extra
387  * contribution must be identified explicitly */
388  ExtraInten = 0.;
389  /*linadd(xIntensity,wl,chLabel,'i');*/
390  /*lindst add line with destruction and outward */
391  rt.fracin = t.Emis().FracInwd();
392  lindst(xIntensity,
393  t.WLAng(),
394  chLabel,
395  t.ipCont(),
396  /* this is information only - has been counted in cooling already */
397  't',
398  /* do not add to outward beam, also done separately */
399  false,
400  chComment);
401  rt.fracin = 0.5;
402 
403  /* inward part of line - do not move this away from previous lines
404  * since xIntensity is used here */
405  xIntensity_in = xIntensity*t.Emis().FracInwd();
406  ASSERT( xIntensity_in>=0. );
407  linadd(xIntensity_in,t.WLAng(),"Inwd",'i',chComment);
408 
409  /* cooling part of line */
410  other = t.Coll().cool();
411  linadd(other,t.WLAng(),"Coll",'i',chComment);
412 
413  /* fluorescent excited part of line */
414  double radiative_branching;
415  enum { lgNEW = true };
416  if (lgNEW)
417  {
418  // Improved two-level version of radiative branching ratio
419  const double AulEscp = t.Emis().Aul()*(t.Emis().Pesc()+t.Emis().Pelec_esc());
420  // Would be better to include all outward transition processes from the
421  // line, to cater for the general non-two-level case
422  const double sinkrate = AulEscp + t.Emis().Aul()*t.Emis().Pdest() + t.Coll().ColUL( colliders );
423  if (sinkrate > 0.0)
424  {
425  radiative_branching = AulEscp/sinkrate;
426  }
427  else
428  {
429  radiative_branching = 0.;
430  }
431  }
432  else
433  {
434  // This is the excitation ratio not the de-excitation ratio according
435  // to its specification
436  radiative_branching = (1.-t.Emis().ColOvTot());
437  }
438 
439  other = (*t.Lo()).Pop() * t.Emis().pump() * radiative_branching * t.EnergyErg();
440  linadd(other,t.WLAng(),"Pump",'i',chComment);
441 
442 
443  /* heating part of line */
444  other = t.Coll().heat();
445  linadd(other,t.WLAng(),"Heat",'i',chComment);
446 }
447 
448 /*PutLine enter local line intensity into the intensity stack for eventual printout */
449 void PutLine(const TransitionProxy& t, const char *chComment, const char *chLabelTemp)
450 {
451  const bool lgLabel = true;
452  DEBUG_ENTRY( "PutLine()" );
453  PutLine_base(t, chComment, chLabelTemp, lgLabel);
454 }
455 
456 /*PutLine enter local line intensity into the intensity stack for eventual printout */
457 void PutLine(const TransitionProxy& t,
458  const char *chComment)
459 {
460  const bool lgLabel = false;
461  const char *chLabelTemp = NULL;
462  DEBUG_ENTRY( "PutLine()" );
463  PutLine_base(t, chComment, chLabelTemp, lgLabel);
464 }
465 
466 /* ==================================================================== */
467 /*PutExtra enter and 'extra' intensity source for some line */
468 void PutExtra(double Extra)
469 {
470 
471  DEBUG_ENTRY( "PutExtra()" );
472 
473  ExtraInten = (realnum)Extra;
474  return;
475 }
476 
477 void TransitionProxy::Junk( void ) const
478 {
479 
480  DEBUG_ENTRY( "TransitionProxy::Junk()" );
481 
482  /* wavelength, usually in A, used for printout */
483  WLAng() = -FLT_MAX;
484 
485  /* transition energy in wavenumbers */
486  EnergyWN() = -FLT_MAX;
487 
488  /* array offset for radiative transition within continuum array
489  * is negative if transition is non-radiative. */
490  ipCont() = -10000;
491 
492  CollisionJunk( Coll() );
493 
494  /* set these equal to NULL first. That will cause the code to crash if
495  * the variables are ever used before being deliberately set. */
496  ipEmis() = -1;
497 
498  setLo(-1);
499  setHi(-1);
500  return;
501 }
502 
503 /*TransitionZero zeros out transition array at start of calculation, sets
504  * optical depths to initial values */
505 void TransitionProxy::Zero( void ) const
506 {
507 
508  DEBUG_ENTRY( "TransitionProxy::Zero()" );
509 
510  CollisionZero( Coll() );
511 
512  ::Zero( *Lo() );
513  ::Zero( *Hi() );
514  EmLineZero( Emis() );
515  TauZero( Emis() );
516 
517  return;
518 }
519 
520 /*LineConvRate2CS convert down coll rate back into electron cs in case other parts of code need this for reference */
521 void LineConvRate2CS( const TransitionProxy& t , realnum rate )
522 {
523 
524  DEBUG_ENTRY( "LineConvRate2CS()" );
525 
526  /* return is collision strength, convert from collision rate from
527  * upper to lower, this assumes pure electron collisions, but that will
528  * also be assumed by anything that uses cs, for self-consistency */
529  t.Coll().col_str() = rate * (*t.Hi()).g() / (realnum)dense.cdsqte;
530 
531  /* change assert to non-negative - there can be cases (Iin H2) where cs has
532  * underflowed to 0 on some platforms */
533  ASSERT( t.Coll().col_str() >= 0. );
534  return;
535 }
536 
537 /*gbar0 compute g-bar gaunt factor for neutrals */
538 STATIC void gbar0(double ex,
539  realnum *g)
540 {
541  double a,
542  b,
543  c,
544  d,
545  y;
546 
547  DEBUG_ENTRY( "gbar0()" );
548 
549  /* written by Dima Verner
550  *
551  * Calculation of the effective Gaunt-factor by use of
552  * >>refer gbar cs Van Regemorter, H., 1962, ApJ 136, 906
553  * fits for neutrals
554  * Input parameters:
555  * ex - energy ryd - now K
556  * t - temperature in K
557  * Output parameter:
558  * g - effective Gaunt factor
559  * */
560 
561  /* y = ex*157813.7/te */
562  y = ex/phycon.te;
563  if( y < 0.01 )
564  {
565  *g = (realnum)(0.29*(log(1.0+1.0/y) - 0.4/POW2(y + 1.0))/exp(y));
566  }
567  else
568  {
569  if( y > 10.0 )
570  {
571  *g = (realnum)(0.066/sqrt(y));
572  }
573  else
574  {
575  a = 1.5819068e-02;
576  b = 1.3018207e00;
577  c = 2.6896230e-03;
578  d = 2.5486007e00;
579  d = log(y/c)/d;
580  *g = (realnum)(a + b*exp(-0.5*POW2(d)));
581  }
582  }
583  return;
584 }
585 
586 /*gbar1 compute g-bar collision strength using Mewe approximations */
587 STATIC void gbar1(double ex,
588  realnum *g)
589 {
590  double y;
591 
592  DEBUG_ENTRY( "gbar1()" );
593 
594  /* *written by Dima Verner
595  *
596  * Calculation of the effective Gaunt-factor by use of
597  * >>refer gbar cs Mewe,R., 1972, A&A 20, 215
598  * fits for permitted transitions in ions MgII, CaII, FeII (delta n = 0)
599  * Input parameters:
600  * ex - excitation energy in Ryd - now K
601  * te - temperature in K
602  * Output parameter:
603  * g - effective Gaunt factor
604  */
605 
606  /* y = ex*157813.7/te */
607  y = ex/phycon.te;
608  *g = (realnum)(0.6 + 0.28*(log(1.0+1.0/y) - 0.4/POW2(y + 1.0)));
609  return;
610 }
611 
612 /*MakeCS compute collision strength by g-bar approximations */
613 void MakeCS(const TransitionProxy& t)
614 {
615  long int ion;
616  double Abun,
617  cs;
618  realnum
619  gbar;
620 
621  DEBUG_ENTRY( "MakeCS()" );
622 
623  /* routine to get cs from various approximations */
624 
625  /* check if abundance greater than 0 */
626  ion = (*t.Hi()).IonStg();
627 
628  //This is the oscillator strength limit where larger values are assumed to be for allowed transitions.
629  static double gfLimit = 1e-8;
630 
631  Abun = dense.xIonDense[ (*t.Hi()).nelem() -1 ][ ion-1 ];
632  if( Abun <= 0. )
633  {
634  gbar = 1.;
635  }
636  else if( t.Emis().gf() >= gfLimit )
637  {
638  /* check if neutral or ion */
639  if( ion == 1 )
640  {
641  /* neutral - compute gbar for eventual cs */
642  gbar0(t.EnergyK(),&gbar);
643  }
644  else
645  {
646  /* ion - compute gbar for eventual cs */
647  gbar1(t.EnergyK(),&gbar);
648  }
649  }
650  else
651  {
652  //Mewe72 provides a gbar estimate for forbidden transitions.
653  gbar = 0.15;
654  }
655 
656  /* above was g-bar, convert to cs */
657  cs = gbar*(14.5104/WAVNRYD)*t.Emis().gf()/t.EnergyWN();
658 
659  /* stuff the cs in place */
660  t.Coll().col_str() = (realnum)cs;
661  return;
662 }
663 
665 {
666  DEBUG_ENTRY( "AddLine2Stack()" );
667 
668  ASSERT( lgLinesAdded == false );
669 
670  size_t newsize = m_list->Emis.size()+1;
671  m_list->Emis.resize(newsize);
672  ipEmis() = newsize-1;
673  this->resetEmis();
674 }
675 
677 {
678  DEBUG_ENTRY( "AddLoState()" );
679 
680  ASSERT( !lgStatesAdded );
681 
683 
684  setLo(m_list->states->size()-1);
685 }
686 
688 {
689  DEBUG_ENTRY( "AddHiState()" );
690 
691  ASSERT( !lgStatesAdded );
692 
694 
695  setHi(m_list->states->size()-1);
696 }
chLineLbl
char * chLineLbl(const TransitionProxy &t)
Definition: transition.cpp:237
outline_base
void outline_base(double dampXvel, double damp, bool lgTransStackLine, long int ip, double phots, realnum inwd, double nonScatteredFraction)
Definition: lines_service.cpp:396
TransitionProxy::EnergyErg
realnum EnergyErg() const
Definition: transition.h:78
t_rfield::plsfrq
realnum plsfrq
Definition: rfield.h:447
emit_frac
double emit_frac(const TransitionProxy &t)
Definition: transition.cpp:84
TransitionProxy::resetEmis
void resetEmis() const
Definition: transition.h:58
lines.h
CollisionProxy::cool
double & cool() const
Definition: collision.h:190
t_dense::eden
double eden
Definition: dense.h:190
DumpLine
void DumpLine(const TransitionProxy &t)
Definition: transition.cpp:100
colliders
ColliderList colliders
Definition: collision.cpp:57
TransitionListImpl::Emis
EmissionList Emis
Definition: transition.h:216
dense
t_dense dense
Definition: dense.cpp:24
elementnames.h
t_dense::cdsqte
double cdsqte
Definition: dense.h:235
t_conv::lgConvEden
bool lgConvEden
Definition: conv.h:202
Singleton< t_version >::Inst
static t_version & Inst()
Definition: cddefines.h:175
MakeCS
void MakeCS(const TransitionProxy &t)
Definition: transition.cpp:613
rfield
t_rfield rfield
Definition: rfield.cpp:8
PutExtra
void PutExtra(double Extra)
Definition: transition.cpp:468
ioQQQ
FILE * ioQQQ
Definition: cddefines.cpp:7
elementnames
t_elementnames elementnames
Definition: elementnames.cpp:5
EmissionProxy::xIntensity
double & xIntensity() const
Definition: emission.h:483
TexcLine
double TexcLine(const TransitionProxy &t)
Definition: transition.cpp:169
realnum
float realnum
Definition: cddefines.h:103
t_elementnames::chIonStage
char chIonStage[LIMELM+1][CHARS_ION_STAGE]
Definition: elementnames.h:29
TransitionProxy::WLAng
realnum & WLAng() const
Definition: transition.h:429
TransitionProxy::AddHiState
void AddHiState() const
Definition: transition.cpp:687
conv.h
rfield.h
STATIC
#define STATIC
Definition: cddefines.h:97
EmissionProxy::PopOpc
double & PopOpc() const
Definition: emission.h:603
t_opac::albedo
double * albedo
Definition: opacity.h:104
TransitionProxy::setLo
void setLo(int ipLo) const
Definition: transition.h:400
phycon
t_phycon phycon
Definition: phycon.cpp:6
ex
static double * ex
Definition: species2.cpp:28
lines_service.h
EmissionProxy::Pdest
realnum & Pdest() const
Definition: emission.h:543
TransitionProxy::ipCont
long & ipCont() const
Definition: transition.h:450
ASSERT
#define ASSERT(exp)
Definition: cddefines.h:578
t_rt::fracin
realnum fracin
Definition: rt.h:239
version.h
t_radius::BeamInIn
double BeamInIn
Definition: radius.h:102
TransitionProxy::Coll
CollisionProxy Coll() const
Definition: transition.h:424
opac
t_opac opac
Definition: opacity.cpp:5
EmissionProxy::TauIn
realnum & TauIn() const
Definition: emission.h:423
POW2
#define POW2
Definition: cddefines.h:929
TransitionProxy
Definition: transition.h:23
lindst
void lindst(double xInten, realnum wavelength, const char *chLab, long int ipnt, char chInfo, bool lgOutToo, const char *chComment)
Definition: lines_service.cpp:468
CollisionProxy::heat
double & heat() const
Definition: collision.h:194
LineSave
t_LineSave LineSave
Definition: lines.cpp:5
TransitionListImpl::states
qList * states
Definition: transition.h:215
transition.h
ExtraInten
static realnum ExtraInten
Definition: transition.cpp:338
radius
t_radius radius
Definition: radius.cpp:5
TransitionProxy::Emis
EmissionList::reference Emis() const
Definition: transition.h:408
t_conv::lgConvIoniz
bool lgConvIoniz() const
Definition: conv.h:115
linadd
void linadd(double xInten, realnum wavelength, const char *chLab, char chInfo, const char *chComment)
Definition: lines_service.cpp:316
gbar1
STATIC void gbar1(double ex, realnum *g)
Definition: transition.cpp:587
dense.h
CollisionZero
void CollisionZero(const CollisionProxy &t)
Definition: collision.cpp:81
TransitionProxy::Lo
qList::iterator Lo() const
Definition: transition.h:392
cddefines.h
qList::resize
void resize(size_t i)
Definition: quantumstate.h:83
WAVNRYD
const UNUSED double WAVNRYD
Definition: physconst.h:173
chIonLbl
void chIonLbl(char *chIonLbl_v, const TransitionProxy &t)
Definition: transition.cpp:195
t_LineSave::ipass
long int ipass
Definition: lines.h:75
TransitionProxy::Hi
qList::iterator Hi() const
Definition: transition.h:396
t_elementnames::chElementSym
char chElementSym[LIMELM][CHARS_ELEMENT_SYM]
Definition: elementnames.h:25
EmissionProxy::ots
double & ots() const
Definition: emission.h:623
t_conv::lgConvPres
bool lgConvPres
Definition: conv.h:199
radius.h
t_opac::opacity_abs
double * opacity_abs
Definition: opacity.h:95
PutCS
void PutCS(double cs, const TransitionProxy &t)
Definition: transition.cpp:317
EmissionProxy::pump
double & pump() const
Definition: emission.h:473
MAX2
#define MAX2
Definition: cddefines.h:782
CollisionProxy::col_str
realnum & col_str() const
Definition: collision.h:167
CollisionProxy::ColUL
realnum ColUL(const ColliderList &colls) const
Definition: collision.h:99
LIMELM
const int LIMELM
Definition: cddefines.h:258
OccupationNumberLine
double OccupationNumberLine(const TransitionProxy &t)
Definition: transition.cpp:142
TransitionProxy::Junk
void Junk(void) const
Definition: transition.cpp:477
TauZero
void TauZero(EmissionList::reference t)
Definition: emission.cpp:73
TransitionProxy::outline
void outline(double nonScatteredFraction, bool lgDoChecks) const
Definition: transition.cpp:44
t_conv::lgConvPops
bool lgConvPops
Definition: conv.h:143
EmissionList::resize
void resize(size_t i)
Definition: emission.h:365
fp_equal_tol
bool fp_equal_tol(sys_float x, sys_float y, sys_float tol)
Definition: cddefines.h:854
GenerateTransitionConfiguration
void GenerateTransitionConfiguration(const TransitionProxy &t, char *chComment)
Definition: transition.cpp:330
t_dense::xIonDense
double xIonDense[LIMELM][LIMELM+1]
Definition: dense.h:125
TransitionProxy::setHi
void setHi(int ipHi) const
Definition: transition.h:404
EmissionProxy::ColOvTot
double & ColOvTot() const
Definition: emission.h:573
PutLine_base
STATIC void PutLine_base(const TransitionProxy &t, const char *chComment, const char *chLabelTemp, bool lgLabel)
Definition: transition.cpp:341
qList::size
size_t size() const
Definition: quantumstate.h:116
EmissionProxy::Pelec_esc
realnum & Pelec_esc() const
Definition: emission.h:533
gbar0
STATIC void gbar0(double ex, realnum *g)
Definition: transition.cpp:538
rt.h
PutLine
void PutLine(const TransitionProxy &t, const char *chComment, const char *chLabelTemp)
Definition: transition.cpp:449
t_conv::lgConvTemp
bool lgConvTemp
Definition: conv.h:196
TransitionProxy::AddLine2Stack
void AddLine2Stack() const
Definition: transition.cpp:664
EmissionList::size
size_t size(void) const
Definition: emission.h:328
TransitionProxy::EnergyWN
realnum & EnergyWN() const
Definition: transition.h:438
AulEscp
static double ** AulEscp
Definition: species2.cpp:29
LineConvRate2CS
void LineConvRate2CS(const TransitionProxy &t, realnum rate)
Definition: transition.cpp:521
EmissionProxy::Pesc
realnum & Pesc() const
Definition: emission.h:523
lgLinesAdded
bool lgLinesAdded
Definition: taulines.cpp:11
EmissionProxy::gf
realnum & gf() const
Definition: emission.h:513
conv
t_conv conv
Definition: conv.cpp:5
rt
t_rt rt
Definition: rt.cpp:5
lgStatesAdded
bool lgStatesAdded
Definition: taulines.cpp:10
taulines.h
TransitionProxy::EnergyK
realnum EnergyK() const
Definition: transition.h:73
phycon.h
t_radius::BeamInOut
double BeamInOut
Definition: radius.h:105
EmissionProxy::TauTot
realnum & TauTot() const
Definition: emission.h:433
opacity.h
chSpecies
char ** chSpecies
Definition: taulines.cpp:13
EmLineZero
void EmLineZero(EmissionList::reference t)
Definition: emission.cpp:92
CollisionJunk
void CollisionJunk(const CollisionProxy &t)
Definition: collision.cpp:60
EmissionProxy::Aul
realnum & Aul() const
Definition: emission.h:613
t_phycon::te
double te
Definition: phycon.h:11
EmissionProxy::FracInwd
realnum & FracInwd() const
Definition: emission.h:463
TransitionProxy::Zero
void Zero(void) const
Definition: transition.cpp:505
TransitionProxy::m_list
list_type * m_list
Definition: transition.h:31
EN1RYD
const UNUSED double EN1RYD
Definition: physconst.h:179
TransitionProxy::AddLoState
void AddLoState() const
Definition: transition.cpp:676
DEBUG_ENTRY
#define DEBUG_ENTRY(funcname)
Definition: cddefines.h:684
TransitionProxy::outline_resonance
void outline_resonance() const
Definition: transition.cpp:37
SMALLFLOAT
const realnum SMALLFLOAT
Definition: cpu.h:191
TransitionProxy::ipEmis
int & ipEmis() const
Definition: transition.h:416
g
static double * g
Definition: species2.cpp:28