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-2022 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  /* If the line mases PopOpc() will be negative, but Pesc() will > 1 as well,
191  * so the occupation number will be positive.
192  * However, this may be not the case if either value is stale. */
193  OccupationNumberLine_v = ( (*t.Hi()).Pop() / (*t.Hi()).g() ) /
194  ( t.Emis().PopOpc() / (*t.Lo()).g() ) *
195  (1. - t.Emis().Pesc());
196  }
197  else
198  {
199  OccupationNumberLine_v = 0.;
200  }
201  /* return value is not guaranteed to be positive - negative if
202  * line mases */
203  return( OccupationNumberLine_v );
204 }
205 
206 /*TexcLine derive excitation temperature of line from contents of line array */
207 double TexcLine(const TransitionProxy& t)
208 {
209  double TexcLine_v;
210 
211  DEBUG_ENTRY( "TexcLine()" );
212 
213  /* routine to evaluate line excitation temp using contents of line array
214  * */
215  if( (*t.Hi()).Pop() * (*t.Lo()).Pop() > 0. )
216  {
217  TexcLine_v = ( (*t.Hi()).Pop() / (*t.Hi()).g() )/( (*t.Lo()).Pop() / (*t.Lo()).g() );
218  TexcLine_v = log(TexcLine_v);
219  /* protect against infinite temp limit */
220  if( fabs(TexcLine_v) > SMALLFLOAT )
221  {
222  TexcLine_v = - t.EnergyK() / TexcLine_v;
223  }
224  }
225  else
226  {
227  TexcLine_v = 0.;
228  }
229  return( TexcLine_v );
230 }
231 
232 /*chIonLbl use information in line array to generate a null terminated ion label in "Fe 2" */
233 string chIonLbl(const TransitionProxy& t)
234 {
235  DEBUG_ENTRY( "chIonLbl()" );
236 
237  /* function to use information within the line array
238  * to generate an ion label, giving element and
239  * ionization stage
240  * */
241  string chIonLbl_v;
242  if( (*t.Hi()).nelem() <= 0 )
243  {
244  /* this line is to be ignored */
245  chIonLbl_v = t.list()->states->chLabel();
246  if( chIonLbl_v[0]=='\0' )
247  chIonLbl_v = "Dumy";
248  }
249  else
250  {
251  chIonLbl_v = chIonLbl( (*t.Hi()).nelem(), (*t.Hi()).IonStg() );
252  }
253  /* chIonLbl is four char null terminated string */
254  return chIonLbl_v;
255 }
256 
257 string chIonLbl(const long& nelem, const long& IonStg)
258 {
259  DEBUG_ENTRY( "chIonLbl()" );
260 
261  // NB - nelem passed here is expected to be on the physical scale, not C (so hydrogen = 1).
262  ASSERT( nelem >= 1 && nelem <= LIMELM );
263  ASSERT( IonStg >= 1 && IonStg <= nelem + 1 );
264  /* ElmntSym.chElementSym is null terminated, 2 ch + null, string giving very
265  * short form of element name */
266  string chIonLbl_v = elementnames.chElementSym[nelem-1];
267  /* chIonStage is two char null terminated string, starting with "_1" */
268  chIonLbl_v += elementnames.chIonStage[IonStg-1];
269  return chIonLbl_v;
270 }
271 
272 /*chLineLbl use information in line transfer arrays to generate a line label */
273 /* ContCreatePointers has test this with full range of wavelengths */
275 {
276  DEBUG_ENTRY( "chLabel()" );
277 
278  string chSpecies;
279  if( (*Hi()).nelem() < 1 && (*Hi()).IonStg() < 1 )
280  {
281  chSpecies = (*list()).chLabel;
282  }
283  else
284  {
285  chSpecies = chIonLbl( (*Hi()).nelem(), (*Hi()).IonStg() );
286  }
287 
288  chSpecies.resize( NCHLAB-1, ' ' );
289 
290  /* NB this function is profoundly slow due to sprintf statement
291  * also - it cannot be evaluated within a write statement itself*/
292  char chWavLen[100];
293  sprt_wl(chWavLen, WLAng());
294 
295  return chSpecies + " " + chWavLen;
296 }
297 
298 /*PutCS enter a collision strength into an individual line vector */
299 void PutCS(double cs,
300  const TransitionProxy& t)
301 {
302  DEBUG_ENTRY( "PutCS()" );
303 
304  /* collision strength must be non-negative */
305  ASSERT( cs > 0. );
306 
307  t.Coll().col_str() = (realnum)cs;
308 
309  return;
310 }
311 
313 {
314  return (*t.Lo()).chConfig() + " - " + (*t.Hi()).chConfig();
315 }
316 
317 /*PutLine enter local line intensity into the intensity stack for eventual printout */
318 void PutLine(const TransitionProxy& t, const char *chComment, const char *chLabelTemp, const ExtraInten& extra)
319 {
320  DEBUG_ENTRY( "PutLine()" );
321 
322  string chLabel;
323  double xIntensity,
324  other,
325  xIntensity_in;
326 
327  /* routine to use line array data to generate input
328  * for emission line array */
329  ASSERT( t.ipCont() > 0 );
330 
331  if (chLabelTemp)
332  {
333  chLabel = chLabelTemp;
334  ASSERT (chLabel.length() <= NCHLAB-1);
335  }
336 
337  /* if ipass=0 then we must generate label info since first pass
338  * gt.0 then only need line intensity data */
339  if( LineSave.ipass == 0 )
340  {
341  if (!chLabelTemp)
342  {
343  /* these variables not used by linadd if ipass ne 0 */
344  /* chIonLbl is function that generates a null terminated 4 char string, of form "C 2" */
345  chLabel = chIonLbl(t);
346  }
347  xIntensity = 0.;
348  }
349  else
350  {
351  /* both the counting and integrating modes comes here */
352  /* not actually used so set to safe value */
353  chLabel = "";
354 
355  /* total line intensity or luminosity
356  * these may not be defined in initial calls so define here */
357  xIntensity = t.Emis().xIntensity() + extra.v;
358  }
359 
360  /* initial counting case, where ipass == -1, just ignored above, call linadd below */
361 
362  /* ExtraInten is option that allows extra intensity (i.e., recomb)
363  * to be added to this line with Call PutExtra( exta )
364  * in main lines this extra
365  * contribution must be identified explicitly */
366  /*linadd(xIntensity,wl,chLabel,'i');*/
367  /*lindst add line with destruction and outward */
368  rt.fracin = t.Emis().FracInwd();
369  lindst(t, extra,
370  chLabel.c_str(),
371  /* this is information only - has been counted in cooling already */
372  't',
373  /* do not add to outward beam, also done separately */
374  false,
375  chComment);
376  rt.fracin = 0.5;
377 
378  /* inward part of line - do not move this away from previous lines
379  * since xIntensity is used here */
380  xIntensity_in = xIntensity*t.Emis().FracInwd();
381  ASSERT( xIntensity_in>=0. );
382  linadd(xIntensity_in,t.WLAng(),"Inwd",'i',chComment);
383 
384  /* cooling part of line */
385  other = t.Coll().cool();
386  linadd(other,t.WLAng(),"Coll",'i',chComment);
387 
388  /* fluorescent excited part of line */
389  double radiative_branching;
390  enum { lgNEW = true };
391  if (lgNEW)
392  {
393  // Improved two-level version of radiative branching ratio
394  const double AulEscp = t.Emis().Aul()*(t.Emis().Pesc_total());
395  // Would be better to include all outward transition processes from the
396  // line, to cater for the general non-two-level case
397  const double sinkrate = t.Emis().Aul()*t.Emis().Ploss() + t.Coll().ColUL( colliders );
398  if (sinkrate > 0.0)
399  {
400  radiative_branching = AulEscp/sinkrate;
401  }
402  else
403  {
404  radiative_branching = 0.;
405  }
406  }
407  else
408  {
409  // This is the excitation ratio not the de-excitation ratio according
410  // to its specification
411  radiative_branching = (1.-t.Emis().ColOvTot());
412  }
413 
414  other = (*t.Lo()).Pop() * t.Emis().pump() * radiative_branching * t.EnergyErg();
415  linadd(other,t.WLAng(),"Pump",'i',chComment);
416 
417 
418  /* heating part of line */
419  other = t.Coll().heat();
420  linadd(other,t.WLAng(),"Heat",'i',chComment);
421 
422  return;
423 }
424 
425 /*PutLine enter local line intensity into the intensity stack for eventual printout */
426 void PutLine(const TransitionProxy& t, const char *chComment, const char *chLabelTemp)
427 {
428  DEBUG_ENTRY( "PutLine()" );
429  ExtraInten extra_s;
430  PutLine(t, chComment, chLabelTemp, extra_s);
431 }
432 
433 /*PutLine enter local line intensity into the intensity stack for eventual printout */
434 void PutLine(const TransitionProxy& t,
435  const char *chComment)
436 {
437  const char *chLabelTemp = NULL;
438  DEBUG_ENTRY( "PutLine()" );
439  ExtraInten extra_s;
440  PutLine(t, chComment, chLabelTemp, extra_s);
441 }
442 
443 void TransitionProxy::Junk( void ) const
444 {
445 
446  DEBUG_ENTRY( "TransitionProxy::Junk()" );
447 
448  /* wavelength, usually in A, used for printout */
449  WLAng() = -FLT_MAX;
450 
451  /* transition energy in wavenumbers */
452  EnergyWN() = -FLT_MAX;
453 
454  /* array offset for radiative transition within continuum array
455  * is negative if transition is non-radiative. */
456  ipCont() = -10000;
457 
458  CollisionJunk( Coll() );
459 
460  /* set these equal to NULL first. That will cause the code to crash if
461  * the variables are ever used before being deliberately set. */
462  ipEmis() = -1;
463 
464  setLo(-1);
465  setHi(-1);
466  return;
467 }
468 
469 /*TransitionZero zeros out transition array at start of calculation, sets
470  * optical depths to initial values */
471 void TransitionProxy::Zero( void ) const
472 {
473 
474  DEBUG_ENTRY( "TransitionProxy::Zero()" );
475 
476  CollisionZero( Coll() );
477 
478  ::Zero( *Lo() );
479  ::Zero( *Hi() );
480  EmLineZero( Emis() );
481  TauZero( Emis() );
482 
483  return;
484 }
485 
486 /*LineConvRate2CS convert down coll rate back into electron cs in case other parts of code need this for reference */
487 void LineConvRate2CS( const TransitionProxy& t , realnum rate )
488 {
489 
490  DEBUG_ENTRY( "LineConvRate2CS()" );
491 
492  /* return is collision strength, convert from collision rate from
493  * upper to lower, this assumes pure electron collisions, but that will
494  * also be assumed by anything that uses cs, for self-consistency */
495  t.Coll().col_str() = rate * (*t.Hi()).g() / (realnum)dense.cdsqte;
496 
497  /* change assert to non-negative - there can be cases (Iin H2) where cs has
498  * underflowed to 0 on some platforms */
499  ASSERT( t.Coll().col_str() >= 0. );
500  return;
501 }
502 
503 /*gbar0 compute g-bar gaunt factor for neutrals */
504 STATIC void gbar0(double ex,
505  realnum *g)
506 {
507  double a,
508  b,
509  c,
510  d,
511  y;
512 
513  DEBUG_ENTRY( "gbar0()" );
514 
515  /* written by Dima Verner
516  *
517  * Calculation of the effective Gaunt-factor by use of
518  * >>refer gbar cs Van Regemorter, H., 1962, ApJ 136, 906
519  * fits for neutrals
520  * Input parameters:
521  * ex - energy ryd - now K
522  * t - temperature in K
523  * Output parameter:
524  * g - effective Gaunt factor
525  * */
526 
527  /* y = ex*157813.7/te */
528  y = ex/phycon.te;
529  if( y < 0.01 )
530  {
531  *g = (realnum)(0.29*(log(1.0+1.0/y) - 0.4/POW2(y + 1.0))/exp(y));
532  }
533  else
534  {
535  if( y > 10.0 )
536  {
537  *g = (realnum)(0.066/sqrt(y));
538  }
539  else
540  {
541  a = 1.5819068e-02;
542  b = 1.3018207e00;
543  c = 2.6896230e-03;
544  d = 2.5486007e00;
545  d = log(y/c)/d;
546  *g = (realnum)(a + b*exp(-0.5*POW2(d)));
547  }
548  }
549  return;
550 }
551 
552 /*gbar1 compute g-bar collision strength using Mewe approximations */
553 STATIC void gbar1(double ex,
554  realnum *g)
555 {
556  double y;
557 
558  DEBUG_ENTRY( "gbar1()" );
559 
560  /* *written by Dima Verner
561  *
562  * Calculation of the effective Gaunt-factor by use of
563  * >>refer gbar cs Mewe,R., 1972, A&A 20, 215
564  * fits for permitted transitions in ions MgII, CaII, FeII (delta n = 0)
565  * Input parameters:
566  * ex - excitation energy in Ryd - now K
567  * te - temperature in K
568  * Output parameter:
569  * g - effective Gaunt factor
570  */
571 
572  /* y = ex*157813.7/te */
573  y = ex/phycon.te;
574  *g = (realnum)(0.6 + 0.28*(log(1.0+1.0/y) - 0.4/POW2(y + 1.0)));
575  return;
576 }
577 
578 /*MakeCS compute collision strength by g-bar approximations */
579 void MakeCS(const TransitionProxy& t)
580 {
581  long int ion;
582  double Abun,
583  cs;
584  realnum
585  gbar;
586 
587  DEBUG_ENTRY( "MakeCS()" );
588 
589  /* routine to get cs from various approximations */
590 
591  /* check if abundance greater than 0 */
592  ion = (*t.Hi()).IonStg();
593 
594  //This is the oscillator strength limit where larger values are assumed to be for allowed transitions.
595  const double gfLimit = 1e-8;
596 
597  Abun = dense.xIonDense[ (*t.Hi()).nelem() -1 ][ ion-1 ];
598  if( Abun <= 0. )
599  {
600  gbar = 1.;
601  }
602  else if( t.Emis().gf() >= gfLimit )
603  {
604  /* check if neutral or ion */
605  if( ion == 1 )
606  {
607  /* neutral - compute gbar for eventual cs */
608  gbar0(t.EnergyK(),&gbar);
609  }
610  else
611  {
612  /* ion - compute gbar for eventual cs */
613  gbar1(t.EnergyK(),&gbar);
614  }
615  }
616  else
617  {
618  //Mewe72 provides a gbar estimate for forbidden transitions.
619  gbar = 0.15;
620  }
621 
622  /* above was g-bar, convert to cs */
623  cs = gbar*(14.5104/WAVNRYD)*t.Emis().gf()/t.EnergyWN();
624 
625  /* stuff the cs in place */
626  t.Coll().col_str() = (realnum)cs;
627  // t.Coll().is_gbar() = 1;
628  return;
629 }
630 
632 {
633  DEBUG_ENTRY( "AddLine2Stack()" );
634 
635  ASSERT( lgLinesAdded == false );
636 
637  size_t newsize = m_list->Emis.size()+1;
638  m_list->Emis.resize(newsize);
639  ipEmis() = newsize-1;
640  this->resetEmis();
641 }
642 
644 {
645  DEBUG_ENTRY( "AddLoState()" );
646 
647  ASSERT( !lgStatesAdded );
648 
649  m_list->states->addone();
650 
651  setLo(m_list->states->size()-1);
652 }
653 
655 {
656  DEBUG_ENTRY( "AddHiState()" );
657 
658  ASSERT( !lgStatesAdded );
659 
660  m_list->states->addone();
661 
662  setHi(m_list->states->size()-1);
663 }
EmissionList Emis
Definition: transition.h:246
bool lgConvEden
Definition: conv.h:195
double TexcLine(const TransitionProxy &t)
Definition: transition.cpp:207
void DumpLine(const TransitionProxy &t)
Definition: transition.cpp:138
double & ots() const
Definition: emission.h:700
string chIonLbl(const TransitionProxy &t)
Definition: transition.cpp:233
realnum EnergyErg() const
Definition: transition.h:90
realnum & Pelec_esc() const
Definition: emission.h:590
double * opacity_abs
Definition: opacity.h:104
double * albedo
Definition: opacity.h:113
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:192
realnum & TauTot() const
Definition: emission.h:490
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:904
t_LineSave LineSave
Definition: lines.cpp:10
bool lgConvPops
Definition: conv.h:136
FILE * ioQQQ
Definition: cddefines.cpp:7
void Junk(void) const
Definition: transition.cpp:443
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:372
double xIonDense[LIMELM][LIMELM+1]
Definition: dense.h:135
bool lgLinesAdded
Definition: taulines.cpp:12
ColliderList colliders(dense)
realnum & gf() const
Definition: emission.h:570
realnum & EnergyWN() const
Definition: transition.h:477
#define POW2
Definition: cddefines.h:979
void PutCS(double cs, const TransitionProxy &t)
Definition: transition.cpp:299
double & heat() const
Definition: collision.h:224
#define STATIC
Definition: cddefines.h:118
double & xIntensity() const
Definition: emission.h:540
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:504
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:108
realnum & Pesc() const
Definition: emission.h:580
size_t size() const
Definition: quantumstate.h:121
string GenerateTransitionConfiguration(const TransitionProxy &t)
Definition: transition.cpp:312
qList::iterator Hi() const
Definition: transition.h:435
#define cdEXIT(FAIL)
Definition: cddefines.h:482
void setLo(int ipLo) const
Definition: transition.h:439
STATIC void gbar1(double ex, realnum *g)
Definition: transition.cpp:553
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:409
char chElementSym[LIMELM][CHARS_ELEMENT_SYM]
Definition: elementnames.h:25
string chLabel() const
Definition: transition.cpp:274
double GetLineRec(long int ip, long int lWl)
Definition: transition.cpp:107
realnum & Pdest() const
Definition: emission.h:600
double BeamInOut
Definition: radius.h:111
void PutLine(const TransitionProxy &t, const char *chComment, const char *chLabelTemp, const ExtraInten &extra)
Definition: transition.cpp:318
void setHi(int ipHi) const
Definition: transition.h:443
#define ASSERT(exp)
Definition: cddefines.h:613
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:95
double OccupationNumberLine(const TransitionProxy &t)
Definition: transition.cpp:177
realnum Pesc_total() const
Definition: emission.h:127
bool lgConvTemp
Definition: conv.h:189
void AddHiState() const
Definition: transition.cpp:654
const int LIMELM
Definition: cddefines.h:308
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:723
double & cool() const
Definition: collision.h:220
double & PopOpc() const
Definition: emission.h:670
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:304
#define MAX2(a, b)
Definition: cddefines.h:824
void TauZero(EmissionList::reference t)
Definition: emission.cpp:75
int fprintf(const Output &stream, const char *format,...)
Definition: service.cpp:1121
map< std::string, std::vector< TransitionProxy > > blends
Definition: transition.cpp:36
double & ColOvTot() const
Definition: emission.h:630
void Zero(void) const
Definition: transition.cpp:471
bool lgStatesAdded
Definition: taulines.cpp:11
realnum & FracInwd() const
Definition: emission.h:520
void LineConvRate2CS(const TransitionProxy &t, realnum rate)
Definition: transition.cpp:487
void CollisionZero(const CollisionProxy &t)
Definition: collision.cpp:88
double te
Definition: phycon.h:21
void addone()
Definition: quantumstate.h:113
realnum plsfrq
Definition: rfield.h:430
realnum & Aul() const
Definition: emission.h:690
void AddLoState() const
Definition: transition.cpp:643
realnum & WLAng() const
Definition: transition.h:468
double ColUL(const ColliderList &colls) const
Definition: collision.h:106
realnum & TauIn() const
Definition: emission.h:470
long int ipass
Definition: lines.h:96
void AddLine2Stack() const
Definition: transition.cpp:631
void MakeCS(const TransitionProxy &t)
Definition: transition.cpp:579
t_rt rt
Definition: rt.cpp:5
string chLabel() const
Definition: quantumstate.h:133
double & pump() const
Definition: emission.h:530
void outline_resonance() const
Definition: transition.cpp:39
list_type * m_list
Definition: transition.h:32