39 bool lgDoChecks =
true;
45 bool lgDoChecks )
const
62 double PhotEmit =
Emis().
Aul()*Ptot*(*
Hi()).Pop();
66 bool lgGoodSolution =
conv.lgConvEden &&
conv.lgConvIoniz() &&
78 bool lgTransStackLine =
true;
80 nonScatteredFraction);
95 return rad_deexcit/(deexcit_loss + rad_deexcit);
109 strcpy( chLbl,
"DEBUG ");
113 "%10.10s Te%.2e eden%.1e CS%.2e Aul%.1e Tex%.2e cool%.1e het%.1e conopc%.1e albdo%.2e\n",
126 "Tin%.1e Tout%.1e Esc%.1e eEsc%.1e DesP%.1e Pump%.1e OTS%.1e PopL,U %.1e %.1e PopOpc%.1e\n",
144 double OccupationNumberLine_v;
155 OccupationNumberLine_v = ( (*t.
Hi()).Pop() / (*t.
Hi()).g() ) /
156 ( t.
Emis().PopOpc() / (*t.
Lo()).g() ) *
157 (1. - t.
Emis().Pesc());
161 OccupationNumberLine_v = 0.;
165 return( OccupationNumberLine_v );
177 if( (*t.
Hi()).Pop() * (*t.
Lo()).Pop() > 0. )
179 TexcLine_v = ( (*t.
Hi()).Pop() / (*t.
Hi()).g() )/( (*t.
Lo()).Pop() / (*t.
Lo()).g() );
180 TexcLine_v = log(TexcLine_v);
184 TexcLine_v = - t.
EnergyK() / TexcLine_v;
191 return( TexcLine_v );
203 if( (*t.
Hi()).nelem() < 0 )
206 if( (*t.
Hi()).chLabel()[0]==
'\0' )
207 strcpy( chIonLbl_v,
"Dumy" );
209 strcpy( chIonLbl_v, (*t.
Hi()).chLabel() );
213 chIonLbl( chIonLbl_v, (*t.
Hi()).nelem(), (*t.
Hi()).IonStg() );
219void chIonLbl(
char *chIonLbl_v,
const long& nelem,
const long& IonStg)
228 strcpy( chIonLbl_v ,
elementnames.chElementSym[nelem-1] );
230 strcat( chIonLbl_v,
elementnames.chIonStage[IonStg-1] );
239 static char chLineLbl_v[11];
244 if( (*t.
Hi()).nelem() < 1 && (*t.
Hi()).IonStg() < 1 )
246 sprintf(
chSpecies,
"%4.4s", (*t.
Hi()).chLabel() );
251 ASSERT( (*t.
Hi()).IonStg() >= 1 && (*t.
Hi()).IonStg() <= (*t.
Hi()).nelem() + 1 );
267 sprintf( chLineLbl_v,
"%4.4s%5i%c",
chSpecies,
268 (
int)(t.
WLAng()/1e8),
'c' );
270 else if( t.
WLAng() > 9999999. )
273 sprintf( chLineLbl_v,
"%4.4s%5.2f%c",
chSpecies,
274 t.
WLAng()/1e8,
'c' );
276 else if( t.
WLAng() > 999999. )
279 sprintf( chLineLbl_v,
"%4.4s%5i%c",
chSpecies,
280 (
int)(t.
WLAng()/1e4),
'm' );
282 else if( t.
WLAng() > 99999. )
285 sprintf( chLineLbl_v,
"%4.4s%5.1f%c",
chSpecies,
286 t.
WLAng()/1e4,
'm' );
288 else if( t.
WLAng() > 9999. )
290 sprintf( chLineLbl_v,
"%4.4s%5.2f%c",
chSpecies,
291 t.
WLAng()/1e4,
'm' );
293 else if( t.
WLAng() >= 100. )
295 sprintf( chLineLbl_v,
"%4.4s%5i%c",
chSpecies,
296 (
int)t.
WLAng(),
'A' );
300 else if( t.
WLAng() >= 10. )
302 sprintf( chLineLbl_v,
"%4.4s%5.1f%c",
chSpecies,
307 sprintf( chLineLbl_v,
"%4.4s%5.2f%c",
chSpecies,
312 ASSERT( chLineLbl_v[10]==
'\0' );
313 return( chLineLbl_v );
332 strcpy( chComment, (*t.
Lo()).chConfig() );
333 strcat( chComment,
" - " );
334 strcat( chComment, (*t.
Hi()).chConfig() );
356 strncpy( chLabel, chLabelTemp, 4 );
364 if (lgLabel ==
false)
406 ASSERT( xIntensity_in>=0. );
407 linadd(xIntensity_in,t.
WLAng(),
"Inwd",
'i',chComment);
414 double radiative_branching;
415 enum { lgNEW =
true };
425 radiative_branching =
AulEscp/sinkrate;
429 radiative_branching = 0.;
436 radiative_branching = (1.-t.
Emis().ColOvTot());
451 const bool lgLabel =
true;
458 const char *chComment)
460 const bool lgLabel =
false;
461 const char *chLabelTemp = NULL;
565 *
g = (
realnum)(0.29*(log(1.0+1.0/y) - 0.4/
POW2(y + 1.0))/exp(y));
608 *
g = (
realnum)(0.6 + 0.28*(log(1.0+1.0/y) - 0.4/
POW2(y + 1.0)));
626 ion = (*t.
Hi()).IonStg();
629 static double gfLimit = 1e-8;
631 Abun =
dense.xIonDense[ (*t.
Hi()).nelem() -1 ][ ion-1 ];
636 else if( t.
Emis().
gf() >= gfLimit )
670 size_t newsize =
m_list->Emis.size()+1;
671 m_list->Emis.resize(newsize);
#define DEBUG_ENTRY(funcname)
bool fp_equal_tol(sys_float x, sys_float y, sys_float tol)
realnum & col_str() const
realnum ColUL(const ColliderList &colls) const
double & xIntensity() const
realnum & Pelec_esc() const
realnum & FracInwd() const
static t_version & Inst()
void setHi(int ipHi) const
void outline(double nonScatteredFraction, bool lgDoChecks) const
CollisionProxy Coll() const
void AddLine2Stack() const
realnum EnergyErg() const
realnum & EnergyWN() const
qList::iterator Lo() const
qList::iterator Hi() const
void setLo(int ipLo) const
EmissionList::reference Emis() const
void outline_resonance() const
void CollisionJunk(const CollisionProxy &t)
void CollisionZero(const CollisionProxy &t)
t_elementnames elementnames
void EmLineZero(EmissionList::reference t)
void TauZero(EmissionList::reference t)
void linadd(double xInten, realnum wavelength, const char *chLab, char chInfo, const char *chComment)
void outline_base(double dampXvel, double damp, bool lgTransStackLine, long int ip, double phots, realnum inwd, double nonScatteredFraction)
void lindst(double xInten, realnum wavelength, const char *chLab, long int ipnt, char chInfo, bool lgOutToo, const char *chComment)
UNUSED const double EN1RYD
UNUSED const double WAVNRYD
STATIC void gbar0(double ex, realnum *g)
STATIC void gbar1(double ex, realnum *g)
void LineConvRate2CS(const TransitionProxy &t, realnum rate)
void PutExtra(double Extra)
void PutLine(const TransitionProxy &t, const char *chComment, const char *chLabelTemp)
void DumpLine(const TransitionProxy &t)
void GenerateTransitionConfiguration(const TransitionProxy &t, char *chComment)
double OccupationNumberLine(const TransitionProxy &t)
double emit_frac(const TransitionProxy &t)
void MakeCS(const TransitionProxy &t)
static realnum ExtraInten
void chIonLbl(char *chIonLbl_v, const TransitionProxy &t)
double TexcLine(const TransitionProxy &t)
STATIC void PutLine_base(const TransitionProxy &t, const char *chComment, const char *chLabelTemp, bool lgLabel)
void PutCS(double cs, const TransitionProxy &t)
char * chLineLbl(const TransitionProxy &t)