cloudy  trunk
iso_solve.cpp
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2013 by Gary J. Ferland and
2  * others. For conditions of distribution and use see copyright notice in license.txt */
3 /* iso_solve main routine to call iso_level and determine iso level balances */
4 /* iso_renorm - renormalize iso sequences so that they agree with the ionization balance */
5 /* AGN_He1_CS routine to save table needed for AGN3 - collision strengths of HeI */
6 #include "cddefines.h"
7 #include "atmdat.h"
8 #include "conv.h"
9 #include "dense.h"
10 #include "opacity.h"
11 #include "elementnames.h"
12 #include "h2.h"
13 #include "helike.h"
14 #include "helike_cs.h"
15 #include "hmi.h"
16 #include "mole.h"
17 #include "hydrogenic.h"
18 #include "ionbal.h"
19 #include "iso.h"
20 #include "phycon.h"
21 #include "rfield.h"
22 #include "secondaries.h"
23 #include "taulines.h"
24 #include "thermal.h"
25 #include "trace.h"
26 
28 {
29  for( long nelem=ipHYDROGEN; nelem<=ipHELIUM; nelem++ )
30  {
31  if (dense.lgElmtOn[nelem])
32  {
33  for( long ipISO=ipH_LIKE; ipISO<MIN2(NISO,nelem+1); ipISO++ )
34  {
35  if ((dense.IonHigh[nelem] >= nelem - ipISO &&
36  dense.IonLow[nelem] <= nelem - ipISO) || !conv.nTotalIoniz)
37  {
38  iso_collapsed_bnl_set( ipISO, nelem );
39 
40  iso_collapsed_Aul_update( ipISO, nelem );
41 
42  iso_collapsed_lifetimes_update( ipISO, nelem );
43 
44  iso_cascade( ipISO, nelem );
45  }
46  }
47  }
48  }
49 }
50 
51 void iso_update_rates( void )
52 {
53  for( long nelem=ipHYDROGEN; nelem<LIMELM; nelem++ )
54  {
55  if (!dense.lgElmtOn[nelem])
56  continue;
57  for( long ipISO=ipH_LIKE; ipISO<MIN2(NISO,nelem+1); ipISO++ )
58  {
59  if ((dense.IonHigh[nelem] >= nelem - ipISO &&
60  dense.IonLow[nelem] <= nelem - ipISO) || !conv.nTotalIoniz)
61  {
62 
63  /* evaluate collisional rates */
64  iso_collide( ipISO, nelem );
65 
66  /* truncate atom if physical conditions limit the maximum principal quantum number of a
67  * bound electron to a number less than the malloc'd size */
69  iso_continuum_lower( ipISO, nelem );
70 
71  /* evaluate recombination rates -- needs to precede iso_photo because of topoff fix */
72  iso_radiative_recomb( ipISO , nelem );
73 
74  /* evaluate photoionization rates */
75  iso_photo( ipISO , nelem );
76 
77  /* Generate Gaussian errors if turned on. */
78  if( iso_ctrl.lgRandErrGen[ipISO] && nzone==0 && !iso_sp[ipISO][nelem].lgErrGenDone )
79  {
80  iso_error_generation(ipISO, nelem );
81  }
82 
83  iso_radiative_recomb_effective( ipISO, nelem );
84 
85  iso_ionize_recombine( ipISO , nelem );
86 
87  ionbal.RateRecomTot[nelem][nelem-ipISO] = ionbal.RateRecomIso[nelem][ipISO];
88  }
89 
91  ASSERT( ipISO <= ipHE_LIKE );
92  // two-photon processes
93  t_iso_sp* sp = &iso_sp[ipISO][nelem];
94  for( vector<two_photon>::iterator tnu = sp->TwoNu.begin(); tnu != sp->TwoNu.end(); ++tnu )
95  {
97  }
98  }
99  }
100 }
101 
102 void iso_solve(long ipISO, long nelem, double &maxerr)
103 {
104  DEBUG_ENTRY( "iso_solve()" );
105 
106  maxerr = 0.;
107  /* do not consider elements that have been turned off */
108  if( dense.lgElmtOn[nelem] )
109  {
110  /* note that nelem scale is totally on c not physical scale, so 0 is h */
111  /* evaluate balance if ionization reaches this high */
112  if( (dense.IonHigh[nelem] >= nelem - ipISO) &&
113  (dense.IonLow[nelem] <= nelem - ipISO) )
114  {
115  /* solve for the level populations */
116  double renorm;
117  iso_level( ipISO , nelem, renorm );
118  if (fabs(renorm-1.0) > maxerr)
119  maxerr = fabs(renorm-1.0);
120 
121  /* this just contains a bunch of trace statements. */
122  if( ipISO == ipH_LIKE )
123  HydroLevel(nelem);
124  }
125  else
126  {
127  /* zero it out since no population*/
128  iso_sp[ipISO][nelem].st[0].Pop() = 0.;
129  for( long ipHi=1; ipHi < iso_sp[ipISO][nelem].numLevels_max; ipHi++ )
130  {
131  iso_sp[ipISO][nelem].st[ipHi].Pop() = 0.;
132  for( long ipLo=0; ipLo < ipHi; ipLo++ )
133  {
134  if( iso_sp[ipISO][nelem].trans(ipHi,ipLo).Emis().Aul() <= iso_ctrl.SmallA )
135  continue;
136 
137  /* population of lower level rel to ion, corrected for stim em */
138  iso_sp[ipISO][nelem].trans(ipHi,ipLo).Emis().PopOpc() = 0.;
139  }
140  }
141  }
142 
143  ASSERT( (*iso_sp[ipISO][nelem].trans(iso_ctrl.nLyaLevel[ipISO],0).Lo()).Pop() == iso_sp[ipISO][nelem].st[0].Pop() );
144  }
145 
146  return;
147 }
148 
149 void IonHydro( void )
150 {
151  DEBUG_ENTRY( "IonHydro()" );
152 
153  /* ============================================================================== */
154  /* rest is for hydrogen only */
155 
156  {
157  /*@-redef@*/
158  /* often the H- route is the most efficient formation mechanism for H2,
159  * will be through rate called ratach
160  * this debug print statement is to trace h2 oscillations */
161  enum {DEBUG_LOC=false};
162  /*@+redef@*/
163  if(DEBUG_LOC )
164  {
165  fprintf(ioQQQ,"DEBUG \t%.2f\t%.3e\t%.3e\t%.3e\t%.3e\t%.3e\t%.3e\t%.3e\n",
166  fnzone,
167  hmi.H2_total ,
168  findspecieslocal("H2")->den,
174  }
175  }
176 #if 0
177  /* >>chng 01 may 09, add option to force abundance, with element name ioniz cmmnd */
179  {
181  dense.xIonDense[ipHYDROGEN][1] = dense.SetIoniz[ipHYDROGEN][1]*dense_ation;
182  dense.xIonDense[ipHYDROGEN][0] = dense.SetIoniz[ipHYDROGEN][0]*dense_ation;
183 
184  /* initialize ground state pop too */
186  }
187  else
188  {
189  /*
190  * >> chng 03 jan 15 rjrw:- terms are now in ion_solver, to allow for
191  * molecular sources and sinks of H and H+. ion_solver renormalizes
192  * to keep the total H abundance correct -- only the molecular
193  * network is allowed to change this.
194  */
195  ion_solver( ipHYDROGEN , false );
196  }
197 
198  fixit(); /* this is called in HydroLevel above, is it needed in both places? */
199  /* >>hcng 05 mar 24,
200  * renormalize the populations and emission of H atom to agree with chemistry */
201  double renorm;
202  iso_renorm( ipHYDROGEN, ipH_LIKE, renorm );
203 #endif
204  ion_solver( ipHYDROGEN , false );
205 
206  /* remember the ratio of pops of 2p to 1s for possible printout in prtComment
207  * and to obtain Lya excitation temps. the pop of ground is not defined if
208  * NO ionization at all since these pops are relative to ion */
209  /* >>chng 99 jun 03, added MAX2 to protect against totally neutral gas */
210  if( iso_sp[ipH_LIKE][ipHYDROGEN].st[ipH2p].Pop()/MAX2(SMALLDOUBLE,iso_sp[ipH_LIKE][ipHYDROGEN].st[ipH1s].Pop()) > 0.1 &&
211  iso_sp[ipH_LIKE][ipHYDROGEN].st[ipH1s].Pop() > SMALLDOUBLE )
212  {
213  hydro.lgHiPop2 = true;
215  hydro.pop2mx);
216  }
217 
218  double gamtot = iso_sp[ipH_LIKE][ipHYDROGEN].fb[ipH1s].gamnc + secondaries.csupra[ipHYDROGEN][0];
219 
220  double coltot = iso_sp[ipH_LIKE][ipHYDROGEN].fb[ipH1s].ColIoniz +
222  4. * iso_sp[ipH_LIKE][ipHYDROGEN].st[ipH2p].Boltzmann();
223 
224  /* if ground state destruction rate is significant, recall different dest procceses */
225  if( iso_sp[ipH_LIKE][ipHYDROGEN].fb[ipH1s].RateLevel2Cont > SMALLFLOAT )
226  {
228  (realnum)(iso_sp[ipH_LIKE][ipHYDROGEN].fb[ipH1s].gamnc/iso_sp[ipH_LIKE][ipHYDROGEN].fb[ipH1s].RateLevel2Cont );
229 
230  /* fraction of ionizations of H from ground, due to thermal collisions */
232  (realnum)(iso_sp[ipH_LIKE][ipHYDROGEN].fb[ipH1s].ColIoniz*dense.eden/iso_sp[ipH_LIKE][ipHYDROGEN].fb[ipH1s].RateLevel2Cont);
233 
234  /* this flag is used in ConvBase to decide whether we
235  * really need to converge the secondary ionization rates */
238 
239  /* frac of ionizations due to ct */
241  }
242  else
243  {
245  hydro.H_ion_frac_photo = 0.;
246  secondaries.sec2total = 0.;
247  atmdat.HIonFrac = 0.;
248  }
249 
250  if( trace.lgTrace )
251  {
252  fprintf( ioQQQ, " Hydrogenic return %.2f ",fnzone);
253  fprintf(ioQQQ,"H0:%.3e ", dense.xIonDense[ipHYDROGEN][0]);
254  fprintf(ioQQQ,"H+:%.3e ", dense.xIonDense[ipHYDROGEN][1]);
255  fprintf(ioQQQ,"H2:%.3e ", hmi.H2_total);
256  fprintf(ioQQQ,"H-:%.3e ", findspecieslocal("H-")->den);
257  fprintf(ioQQQ,"ne:%.3e ", dense.eden);
258  fprintf( ioQQQ, " REC, COL, GAMT= ");
259  /* recomb rate coef, cm^3 s-1 */
260  fprintf(ioQQQ,"%.2e ", iso_sp[ipH_LIKE][ipHYDROGEN].RadRec_effec );
261  fprintf(ioQQQ,"%.2e ", coltot);
262  fprintf(ioQQQ,"%.2e ", gamtot);
263  fprintf( ioQQQ, " CSUP=");
265  fprintf( ioQQQ, "\n");
266  }
267 
268  return;
269 }
270 
271 /* iso_renorm - renormalize iso sequences so that they agree with the ionization balance */
272 void iso_renorm( long nelem, long ipISO, double &renorm )
273 {
274  DEBUG_ENTRY( "iso_renorm()" );
275 
276  const bool lgJustAssert = false, lgJustTest = true;
277  double sum_atom_iso;
278 
279  renorm = 1.0;
280 
281  if (ipISO > nelem)
282  return;
283 
284  /*>>chng 04 mar 23, add this renorm */
285  /* renormalize the state specific populations, so that they
286  * add up to the results that came from ion_solver
287  * units at first is sum div by H+ density, since Pop2Ion defn this way */
288  sum_atom_iso = 0.;
289  /* >> chng 06 aug 31, from numLevels_max to _local */
290  for( long level=0; level < iso_sp[ipISO][nelem].numLevels_local; level++ )
291  {
292  /* cm-3 - total population in iso solved model */
293  sum_atom_iso += iso_sp[ipISO][nelem].st[level].Pop();
294  }
295 
296  // If total iso population is tiny, populate ground state (probably due to
297  // e.g. ++dense.IonHigh[nelem] somewhere)
298  if (sum_atom_iso <= SMALLFLOAT)
299  {
300  // Ensure this is different from the ion density, so it is signalled as non-convergence
301  if (dense.xIonDense[nelem][nelem-ipISO] > 2.0*SMALLFLOAT)
302  sum_atom_iso = 0.5*dense.xIonDense[nelem][nelem-ipISO];
303  else
304  sum_atom_iso = 1.0;
305  if ( !lgJustTest )
306  iso_sp[ipISO][nelem].st[0].Pop() = sum_atom_iso;
307  }
308 
309  /* >>chng 04 may 25, humunculus sum_atom_iso is zero */
310  renorm = dense.xIonDense[nelem][nelem-ipISO] / sum_atom_iso;
311 
312  if (lgJustTest)
313  return;
314 
315  if (0)
316  fprintf (ioQQQ, "Iso_Renorm %ld %ld %g %g %g[%g]\n",
317  ipISO,nelem,renorm-1.,
318  dense.xIonDense[nelem][nelem-ipISO], sum_atom_iso,
319  iso_sp[ipISO][nelem].st[0].Pop());
320  if (lgJustAssert)
321  {
322  ASSERT(fp_equal(renorm,1.0));
323  return;
324  }
325  if (conv.lgConvIoniz() && dense.xIonDense[nelem][nelem-ipISO] > SMALLFLOAT &&
326  fabs(renorm - 1.0) > conv.IonizErrorAllowed)
327  {
328  conv.setConvIonizFail( "Iso vs. ion",
329  dense.xIonDense[nelem][nelem-ipISO],
330  sum_atom_iso);
331  //fprintf(ioQQQ,"%g %g %g\n",renorm-1.0,sum_atom_iso,dense.xIonDense[nelem][nelem-ipISO]);
332  }
333 
334  /*fprintf(ioQQQ,"DEBUG renorm\t%.2f\t%.3e\n",fnzone, renorm);*/
335 
336  //ASSERT( renorm < BIGFLOAT );
337  /* renormalize populations from iso-model atom so that they agree with ion solver & chemistry */
338  /*fprintf(ioQQQ,"DEBUG h \t%.3e hydrogenic renorm %.3e\n",
339  iso_sp[ipH_LIKE][nelem].st[ipH1s].Pop ,
340  iso_sp[ipH_LIKE][nelem].st[ipH1s].Pop/renorm );*/
341 
342  for( long ipHi=0; ipHi < iso_sp[ipISO][nelem].numLevels_local; ipHi++ )
343  {
344  iso_sp[ipISO][nelem].st[ipHi].Pop() *= renorm;
345  }
346 
347  /* >> chng 06 aug 31, from numLevels_max to _local */
348  for( long ipHi=0; ipHi < iso_sp[ipISO][nelem].numLevels_local; ipHi++ )
349  {
350  for( long ipLo=0; ipLo < ipHi; ipLo++ )
351  {
352  if( iso_sp[ipISO][nelem].trans(ipHi,ipLo).Emis().Aul() <= iso_ctrl.SmallA )
353  continue;
354 
355  /* population of lower level rel to ion, corrected for stim em */
356  iso_sp[ipISO][nelem].trans(ipHi,ipLo).Emis().PopOpc() *= renorm;
357  }
358  }
359 
360  return;
361 }
362 
363 void iso_departure_coefficients( long ipISO, long nelem )
364 {
365  DEBUG_ENTRY( "iso_departure_coefficients()" );
366 
367  for( long level=0; level < iso_sp[ipISO][nelem].numLevels_local; level++ )
368  {
369  double denom = dense.xIonDense[nelem][nelem+1-ipISO]*
370  iso_sp[ipISO][nelem].fb[level].PopLTE*dense.eden;
371 
372  if( iso_sp[ipISO][nelem].fb[level].PopLTE > 0. && denom > SMALLFLOAT )
373  iso_sp[ipISO][nelem].fb[level].DepartCoef = safe_div(
374  iso_sp[ipISO][nelem].st[level].Pop(), denom );
375  else
376  iso_sp[ipISO][nelem].fb[level].DepartCoef = 0.;
377  }
378 
379  for( long level=iso_sp[ipISO][nelem].numLevels_local; level < iso_sp[ipISO][nelem].numLevels_max; level++ )
380  iso_sp[ipISO][nelem].fb[level].DepartCoef = 0.;
381 
382  return;
383 }
384 
385 /*iso_prt_pops print out iso sequence populations or departure coefficients */
386 void iso_prt_pops( long ipISO, long nelem, bool lgPrtDeparCoef )
387 {
388  long int in, il, is, i, ipLo, nResolved, ipFirstCollapsed=LONG_MIN;
389  char chPrtType[2][12]={"populations","departure"};
390  /* first dimension is multiplicity */
391  char chSpin[3][9]= {"singlets", "doublets", "triplets"};
392 
393 #define ITEM_TO_PRINT(A_) ( lgPrtDeparCoef ? iso_sp[ipISO][nelem].fb[A_].DepartCoef : iso_sp[ipISO][nelem].st[A_].Pop() )
394 
395  DEBUG_ENTRY( "iso_prt_pops()" );
396 
397  ASSERT( ipISO < NISO );
398 
399  for( is = 1; is<=3; ++is)
400  {
401  if( ipISO == ipH_LIKE && is != 2 )
402  continue;
403  else if( ipISO == ipHE_LIKE && is != 1 && is != 3 )
404  continue;
405 
406  ipFirstCollapsed= iso_sp[ipISO][nelem].numLevels_local-iso_sp[ipISO][nelem].nCollapsed_local;
407  nResolved = iso_sp[ipISO][nelem].st[ipFirstCollapsed-1].n();
408  ASSERT( nResolved == iso_sp[ipISO][nelem].n_HighestResolved_local );
409  ASSERT(nResolved > 0 );
410 
411  /* give element number and spin */
412  fprintf(ioQQQ," %s %s %s %s\n",
413  iso_ctrl.chISO[ipISO],
414  elementnames.chElementSym[nelem],
415  chSpin[is-1],
416  chPrtType[lgPrtDeparCoef]);
417 
418  /* header with the l states */
419  fprintf(ioQQQ," n\\l=> ");
420  for( i =0; i < nResolved; ++i)
421  {
422  fprintf(ioQQQ,"%2ld ",i);
423  }
424  fprintf(ioQQQ,"\n");
425 
426  /* loop over prin quant numbers, one per line, with l across */
427  for( in = 1; in <= nResolved; ++in)
428  {
429  if( is==3 && in==1 )
430  continue;
431 
432  fprintf(ioQQQ," %2ld ",in);
433 
434  for( il = 0; il < in; ++il)
435  {
436  if( ipISO==ipHE_LIKE && (in==2) && (il==1) && (is==3) )
437  {
438  fprintf( ioQQQ, "%9.3e ", ITEM_TO_PRINT(ipHe2p3P0) );
439  fprintf( ioQQQ, "%9.3e ", ITEM_TO_PRINT(ipHe2p3P1) );
440  fprintf( ioQQQ, "%9.3e ", ITEM_TO_PRINT(ipHe2p3P2) );
441  }
442  else
443  {
444  ipLo = iso_sp[ipISO][nelem].QuantumNumbers2Index[in][il][is];
445  fprintf( ioQQQ, "%9.3e ", ITEM_TO_PRINT(ipLo) );
446  }
447  }
448  fprintf(ioQQQ,"\n");
449  }
450  }
451  /* above loop was over spin, now do collapsed levels, no spin or ang momen */
452  for( il = ipFirstCollapsed; il < iso_sp[ipISO][nelem].numLevels_local; ++il)
453  {
454  in = iso_sp[ipISO][nelem].st[il].n();
455  /* prin quan number of collapsed levels */
456  fprintf(ioQQQ," %2ld ",in);
457  fprintf( ioQQQ, "%9.3e ", ITEM_TO_PRINT(il) );
458  fprintf(ioQQQ,"\n");
459  }
460  return;
461 }
462 
463 /* routine to save table needed for AGN3 - collision strengths of HeI */
464 void AGN_He1_CS( FILE *ioPun )
465 {
466 
467  long int i;
468 
469  /* list of temperatures where cs will be printed */
470  const int NTE = 5;
471  double TeList[NTE] = {6000.,10000.,15000.,20000.,25000.};
472  double TempSave;
473 
474  DEBUG_ENTRY( "AGN_He1_CS()" );
475 
476  /* put on a header */
477  fprintf(ioPun, "Te\t2 3s 33s\n");
478 
479  /* Restore the original temp when this routine done. */
480  TempSave = phycon.te;
481 
482  for( i=0; i<NTE; ++i )
483  {
484  TempChange(TeList[i] , false);
485 
486  fprintf(ioPun , "%.0f\t",
487  TeList[i] );
488  fprintf(ioPun , "%.2f\t",
490  fprintf(ioPun , "%.2f\t",
492  fprintf(ioPun , "%.2f\t",
494  fprintf(ioPun , "%.3f\t",
496  /*fprintf(ioPun , "%.1f\t%.1f\t%.1f\n", */
497  fprintf(ioPun , "%.1f\n",
501  }
502 
503  /* no need to force update since didn't do above */
504  TempChange(TempSave , false);
505  return;
506 }
thermal.h
t_hydro::lgHiPop2
bool lgHiPop2
Definition: hydrogenic.h:55
t_isoCTRL::nLyaLevel
int nLyaLevel[NISO]
Definition: iso.h:377
findspecieslocal
molezone * findspecieslocal(const char buf[])
Definition: mole_species.cpp:833
HydroLevel
void HydroLevel(long int ipZ)
Definition: hydrolevel.cpp:209
helike.h
iso_level
void iso_level(const long ipISO, const long nelem, double &renorm)
SMALLDOUBLE
const double SMALLDOUBLE
Definition: cpu.h:195
ipHE_LIKE
const int ipHE_LIKE
Definition: iso.h:63
t_dense::eden
double eden
Definition: dense.h:190
t_dense::EdenHCorr
double EdenHCorr
Definition: dense.h:216
colliders
ColliderList colliders
Definition: collision.cpp:57
dense
t_dense dense
Definition: dense.cpp:24
elementnames.h
secondaries.h
rfield
t_rfield rfield
Definition: rfield.cpp:8
ioQQQ
FILE * ioQQQ
Definition: cddefines.cpp:7
elementnames
t_elementnames elementnames
Definition: elementnames.cpp:5
TempChange
void TempChange(double TempNew, bool lgForceUpdate)
Definition: temp_change.cpp:51
t_isoCTRL::chISO
const char * chISO[NISO]
Definition: iso.h:330
t_atmdat::CharExcIonTotal
double CharExcIonTotal[NCX]
Definition: atmdat.h:162
realnum
float realnum
Definition: cddefines.h:103
conv.h
rfield.h
ipHe3s3S
const int ipHe3s3S
Definition: iso.h:52
t_ionbal::RateRecomTot
double ** RateRecomTot
Definition: ionbal.h:198
mole.h
EmissionProxy::PopOpc
double & PopOpc() const
Definition: emission.h:603
t_conv::IonizErrorAllowed
realnum IonizErrorAllowed
Definition: conv.h:280
t_conv::setConvIonizFail
void setConvIonizFail(const char *reason, double oldval, double newval)
Definition: conv.h:107
iso_collapsed_lifetimes_update
void iso_collapsed_lifetimes_update(long ipISO, long nelem)
Definition: iso_create.cpp:1807
t_dense::lgElmtOn
bool lgElmtOn[LIMELM]
Definition: dense.h:146
ipHe2p3P0
const int ipHe2p3P0
Definition: iso.h:46
t_hmi::H2_Solomon_dissoc_rate_BD96_H2g
double H2_Solomon_dissoc_rate_BD96_H2g
Definition: hmi.h:95
iso_prt_pops
void iso_prt_pops(long ipISO, long nelem, bool lgPrtDeparCoef)
Definition: iso_solve.cpp:386
t_iso_sp::numLevels_local
long int numLevels_local
Definition: iso.h:498
t_isoCTRL::lgRandErrGen
bool lgRandErrGen[NISO]
Definition: iso.h:403
phycon
t_phycon phycon
Definition: phycon.cpp:6
trace.h
iso_collapsed_bnl_set
void iso_collapsed_bnl_set(long ipISO, long nelem)
Definition: iso_create.cpp:1519
t_iso_sp::TwoNu
vector< two_photon > TwoNu
Definition: iso.h:586
iso_radiative_recomb_effective
void iso_radiative_recomb_effective(long ipISO, long nelem)
Definition: iso_radiative_recomb.cpp:602
t_iso_sp
Definition: iso.h:441
ASSERT
#define ASSERT(exp)
Definition: cddefines.h:578
t_hmi::H2_total
double H2_total
Definition: hmi.h:16
iso.h
IonHydro
void IonHydro(void)
Definition: iso_solve.cpp:149
ipHYDROGEN
const int ipHYDROGEN
Definition: cddefines.h:305
PrintE82
void PrintE82(FILE *, double)
Definition: service.cpp:739
TransitionProxy::Coll
CollisionProxy Coll() const
Definition: transition.h:424
atmdat.h
iso_photo
void iso_photo(long ipISO, long nelem)
MIN2
#define MIN2
Definition: cddefines.h:761
iso_cascade
void iso_cascade(long ipISO, long nelem)
Definition: iso_create.cpp:1101
t_secondaries::sec2total
realnum sec2total
Definition: secondaries.h:27
nzone
long int nzone
Definition: cddefines.cpp:14
ipHe3d3D
const int ipHe3d3D
Definition: iso.h:55
t_iso_sp::nCollapsed_local
long int nCollapsed_local
Definition: iso.h:488
TransitionProxy::Emis
EmissionList::reference Emis() const
Definition: transition.h:408
ipHe3d1D
const int ipHe3d1D
Definition: iso.h:56
t_conv::lgConvIoniz
bool lgConvIoniz() const
Definition: conv.h:115
t_iso_sp::lgErrGenDone
bool lgErrGenDone
Definition: iso.h:560
dense.h
iso_radiative_recomb
void iso_radiative_recomb(long ipISO, long nelem)
Definition: iso_radiative_recomb.cpp:149
t_atmdat::HIonFrac
double HIonFrac
Definition: atmdat.h:166
t_isoCTRL::SmallA
realnum SmallA
Definition: iso.h:371
trace
t_trace trace
Definition: trace.cpp:5
t_hydro::pop2mx
realnum pop2mx
Definition: hydrogenic.h:56
cddefines.h
safe_div
sys_float safe_div(sys_float x, sys_float y, sys_float res_0by0)
Definition: cddefines.h:961
iso_collapsed_Aul_update
void iso_collapsed_Aul_update(long ipISO, long nelem)
Definition: iso_create.cpp:1760
ion_solver
void ion_solver(long int nelem, bool lgPrintIt)
Definition: ion_solver.cpp:62
iso_collide
void iso_collide(long ipISO, long nelem)
Definition: iso_collide.cpp:120
t_iso_sp::numLevels_max
long int numLevels_max
Definition: iso.h:493
ipHe2p3P1
const int ipHe2p3P1
Definition: iso.h:47
ITEM_TO_PRINT
#define ITEM_TO_PRINT(A_)
t_elementnames::chElementSym
char chElementSym[LIMELM][CHARS_ELEMENT_SYM]
Definition: elementnames.h:25
CalcTwoPhotonRates
void CalcTwoPhotonRates(two_photon &tnu, bool lgDoInduced)
Definition: two_photon.cpp:83
iso_renorm
void iso_renorm(long nelem, long ipISO, double &renorm)
Definition: iso_solve.cpp:272
iso_solve
void iso_solve(long ipISO, long nelem, double &maxerr)
Definition: iso_solve.cpp:102
t_ionbal::RateRecomIso
double ** RateRecomIso
Definition: ionbal.h:201
hmi.h
t_iso_sp::fb
vector< freeBound > fb
Definition: iso.h:452
MAX2
#define MAX2
Definition: cddefines.h:782
ionbal
t_ionbal ionbal
Definition: ionbal.cpp:5
CollisionProxy::ColUL
realnum ColUL(const ColliderList &colls) const
Definition: collision.h:99
LIMELM
const int LIMELM
Definition: cddefines.h:258
ipELECTRON
@ ipELECTRON
Definition: collision.h:9
iso_ionize_recombine
void iso_ionize_recombine(long ipISO, long nelem)
t_conv::nPres2Ioniz
long int nPres2Ioniz
Definition: conv.h:152
iso_departure_coefficients
void iso_departure_coefficients(long ipISO, long nelem)
Definition: iso_solve.cpp:363
t_dense::IonLow
long int IonLow[LIMELM+1]
Definition: dense.h:119
t_iso_sp::st
qList st
Definition: iso.h:453
hydro
t_hydro hydro
Definition: hydrogenic.cpp:5
t_dense::IonHigh
long int IonHigh[LIMELM+1]
Definition: dense.h:120
helike_cs.h
t_dense::xIonDense
double xIonDense[LIMELM][LIMELM+1]
Definition: dense.h:125
hydrogenic.h
ipH2p
const int ipH2p
Definition: iso.h:29
t_secondaries::csupra
realnum ** csupra
Definition: secondaries.h:21
t_hmi::H2_Solomon_dissoc_rate_used_H2g
double H2_Solomon_dissoc_rate_used_H2g
Definition: hmi.h:92
t_conv::nTotalIoniz
long int nTotalIoniz
Definition: conv.h:166
ionbal.h
fp_equal
bool fp_equal(sys_float x, sys_float y, int n=3)
Definition: cddefines.h:812
iso_error_generation
void iso_error_generation(long ipISO, long nelem)
Definition: iso_error.cpp:39
ipHe3p3P
const int ipHe3p3P
Definition: iso.h:54
hmi
t_hmi hmi
Definition: hmi.cpp:5
secondaries
t_secondaries secondaries
Definition: secondaries.cpp:5
iso_update_rates
void iso_update_rates(void)
Definition: iso_solve.cpp:51
conv
t_conv conv
Definition: conv.cpp:5
iso_ctrl
t_isoCTRL iso_ctrl
Definition: iso.cpp:6
fixit
void fixit(void)
Definition: service.cpp:991
t_isoCTRL::lgContinuumLoweringEnabled
bool lgContinuumLoweringEnabled[NISO]
Definition: iso.h:358
ipHELIUM
const int ipHELIUM
Definition: cddefines.h:306
iso_collapsed_update
void iso_collapsed_update(void)
Definition: iso_solve.cpp:27
t_iso_sp::trans
TransitionProxy trans(const long ipHi, const long ipLo)
Definition: iso.h:444
taulines.h
t_hydro::H_ion_frac_photo
realnum H_ion_frac_photo
Definition: hydrogenic.h:83
t_hmi::H2_Solomon_dissoc_rate_TH85_H2g
double H2_Solomon_dissoc_rate_TH85_H2g
Definition: hmi.h:93
t_dense::lgSetIoniz
bool lgSetIoniz[LIMELM]
Definition: dense.h:149
phycon.h
atmdat
t_atmdat atmdat
Definition: atmdat.cpp:6
ipH1s
const int ipH1s
Definition: iso.h:27
t_dense::SetIoniz
realnum SetIoniz[LIMELM][LIMELM+1]
Definition: dense.h:154
iso_continuum_lower
void iso_continuum_lower(long ipISO, long nelem)
Definition: iso_continuum_lower.cpp:12
t_hydro::H_ion_frac_collis
realnum H_ion_frac_collis
Definition: hydrogenic.h:89
opacity.h
iso_sp
t_iso_sp iso_sp[NISO][LIMELM]
Definition: iso.cpp:8
AGN_He1_CS
void AGN_He1_CS(FILE *ioPun)
Definition: iso_solve.cpp:464
h2.h
fnzone
double fnzone
Definition: cddefines.cpp:15
ipHe2s3S
const int ipHe2s3S
Definition: iso.h:44
t_phycon::te
double te
Definition: phycon.h:11
NISO
const int NISO
Definition: cddefines.h:261
ipHe2p3P2
const int ipHe2p3P2
Definition: iso.h:48
t_isoCTRL::lgInd2nu_On
bool lgInd2nu_On
Definition: iso.h:355
t_rfield::lgInducProcess
bool lgInducProcess
Definition: rfield.h:252
HeCSInterp
realnum HeCSInterp(long int nelem, long int ipHi, long int ipLo, long int Collider)
Definition: helike_cs.cpp:227
DEBUG_ENTRY
#define DEBUG_ENTRY(funcname)
Definition: cddefines.h:684
ipH_LIKE
const int ipH_LIKE
Definition: iso.h:62
t_iso_sp::QuantumNumbers2Index
multi_arr< long, 3 > QuantumNumbers2Index
Definition: iso.h:461
t_trace::lgTrace
bool lgTrace
Definition: trace.h:12
SMALLFLOAT
const realnum SMALLFLOAT
Definition: cpu.h:191