19 #define KILL_BELOW_PLASMA(E_) ( (rfield.lgPlasNu && ((E_)<rfield.plsfrq) ) ? 0.:1. )
22 #define N_(A_) (iso_sp[ipISO][nelem].st[A_].n())
23 #define L_(A_) (iso_sp[ipISO][nelem].st[A_].l())
24 #define S_(A_) (iso_sp[ipISO][nelem].st[A_].S())
25 #define J_(A_) (iso_sp[ipISO][nelem].st[A_].j())
127 if( (l == 0 || s == 1) && g < 0 )
133 uint64 nn = uint64(n&0xffff);
134 uint64 ll = uint64(l&0xffff);
135 uint64 ss = uint64(s&0xffff);
136 uint64 gg = uint64(g&0xffff);
137 return (nn<<48) | (ll<<32) | (ss<<16) | gg;
148 QNPair(
int nhi,
int lhi,
int shi,
int ghi,
int nlo,
int llo,
int slo,
int glo)
155 inline QNPair QN2ind(
int nhi,
int lhi,
int shi,
int ghi,
int nlo,
int llo,
int slo,
int glo)
157 return QNPair(nhi, lhi, shi, ghi, nlo, llo, slo, glo);
194 void iso_cool(
long ipISO ,
long nelem );
210 void iso_setOpacity (
long ipISO,
long nelem,
long ipLo,
long ipHi);
268 void iso_level(
const long ipISO,
const long nelem,
double& renorm );
274 void iso_photo(
long ipISO ,
long nelem );
281 void iso_prt_pops(
long ipISO,
long nelem,
bool lgPrtDeparCoef );
324 double iso_recomb_check(
long ipISO,
long nelem,
long level,
double temperature );
345 double iso_RRCoef_Te(
long ipISO,
long nelem,
double temp,
long n );
362 void iso_solve(
long ipISO,
long nelem,
double &maxerr );
389 double hydro_energy(
long nelem,
long n,
long l,
long s,
long g);
553 vector<freeBound>
fb;
572 double energy(
long n,
long l,
long s,
long g = -1)
const
575 auto p =
Energy.find(ind);
585 double ERelToground =
energy(n, l, s, g);
586 if( ERelToground >= 0. && ERelToground <
IonPot )
587 return IonPot - ERelToground;
714 void iso_renorm(
long nelem,
long ipISO,
double& renorm );
const int N_ISO_TE_RECOMB
Definition: iso.h:102
bool lgImgMatrix
Definition: iso.h:708
#define MAX4(a, b, c, d)
Definition: cddefines.h:838
Definition: warnings.h:11
const int ipAL_LIKE
Definition: iso.h:76
t_iso_sp iso_sp[NISO][LIMELM]
Definition: iso.cpp:14
const int ipH4d
Definition: iso.h:37
const int ipC_LIKE
Definition: iso.h:69
void Reset()
Definition: iso.cpp:123
bool lgContinuumLoweringEnabled[NISO]
Definition: iso.h:440
Definition: two_photon.h:9
void zero()
Definition: iso.cpp:18
void iso_init()
Definition: iso.cpp:166
qList st
Definition: iso.h:554
int getL(char l)
Definition: iso_create.cpp:43
bool lgCS_PSClassic[NISO]
Definition: iso.h:473
const int ipHE_LIKE
Definition: iso.h:65
void iso_continuum_lower(long ipISO, long nelem)
Definition: iso_continuum_lower.cpp:15
double energy_ioniz(long n, long l, long s, long g=-1) const
Definition: iso.h:583
bool lgPessimisticErrors
Definition: iso.h:498
double RadRec_caseB
Definition: iso.h:648
bool lgColl_ionize[NISO]
Definition: iso.h:427
double iso_recomb_check(long ipISO, long nelem, long level, double temperature)
Definition: iso_radiative_recomb.cpp:759
bool lgCS_Fujim[NISO]
Definition: iso.h:473
const char * chName() const
Definition: iso.h:403
const int NISO
Definition: cddefines.h:321
const int ipHe2p3P1
Definition: iso.h:49
long int max_num_levels
Definition: iso.cpp:16
double xLineTotCool
Definition: iso.h:670
const int ipHe3d3D
Definition: iso.h:57
bool lgCompileRecomb[NISO]
Definition: iso.h:465
double iso_RRCoef_Te(long ipISO, long nelem, double temp, long n)
Definition: iso_radiative_recomb.cpp:733
const int ipHe2p3P0
Definition: iso.h:48
double RecomInducCool_Rate
Definition: iso.h:688
bool lgCS_therm_ave[NISO]
Definition: iso.h:473
void iso_recomb_alloc()
Definition: iso_radiative_recomb.cpp:780
map< QNPack, long > QNPack2Index
Definition: iso.h:542
const int ipHe2s3S
Definition: iso.h:46
map< QNPair, double > CachedAs
Definition: iso.h:593
long int numLevels_alloc
Definition: iso.h:637
long int nCollapsed_max
Definition: iso.h:622
const int IPCOLLIS
Definition: iso.h:89
long iso_get_total_num_levels(long ipISO, long nmaxResolved, long numCollapsed)
Definition: iso_create.cpp:1480
int ipResoRedist[NISO]
Definition: iso.h:459
void iso_suprathermal(long ipISO, long nelem)
Definition: iso_collide.cpp:91
const int ipHe2p1P
Definition: iso.h:51
double dLTot
Definition: iso.h:673
const int RECOMBMAGIC
Definition: iso.h:108
string iso_comment_tran_levels(long ipISO, long nelem, long ipLo, long ipHi)
Definition: prt_lines_hydro.cpp:40
const int ENERGIESMAGIC
Definition: iso.h:110
const int ipAR_LIKE
Definition: iso.h:81
bool lgCS_None[NISO]
Definition: iso.h:473
const int SumUpToThisN
Definition: iso.h:106
static long int globalISO
Definition: iso_radiative_recomb.cpp:38
const int ipHe3p3P
Definition: iso.h:56
QNPack hi
Definition: iso.h:142
bool operator<(const QNPair &q2) const
Definition: iso.h:144
bool lgColl_l_mixing[NISO]
Definition: iso.h:421
void iso_radiative_recomb_effective(long ipISO, long nelem)
Definition: iso_radiative_recomb.cpp:627
multi_arr< long, 2 > ipTrans
Definition: iso.h:549
bool lgRandErrGen[NISO]
Definition: iso.h:496
const int ipHe1s1S
Definition: iso.h:43
void iso_photo(long ipISO, long nelem)
void iso_put_error(long ipISO, long nelem, long ipHi, long ipLo, long whichData, realnum errorOpt, realnum errorPess)
bool lgPrtDepartCoef
Definition: iso.h:600
bool lgLTE_levels[NISO]
Definition: iso.h:429
vector< freeBound > fb
Definition: iso.h:553
const int ipP_LIKE
Definition: iso.h:78
bool lgCS_Vrinceanu[NISO]
Definition: iso.h:473
long int iso_Max_Emitting_Level(long nelem, long ipISO, bool lgPrnIsoCollapsed)
Definition: iso.cpp:249
bool lgCS_vrgm[NISO]
Definition: iso.h:473
double RRC_TeUsed[NISO][LIMELM]
Definition: iso.h:504
const int ipLI_LIKE
Definition: iso.h:66
long QN2Index(QNPack ind)
Definition: iso.cpp:142
t_isoCTRL iso_ctrl
Definition: iso.cpp:12
bool lgPopLTE_OK
Definition: iso.h:658
realnum SmallA
Definition: iso.h:456
QNPair(int nhi, int lhi, int shi, int ghi, int nlo, int llo, int slo, int glo)
Definition: iso.h:148
vector< double > HighestLevelOpacStack
Definition: iso.h:703
long int n_HighestResolved_local
Definition: iso.h:642
void iso_multiplet_opacities(void)
Definition: iso_level.cpp:758
multi_arr< double, 2 > BranchRatio
Definition: iso.h:552
const int ipCL_LIKE
Definition: iso.h:80
void iso_collapsed_update(void)
Definition: iso_solve.cpp:26
bool lgColl_excite[NISO]
Definition: iso.h:424
static long int globalZ
Definition: iso_radiative_recomb.cpp:38
vector< two_photon > TwoNu
Definition: iso.h:701
QNPack QN2ind(long n, long l, long s, long g=-1)
Definition: iso.h:114
void iso_update_num_levels(long ipISO, long nelem)
Definition: iso_create.cpp:1503
long int n_HighestResolved_max
Definition: iso.h:640
const int ipHe2s1S
Definition: iso.h:47
long int nLyman_max[NISO]
Definition: iso.h:414
int nCS_new[NISO]
Definition: iso.h:489
Definition: quantumstate.h:35
bool lgLevelsLowered
Definition: iso.h:609
void iso_cool(long ipISO, long nelem)
long int nLyman[NISO]
Definition: iso.h:414
const int ipH1s
Definition: iso.h:29
long int nLyman_alloc[NISO]
Definition: iso.h:414
uint64 QNPack
Definition: iso.h:112
void iso_departure_coefficients(long ipISO, long nelem)
Definition: iso_solve.cpp:397
const int RREC_MAXN
Definition: iso.h:97
const int ipB_LIKE
Definition: iso.h:68
void iso_error_generation(long ipISO, long nelem)
Definition: iso_error.cpp:81
void iso_satellite_update(long nelem)
Definition: iso_create.cpp:1396
const int ipHe3p1P
Definition: iso.h:59
const char * chISO[NISO]
Definition: iso.h:410
void iso_level(const long ipISO, const long nelem, double &renorm)
double cLyrest_cool
Definition: iso.h:682
void iso_charge_transfer_update(long nelem)
Definition: iso_ionize_recombine.cpp:18
const int ipNA_LIKE
Definition: iso.h:74
double coll_ion
Definition: iso.h:664
bool lgCS_PSM20[NISO]
Definition: iso.h:473
TransitionList * tr
Definition: iso.h:555
bool lgCS_PS64[NISO]
Definition: iso.h:473
bool lgDielRecom[NISO]
Definition: iso.h:447
float realnum
Definition: cddefines.h:127
const int ipH4p
Definition: iso.h:36
bool lgPrintNumberOfLevels
Definition: iso.h:408
double hydro_energy(long nelem, long n, long l, long s, long g)
Definition: iso_create.cpp:154
void iso_recomb_auxiliary_free()
Definition: iso_radiative_recomb.cpp:836
bool lgLevelsEverLowered
Definition: iso.h:613
bool lgPrtLevelPops
Definition: iso.h:606
long max(int a, long b)
Definition: cddefines.h:821
const int ipHe3s3S
Definition: iso.h:54
void iso_radiative_recomb(long ipISO, long nelem)
Definition: iso_radiative_recomb.cpp:147
void iso_collisional_ionization(long ipISO, long nelem)
Definition: iso_collide.cpp:28
bool lgPrtNCrit
Definition: iso.h:603
double RecomCollisFrac
Definition: iso.h:655
const int ipH3s
Definition: iso.h:32
void iso_solve(long ipISO, long nelem, double &maxerr)
Definition: iso_solve.cpp:95
double iso_cross_section(double ERyd, double EthRyd, long n, long l, long S, long globalZ, long globalISO)
Definition: iso_radiative_recomb.cpp:130
const int ipMG_LIKE
Definition: iso.h:75
bool lgKeepFS
Definition: iso.h:500
void comment(t_warnings &)
Definition: iso.h:401
t_isoCTRL()
Definition: iso.h:506
const int ipH3d
Definition: iso.h:34
void iso_init_energies()
Definition: iso.cpp:280
void iso_update_rates(void)
Definition: iso_solve.cpp:44
const int ipS_LIKE
Definition: iso.h:79
double cBal_cool
Definition: iso.h:679
bool lgCritDensLMix[NISO]
Definition: iso.h:492
bool lgNoMaser[NISO][LIMELM]
Definition: iso.h:450
TransitionProxy trans(const long ipHi, const long ipLo)
Definition: iso.h:545
long QN2Index(long n, long l, long s, long g=-1)
Definition: iso.h:559
int nLyaLevel[NISO]
Definition: iso.h:462
bool lgInd2nu_On
Definition: iso.h:437
bool lgPopsRescaled
Definition: iso.h:619
double FreeBnd_net_Cool_Rate
Definition: iso.h:661
const int ipH2p
Definition: iso.h:31
multi_arr< double, 2 > CascadeProb
Definition: iso.h:551
bool lgCS_Seaton[NISO]
Definition: iso.h:473
multi_arr< extra_tr, 2 > ex
Definition: iso.h:550
double cLya_cool
Definition: iso.h:685
#define ASSERT(exp)
Definition: cddefines.h:637
double qTot2S
Definition: iso.h:698
const int ipH2s
Definition: iso.h:30
int ipLyaRedist[NISO]
Definition: iso.h:459
bool lgCS_VOS12[NISO]
Definition: iso.h:473
double RadRec_effec
Definition: iso.h:652
double energy(long n, long l, long s, long g=-1) const
Definition: iso.h:572
void iso_recomb_setup(long ipISO)
Definition: iso_radiative_recomb.cpp:845
const int ipH_LIKE
Definition: iso.h:64
const int LIMELM
Definition: cddefines.h:318
const int ipHe2p3P2
Definition: iso.h:50
double iso_state_lifetime(long ipISO, long nelem, long n, long l)
Definition: iso_create.cpp:1079
int LIKE_RREC_MAXN(int nelem)
Definition: iso.h:100
const int ipHELIUM
Definition: cddefines.h:360
void iso_cascade(long ipISO, long nelem)
Definition: iso_create.cpp:1123
bool lgCS_VOS_thermal[NISO]
Definition: iso.h:473
void iso_create(void)
Definition: iso_create.cpp:192
Definition: transition.h:297
bool lgCS_VOS12QM[NISO]
Definition: iso.h:473
void iso_setRedisFun(long ipISO, long nelem, long ipLo, long ipHi)
Definition: iso_create.cpp:58
Definition: freebound.h:9
const int ipSI_LIKE
Definition: iso.h:77
QNPack lo
Definition: iso.h:143
const int IPRAD
Definition: iso.h:88
const int ipBE_LIKE
Definition: iso.h:67
int ipSubRedist[NISO]
Definition: iso.h:459
void iso_renorm(long nelem, long ipISO, double &renorm)
Definition: iso_solve.cpp:306
void IonHydro()
Definition: iso_solve.cpp:183
bool lgCollStrenThermAver
Definition: iso.h:433
double xIonSimple
Definition: iso.h:597
bool lgCS_Lebedev[NISO]
Definition: iso.h:473
bool lgPrtMatrix
Definition: iso.h:706
realnum stat_ion[NISO]
Definition: iso.h:444
Definition: transition.h:23
const int ipH4s
Definition: iso.h:35
#define S(I_, J_)
Definition: optimize_subplx.cpp:1826
double RadRecCool
Definition: iso.h:676
bool lgCS_B72[NISO]
Definition: iso.h:473
long int numLevels_max
Definition: iso.h:628
void iso_prt_pops(long ipISO, long nelem, bool lgPrtDeparCoef)
Definition: iso_solve.cpp:421
const int ipNE_LIKE
Definition: iso.h:73
double cRest_cool
Definition: iso.h:667
bool lgTopoff[NISO]
Definition: iso.h:502
realnum CaseBCheck
Definition: iso.h:645
void iso_setOpacity(long ipISO, long nelem, long ipLo, long ipHi)
Definition: iso_create.cpp:92
const int ipHe3d1D
Definition: iso.h:58
void iso_ionize_recombine(long ipISO, long nelem)
void iso_collide(long ipISO, long nelem)
Definition: iso_collide.cpp:132
const int ipH3p
Definition: iso.h:33
void iso_set_ion_rates(long ipISO, long nelem)
Definition: iso_level.cpp:813
long int numLevels_local
Definition: iso.h:633
long int nCollapsed_local
Definition: iso.h:623
const int ipF_LIKE
Definition: iso.h:72
const int ipH4f
Definition: iso.h:38
bool lgCS_PSdeg[NISO]
Definition: iso.h:473
const int ipN_LIKE
Definition: iso.h:70
const int ipHe3s1S
Definition: iso.h:55
bool lgMustReeval
Definition: iso.h:616
bool lgCS_Vriens[NISO]
Definition: iso.h:473
bool lgErrGenDone
Definition: iso.h:695
double iso_dielec_recomb_rate(long ipISO, long nelem, long ipLo)
Definition: iso_radiative_recomb.cpp:1144
char chTypeAtomUsed[10]
Definition: iso.h:691
map< QNPack, double > Energy
Definition: iso.h:566
double IonPot
Definition: iso.h:569
const int ipO_LIKE
Definition: iso.h:71
bool lgNoRecombInterp[NISO]
Definition: iso.h:470