91 for( vector<two_photon>::iterator tnu = sp->
TwoNu.begin(); tnu != sp->
TwoNu.end(); ++tnu )
99 void iso_solve(
long ipISO,
long nelem,
double &maxerr)
115 if (fabs(renorm-1.0) > maxerr)
116 maxerr = fabs(renorm-1.0);
124 iso_sp[ipISO][nelem].
st[0].Pop() = 0.;
127 iso_sp[ipISO][nelem].
st[ipHi].Pop() = 0.;
128 for(
long ipLo=0; ipLo < ipHi; ipLo++ )
145 if ( nelem == 0 && ipISO == 0 )
147 double alphaeff2s=0., pop, alphaeff2p = 0;
149 fprintf(
ioQQQ,
"Effective recombination 2S/2P, ipISO=%li, nelem=%li, Te = %e, dens=%e\t%e, numlevels=%li\n", ipISO, nelem,
phycon.
te,
156 pop =
iso_sp[ipISO][nelem].
st[ipHi].Pop();
158 pop /=(2.*
pow2((
double)
iso_sp[ipISO][nelem].st[ipHi].n()));
174 iso_sp[ipISO][nelem].st[1].
S(),alphaeff2s );
176 iso_sp[ipISO][nelem].st[2].
S(),alphaeff2p );
199 enum {DEBUG_LOC=
false};
203 fprintf(
ioQQQ,
"DEBUG \t%.2f\t%.3e\t%.3e\t%.3e\t%.3e\t%.3e\t%.3e\t%.3e\n",
314 const bool lgJustAssert =
false, lgJustTest =
true;
331 sum_atom_iso +=
iso_sp[ipISO][nelem].
st[level].Pop();
344 iso_sp[ipISO][nelem].
st[0].Pop() = sum_atom_iso;
355 ipISO,nelem,renorm-1.,
382 iso_sp[ipISO][nelem].
st[ipHi].Pop() *= renorm;
388 for(
long ipLo=0; ipLo < ipHi; ipLo++ )
412 iso_sp[ipISO][nelem].st[level].Pop(), denom );
414 iso_sp[ipISO][nelem].
st[level].DepartCoef() = 0.;
419 iso_sp[ipISO][nelem].st[level].DepartCoef() = 1.;
427 long int in, il, is, i, ipLo, nResolved, ipFirstCollapsed=LONG_MIN;
428 char chPrtType[2][12]={
"populations",
"departure"};
430 char chSpin[3][9]= {
"singlets",
"doublets",
"triplets"};
432 #define ITEM_TO_PRINT(A_) ( lgPrtDeparCoef ? iso_sp[ipISO][nelem].st[A_].DepartCoef() : iso_sp[ipISO][nelem].st[A_].Pop() )
438 for( is = 1; is<=3; ++is)
442 else if( ipISO ==
ipHE_LIKE && is != 1 && is != 3 )
446 nResolved =
iso_sp[ipISO][nelem].
st[ipFirstCollapsed-1].n();
447 ASSERT( nResolved ==
iso_sp[ipISO][nelem].n_HighestResolved_local );
455 chPrtType[lgPrtDeparCoef]);
459 for( i =0; i < nResolved; ++i)
466 for( in = 1; in <= nResolved; ++in)
473 for( il = 0; il < in; ++il)
475 if( ipISO==
ipHE_LIKE && (in==2) && (il==1) && (is==3) )
493 in =
iso_sp[ipISO][nelem].
st[il].n();
510 double TeList[NTE] = {6000.,10000.,15000.,20000.,25000.};
516 fprintf(ioPun,
"Te\t2 3s 33s\n");
521 for( i=0; i<NTE; ++i )
void AGN_He1_CS(FILE *ioPun)
double H2_Solomon_dissoc_rate_used_H2g
bool lgContinuumLoweringEnabled[NISO]
void iso_continuum_lower(long ipISO, long nelem)
realnum H_ion_frac_collis
realnum SetIoniz[LIMELM][LIMELM+1]
long int IonHigh[LIMELM+1]
void ion_solver(long int nelem, bool lgPrintIt)
double H2_Solomon_dissoc_rate_BD96_H2g
molezone * findspecieslocal(const char buf[])
void iso_radiative_recomb_effective(long ipISO, long nelem)
void iso_photo(long ipISO, long nelem)
void TempChange(double TempNew, bool lgForceUpdate)
realnum HeCSInterp(long nelem, long ipHi, long ipLo, long Collider)
double H2_Solomon_dissoc_rate_TH85_H2g
t_elementnames elementnames
t_iso_sp iso_sp[NISO][LIMELM]
void iso_collapsed_lifetimes_update(long ipISO, long nelem)
double xIonDense[LIMELM][LIMELM+1]
double CharExcIonTotal[NCX]
bool fp_equal(sys_float x, sys_float y, int n=3)
void iso_collapsed_update(void)
ColliderList colliders(dense)
vector< two_photon > TwoNu
long int IonLow[LIMELM+1]
void iso_departure_coefficients(long ipISO, long nelem)
EmissionList::reference Emis() const
void iso_error_generation(long ipISO, long nelem)
realnum IonizErrorAllowed
void iso_radiative_recomb(long ipISO, long nelem)
void iso_collapsed_Aul_update(long ipISO, long nelem)
sys_float safe_div(sys_float x, sys_float y, sys_float res_0by0)
void CalcTwoPhotonRates(two_photon &tnu, bool lgDoInduced)
void iso_solve(long ipISO, long nelem, double &maxerr)
multi_arr< long, 3 > QuantumNumbers2Index
void iso_update_rates(void)
TransitionProxy trans(const long ipHi, const long ipLo)
char chElementSym[LIMELM][CHARS_ELEMENT_SYM]
CollisionProxy Coll() const
double & mult_opac() const
#define DEBUG_ENTRY(funcname)
void iso_cascade(long ipISO, long nelem)
#define ITEM_TO_PRINT(A_)
void iso_renorm(long nelem, long ipISO, double &renorm)
int fprintf(const Output &stream, const char *format,...)
void setConvIonizFail(const char *reason, double oldval, double newval)
void HydroLevel(long ipISO, long int ipZ)
void iso_prt_pops(long ipISO, long nelem, bool lgPrtDeparCoef)
t_secondaries secondaries
void PrintE82(FILE *, double)
void iso_ionize_recombine(long ipISO, long nelem)
void iso_collide(long ipISO, long nelem)
long int nCollapsed_local
double ColUL(const ColliderList &colls) const
void iso_level(const long ipISO, const long nelem, double &renorm, bool lgPrtMatrix)