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