63 double save_he2rec_dest;
109 enum {DEBUG_LOC=
false};
112 fprintf(
ioQQQ,
"DEBUG HeII Bowen nzone %li bwnfac:%.2e bwnfac esc:%.2e ots660 %.2e\n",
149 for( nelem=ipISO; nelem <
LIMELM; nelem++ )
165 for( ipLo=0; ipLo < ipHi; ipLo++ )
170 if(
iso_sp[ipISO][nelem].trans(ipHi,ipLo).ipCont() < 1 ||
171 iso_sp[ipISO][nelem].trans(ipHi,ipLo).Emis().Pdest()<=
DEST0 )
177 iso_sp[ipISO][nelem].
st[ipHi].Pop()*
180 ASSERT(
iso_sp[ipISO][nelem].trans(ipHi,ipLo).Emis().ots() >= 0. );
190 iso_sp[ipISO][nelem].trans(ipHi,ipLo).ipCont() );
197 enum {DEBUG_LOC=
false};
202 if( ipISO==0 && nelem==0 &&
nzone>500 )
207 fprintf(
ioQQQ,
"DEBUG hlyaots\t%.2f\tEdenTrue\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\n",
212 iso_sp[ipISO][nelem].
st[ipHi].Pop(),
233 ASSERT( cont_phot_destroyed >= 0. );
240 enum {DEBUG_LOC=
false};
242 if( DEBUG_LOC &&
nzone > 400 && nelem==0 && n==2 )
244 long ip =
iso_sp[ipISO][nelem].
fb[n].ipIsoLevNIonCon-1;
245 fprintf(
ioQQQ,
"hotsdebugg\t%.3f\t%li\th con ots\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\n",
248 iso_sp[ipISO][nelem].st[n].Pop(),
263 enum {DEBUG_LOC=
false};
267 fprintf(
ioQQQ,
"hotsdebugg %li \t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\t%.2e\n",
293 fprintf(
ioQQQ,
" RT_OTS Pdest %.2e ots rate %.2e in otslin %.2e con opac %.2e\n",
308 for( ion=0; ion < nelem+1-
NISO; ion++ )
322 ots = difflya*
MAX2(0.f,1.f-esc);
340 ots = difflya*
MAX2(0.f,1.f-esc);
376 for(
long ipSpecies=0; ipSpecies<
nSpecies; ipSpecies++ )
383 int ipHi = (*tr).ipHi();
384 if (ipHi >=
dBaseSpecies[ipSpecies].numLevels_local || (*tr).ipCont() <= 0)
386 (*tr).Emis().ots() = (*(*tr).Hi()).Pop() * (*tr).Emis().Aul() * (*tr).Emis().Pdest();
395 (*diatom)->H2_RT_OTS();
432 enum {DEBUG_LOC=
false};
433 if( DEBUG_LOC && ip== 2363 )
435 fprintf(
ioQQQ,
"DEBUG ots, opc, otsr %.3e\t%.3e\t%.3e\t",
439 fprintf(
ioQQQ,
"iteration %li type %i %i %i \n",
509 for(
long nelem=ipISO; nelem <
LIMELM; nelem++ )
515 for( vector<two_photon>::iterator tnu = sp->
TwoNu.begin(); tnu != sp->
TwoNu.end(); ++tnu )
518 for(
long nu=0; nu < tnu->ipTwoPhoE; nu++ )
633 static long int nInsane=0;
636 const int LIM_INSAME_PRT = 30;
658 if( nInsane < LIM_INSAME_PRT )
660 fprintf(
ioQQQ,
" PROBLEM RT_OTS_ChkSum insane SummedDif at energy %.5e error= %.2e i=%4ld\n",
662 fprintf(
ioQQQ,
" SummedDif, sum are%11.4e%11.4e\n",
664 fprintf(
ioQQQ,
" otscon otslin ConInterOut outlin are%11.4e%11.4e%11.4e%11.4e\n",
667 fprintf(
ioQQQ,
" line continuum here are %4.4s %4.4s\n",
683 if( nInsane < LIM_INSAME_PRT )
685 fprintf(
ioQQQ,
" PROBLEM RT_OTS_ChkSum %3ld, insane SummedCon at energy %.5e error=%.2e i=%ld\n",
687 fprintf(
ioQQQ,
" SummedCon, sum are %.4e %.4e\n",
689 fprintf(
ioQQQ,
" otscon otslin ConInterOut outlin flux are%.4e %.4e %.4e %.4e %.4e\n",
692 fprintf(
ioQQQ,
" line continuum here are %s %s\n",
702 fprintf(
ioQQQ,
" PROBLEM RT_OTS_ChkSum too much insanity to continue.\n");
723 ASSERT( chFlag==
'l' || chFlag==
'c' || chFlag==
'b' );
737 if( chFlag ==
'c' || chFlag ==
'b' )
739 fprintf(
ioQQQ,
" DEBUG OTSCON array, anu, otscon, opac, OTS*opac limit:%.2e zone:%.2f IonConv?%c\n",
746 fprintf(
ioQQQ,
" %4ld%12.4e%12.4e%12.4e%12.4e %s \n",
761 if( chFlag ==
'l' || chFlag ==
'b' )
763 fprintf(
ioQQQ,
"DEBUG density He %.2e He+2 %.2e O+2 %.2e\n",
766 fprintf(
ioQQQ,
" DEBUG OTSLIN array, anu, otslin, opac, OTS*opac Lab nLine limit:%.2e zone:%.2f IonConv?%c\n",
773 fprintf(
ioQQQ,
" %4ld%12.4e%12.4e%12.4e%12.4e %s %3li\n",
NORETURN void TotalInsanity(void)
sys_float SDIV(sys_float x)
#define DEBUG_ENTRY(funcname)
EmissionList::reference Emis() const
TransitionProxy trans(const long ipHi, const long ipLo)
vector< two_photon > TwoNu
vector< diatomics * > diatoms
vector< diatomics * >::iterator diatom_iter
t_iso_sp iso_sp[NISO][LIMELM]
molezone * findspecieslocal(const char buf[])
void RT_OTS_ChkSum(long int ipPnt)
STATIC void RT_OTS_AddCont(realnum ots, long int ip)
void RT_OTS_PrtRate(double weak, int chFlag)
void RT_OTS_Update(double *SumOTS)
static int nOTS_Line_type
void RT_OTS_AddLine(double ots, long int ip)
long int ipLyHeavy[LIMELM][LIMELM-1]
long int ipBalHeavy[LIMELM][LIMELM-1]
realnum xLyaHeavy[LIMELM][LIMELM]
long int IonHigh[LIMELM+1]
double xIonDense[LIMELM][LIMELM+1]
realnum gas_phase[LIMELM]
realnum * ConOTS_local_photons
void resetCoarseTransCoef()
realnum * ConOTS_local_OTS_rate
long int ipEnergyBremsThin
realnum * OccNumbBremsCont
TransitionList TauLine2("TauLine2", &AnonStates)
vector< TransitionList > dBaseTrans
TransitionList TauLines("TauLines", &AnonStates)
void CalcTwoPhotonEmission(two_photon &tnu, bool lgDoInduced)