cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
init_defaults_preparse.cpp
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2022 by Gary J. Ferland and
2  * others. For conditions of distribution and use see copyright notice in license.txt */
3 /*InitDefaultsPreparse initialization at start of simulation, called from cloudy
4 * before parser, sets initial values of quantities changed by parser
5 * called for each point in a grid but one time in multi-iteration sims */
6 #include "cddefines.h"
7 #include "init.h"
8 #include "phycon.h"
9 #include "radius.h"
10 #include "trace.h"
11 #include "dynamics.h"
12 #include "geometry.h"
13 #include "noexec.h"
14 #include "opacity.h"
15 #include "stopcalc.h"
16 #include "plot.h"
17 #include "rt.h"
18 #include "fudgec.h"
19 #include "abund.h"
20 #include "ionbal.h"
21 #include "hextra.h"
22 #include "wind.h"
23 #include "atmdat.h"
24 #include "pressure.h"
25 #include "thermal.h"
26 #include "continuum.h"
27 #include "save.h"
28 #include "hcmap.h"
29 #include "prt.h"
30 #include "grid.h"
31 #include "iso.h"
32 #include "rfield.h"
33 #include "flux.h"
34 #include "dense.h"
35 #include "species.h"
36 
37 /*InitDefaultsPreparse initialization at start of simulation, called from cloudy
38  * before parser, will now be called one time per sim in grid but long term
39  * goal is to call parser only one time in a grid. This would be called
40  * first to set defaults that may be changed by the parser. This routine
41  * should only set defaults for variables that change in the parser.
42  * It does not initialize variables for the start of a calculation. That
43  * is done by InitSimPostparse
44  * called one time in multi iteration sim */
46 {
47  long int i,
48  ipISO,
49  nelem;
50 
51  DEBUG_ENTRY( "InitDefaultsPreparse()" );
52 
53  /* init vars before parsing commands for each sim */
54 
55  /* option to turn off collisional ionization with "no collisional ionization" cmmnd */
56  atmdat.lgCollIonOn = true;
57 
58  // default, Chianti not on, but if on use hybrid, do not print
59  atmdat.lgChiantiOn = true;
60  atmdat.lgChiantiHybrid = true;
61  atmdat.lgChiantiPrint = false;
62  //Use gbar to fill in dBase transitions if they lack collision strengths
63  atmdat.lgGbarOn = true;
64  //Tells Cloudy to exclusively use experimental energies in Chianti.
65  atmdat.lgChiantiExp = true;
66  // Set the default number of Chianti energy levels to use for Fe for photoionization case
68  // Set the default number of Chianti energy levels to use for all other elements
70  // ChiantiLevelsSet is false until the user specifies the number of chianti levels to use.
71  atmdat.lgChiantiLevelsSet = false;
72  /* nChiantiMaxLevelsFe and nChiantiMaxLevels are defaulted to 100 and 50 respectively if
73  * the coronal command is used. See parse_coronal.cpp */
74 
75  // Set the default number of Stout energy levels to use for Fe for photoionization case
77  // Set the default number of Stout energy levels to use for all other elements
79  // StoutLevelsSet is false until the user specifies the number of stout levels to use.
80  atmdat.lgStoutLevelsSet = false;
81  /* nStoutMaxLevelsFe and nStoutMaxLevels are defaulted to 100 and 50 respectively if
82  * the coronal command is used. See parse_coronal.cpp */
83 
84  /* Stout on by default, optional printout off */
85  atmdat.lgStoutOn = true;
86  atmdat.lgStoutPrint = false;
87  atmdat.lgStoutHybrid = true;
88 
89  /* Lamda on by default, optional printout off */
90  atmdat.lgLamdaOn = true;
91  atmdat.lgLamdaPrint = false;
93  // LamdaLevelsSet is false until the user specifies the number of Lamda levels to use.
94  atmdat.lgLamdaLevelsSet = false;
95 
96  // By default use Dima (Voronov97) data for collisional ionization rate coefficients
97  // possible options are DIMA or HYBRID
99 
101  atmdat.collstrDefault = 1e-10;
102 
103 # ifdef USE_CDMS
104  atmdat.lgCalpgmOn = true;
105 # else
106  atmdat.lgCalpgmOn = false;
107 # endif
108  strcpy(atmdat.chCloudyChiantiFile, "CloudyChianti.ini");
109  strcpy(atmdat.chStoutFile, "Stout.ini");
110  strcpy(atmdat.chLamdaFile, "Lamda.ini");
111 
112  /* drChange was reset to get orion flux in h-beta correct
113  * drChange is really tau of current zone */
114  radius.drChange = 0.15f;
115 
116  radius.glbdst = 0.;
117  radius.glbrad = 0.;
118 
119  // energy conservation check is slow, turn on with set check energy every zone
121 
122  /* option to read in all input quantities and NOT execute the actual model
123  * only check on input parameters - set by calling cdNoExec */
124  noexec.lgNoExec = false;
125 
126  /* constant for the extinguish command */
130 
131  /* parameters having to do with thermal map */
132  hcmap.RangeMap[0] = 10.f;
133  hcmap.RangeMap[1] = .99e10f;
134  /* zone where map is to be done */
135  hcmap.MapZone = -1;
136  hcmap.nMapStep = 20;
137 
138  thermal.ConstGrainTemp = 0.;
141  thermal.ConstTemp = 0.;
142  thermal.lgTeHigh = false;
143  thermal.lgTeBD96 = false;
144  thermal.lgTeTLaw = false;
145  thermal.lgTLaw = false;
146  thermal.lgTeSN99 = false;
147  thermal.tlaw.clear();
148  /* try toe predict next zone's temperature in constant density models,
149  * as done in ZoneStart. Turned off with no tepred command */
150  thermal.lgPredNextTe = true;
151 
152  /* turbulent heating - set with hextra command */
153  hextra.TurbHeat = 0.;
154  /* set true with TIME option on hextra command for time dependent sims */
155  hextra.lgTurbHeatVaryTime = false;
156  /* options for for extra heating to depend on scale radius */
157  hextra.lgHextraDepth = false;
158  /* options for for extra heating to depend on density */
159  hextra.lgHextraDensity = false;
160  /* options for alpha disk model heating */
161  hextra.lgHextraSS = false;
162 
163  /* options set by cosmic ray command */
164  hextra.cryden = 0.;
167  hextra.crtemp = 0.;
168  hextra.crpowr = 0.;
170 
171  /* set with coronal equilibrium init time command */
173  dynamics.lgTracePrint = false;
174 
175  /* parameters to do with wind */
176  wind.lgWindOK = true;
177  wind.DiskRadius = 0;
178  wind.lgDisk = false;
179  wind.windv0 = 0.;
180  wind.setStatic();
181  wind.comass = 0.;
182  wind.windv = 0.;
183  wind.dvdr = 0.;
184  wind.emdot = 0.;
185  wind.AccelAver = 0.;
186  wind.acldr = 0.;
187  wind.AccelGravity = 0.;
188  wind.AccelTotalOutward = 0.;
189  wind.AccelCont = 0.;
190  wind.AccelElectron = 0.;
191  wind.AccelLine = 0.;
192  wind.AccelMax = 0.;
193  wind.fmul = 0.;
194  wind.lgVelPos = true;
195 
196  /* argument on ELEMENT LIMIT OFF XXX command, lowest abundance
197  * element to include in the calculation */
198  dense.AbundanceLimit = 0.;
199 
200  /* controls density fluctuations, when true variations are due to density changing,
201  * when false are due to abundances changing if changes are on */
202  dense.lgDenFlucOn = true;
203  dense.lgDenFlucRadius = true;
204  dense.flong = 0.;
205  dense.flcPhase = 0.;
206 
207  /* this says keep initial density constant,
208  * so pressure from iter to iter not really const */
209  dense.lgDenseInitConstant = true;
210 
211  // pressure does not vary with time by default
212  dense.lgPressureVaryTime = false;
213  // required number is timescale for time variation
215  // optional number is index for time variation
217 
218  /* extra electron density, set with eden command */
219  dense.EdenExtra = 0.;
220 
221  /* forced electron density, set with set eden command */
222  dense.EdenSet = 0.;
223 
224  /* option to set electron fraction, n_e/n_H */
225  dense.EdenFraction = 0.;
226 
227  /* individual terms for the pressure equation of state */
228  /* >>chng 05 jan 01, all three are set true at start *
229  * code default is constant density, so all this is ignored
230  * is turned to constant pressure then these flags must be adjusted so
231  * that we get the pressure we expect. with all true, all three
232  * contributors to pressure will be counted - with constant gas pressure
233  * these are turned off */
236  pressure.lgPres_ram_ON = true;
237  /* flag for constant pressure, include continuum too */
238  pressure.lgContRadPresOn = true;
239  /* constant density is the default */
240  strcpy( dense.chDenseLaw, "CDEN" );
241  dense.DLW.clear();
242  /* number on line is log of nT - option to specify initial pressure */
244  /* this is log of nT product - if not present then set zero */
246 
247  /* select certain atomic data, changed with set atomic data command
248  * this says to use Zeippen 1982 [OII] transition probabilities */
249  dense.lgAsChoose[ipOXYGEN][1] = false;
250 
251  abund.lgAbnSolar = false;
252  abund.lgAbundancesSet = false;
253 
254  /* the ipSolar array is a set of pointers used for reading
255  * in abundances with the "abundances" command
256  * the hydrogen abundance of unity is not read in */
257  abund.npSolar = LIMELM - 1;
258  for( i=0; i < abund.npSolar; i++ )
259  {
260  abund.ipSolar[i] = i + 2;
261  }
262 
263  /* option to turn off an element */
264  for( nelem=0; nelem < LIMELM; nelem++ )
265  {
266  /* set of scale factors for changing abundances with elements command */
267  abund.ScaleElement[nelem] = 1.;
268  abund.solar[nelem] = abund.SolarSave[nelem];
269 
270  // default scale factors for SET DIELECTRONIC RECOMBINATION KLUDGE SCALE
271  ionbal.DR_mean_scale[nelem] = 1.;
272  }
273 
274  abund.lgAbTaON = false;
275 
276  /* option to turn off an element */
277  for( nelem=0; nelem < LIMELM; nelem++ )
278  {
279  /* option to have abundances from table */
280  abund.lgAbunTabl[nelem] = false;
281  }
282 
283  /* threshold for faintest heating cooling to save with save heating or
284  * save cooling commands, reset with PUNCH WEAKHEATCOOL command */
285  save.WeakHeatCool = 0.05f;
286 
287  /* set of variables used to control save command */
288  save.nsave = 0;
289  save.lgPunContinuum = false;
290  save.lgDRPLst = false;
291  save.lgDRHash = true;
293  /* this is the string that will appear after each model in the save output,
294  * reset with the "set save hash" command */
295  strcpy( save.chHashString , "###########################" );
296  /* save every one continuum point, set skip save command */
297  save.ncSaveSkip = 1;
298  /* flush file after every iteration - set save flush */
299  save.lgFLUSH = false;
300  /* do not use old style, luminosity per unit inner cloud area */
301  save.lgLuminosityOld = false;
302 
303  for( i=0; i<LIMPUN; ++i )
304  {
305  save.lgHashEndIter[i] = true;
306  /* set false for time dependent calculations*/
307  save.lg_separate_iterations[i] = true;
308  save.lgSaveEveryZone[i] = false;
309  save.nSaveEveryZone[i] = -1;
310  save.emisfreq[i].set( -1. );
311  save.ipEmisFreq[i] = -1;
312  }
313 
314  /* default is to conserve energy, reset with
315  * set save line width / resolution command */
316  save.Resolution = realnum(-1.);
317  save.ResolutionAbs = realnum(-1.);
318 
319  /* punch dominant rates variables */
320  for( long i=0; i<LIMPUN; i++ )
321  save.chSpeciesDominantRates[i] = "" ;
322 
323  /* subtract continuum from line fluxes, etc */
324  save.lgSubtrCont = true;
325 
326  // Switches for save Database command
327  // Wavenumbers vs WLAng, Gf vs A, Collision Rates or not
328  save.lgSaveDataWn = false;
329  save.lgSaveDataGf = false;
330  save.lgSaveDataRates = false;
331 
332  /* default no printing of optical depths, TooFaint is .1 */
333  prt.lgPrtTau = false;
334  prt.PrtTauFnt = 0.1f;
335  prt.lgPrtShort = false;
336  prt.TooFaint = 1e-3f;
337  prt.lgFaintOn = true;
338  prt.lgFntSet = false;
339  prt.lgPrnLineCell = false;
340  prt.nPrnLineCell = -1000;
341  prt.lgPrtCitations = false;
342 
343  /* change angle of illumination
344  * this is angle away from the normal, so 0 is a normal ray, the default*/
346  geometry.size = 1.f;
347  geometry.lgSizeSet = false;
348  geometry.covaper = -1.f;
349 
350  /* if true then print main block of lines as array,
351  * set false with print lines column, will then
352  * do a single column of lines */
353  prt.lgPrtLineArray = true;
354 
355  /* when printing a column this is option to print linear rather than log */
356  prt.lgPrtLineLog = true;
357 
358  /* print ages */
359  prt.lgPrnAges = false;
360 
361  /* print column densities */
362  prt.lgPrintColumns = true;
363 
364  /* option to turn off printing of the main line block */
365  prt.lgPrintBlock = true;
366  prt.lgPrintBlockEmergent = true;
367  prt.lgPrintBlockIntrinsic = true;
368 
369  /* option to sort lines by wavelength, print sort command */
370  prt.lgSortLines = false;
371 
372  prt.lgPrtMaser = false;
373 
374  prt.lgPrtContIndices = false;
375  prt.lgPrnPump = false;
376  prt.lgPrnInwd = false;
377  prt.lgPrnColl = false;
378  prt.lgPrnHeat = false;
379  /* >>chng 00 dec 08, these determine the standard items included in "nFnu", PvH */
380  prt.lgSourceReflected = true;
381  prt.lgSourceTransmitted = false;
382  prt.lgDiffuseInward = true;
383  prt.lgDiffuseOutward = true;
384  prt.lgPrtLastIt = false;
385  prt.lgOnlyZone = false;
386  prt.lgOnlyHead = false;
387  prt.lgPrtStart = false;
388  prt.nstart = 0;
389  /* print predictions from collapsed levels of iso sequences */
390  prt.lgPrnIsoCollapsed = true;
391 
392  /* turn off printing of heating agents */
393  prt.lgPrintHeating = false;
394 
395  /* flag saying to print all ionization balance elements
396  * set with PRINT ARRAYS IONIZATION command */
397  for( nelem=ipHYDROGEN; nelem<LIMELM; ++nelem )
398  {
399  prt.lgPrtArry[nelem] = false;
400  }
401 
402  /* print line flux at earth */
403  prt.lgPrintFluxEarth = false;
404 
405  /* print line surface brightness, def sr, option arcsec */
406  prt.lgSurfaceBrightness = false;
408 
409  /* print line cumulative sets true, print integrated line intensity over
410  * time in temp dependent simulation */
411  prt.lgPrintLineCumulative = false;
412 
414 
415  prt.lgPrintHTML = false;
416 
417  prt.nzdump = -100;
418 
419  trace.lgSecIon = false;
420  trace.lgTrOvrd = true;
421  trace.lgOpacBug = false;
422  trace.nTrConvg = 0;
423  trace.lgTr8446 = false;
424  trace.lgTrLevN = false;
425  trace.lgOptcBug = false;
426  trace.lgTrace3Bod = false;
427  trace.lgOTSBug = false;
428  trace.lgESOURCE = false;
429  trace.lgTraceMole = false;
430  trace.lgHeatBug = false;
431  trace.lgHeavyBug = false;
432  trace.lgBug2nu = false;
433  trace.lgDrBug = false;
434  trace.lgWind = false;
435  trace.lgDrv_cdLine = false;
436  trace.lgDustBug = false;
437  trace.lgComBug = false;
438  trace.lgHeBug = false;
439  trace.lgCarBug = false;
440  trace.lgCalBug = false;
441  trace.lgConBug = false;
442  trace.lgNeBug = false;
443  trace.lgFeBug = false;
444  trace.lgHBug = false;
445  trace.lgTrLine = false;
446  trace.nznbug = 10000;
447  trace.npsbug = 10000;
448  trace.lgTrace = false;
449  trace.lgPointBug = false;
450  trace.lgNeonBug = false;
451  trace.lgCoolTr = false;
452  trace.lgTrDiff = false;
453  for( ipISO=ipH_LIKE; ipISO<NISO; ++ipISO )
454  trace.lgIsoTraceFull[ipISO] = false;
455 
456  /* variables used in stop ... command */
457 
458  /* various criteria for stopping model */
459  /* >>chng 04 dec 21, remove from here and init to 1e30 in zero */
460  /*StopCalc.tauend = 0.;*/
461  StopCalc.tauend = 1e30f;
462 
463  /* >>chng 05 nov 22 - NPA. Stop calculation when fraction of oxygen frozen
464  * out on grains ices gets too high - formation of ices */
465  /*StopCalc.StopDepleteFrac = 0.99f;*/
466  /* >>chng 05 dec 16, with revised ion solver logic, code should be able to
467  * converge away from situation where ices have disturbed the chemistry and
468  * net negative atomic abundances result. now we say solution not converged and
469  * soldier on
470  * this test should not be necessary */
471  StopCalc.StopDepleteFrac = 1.02f;
472 
473  StopCalc.xMass = 0.;
474  StopCalc.taunu = 0.;
475  StopCalc.iptnu = -1;
476  /* stopping AV */
477  StopCalc.AV_extended = 1e30f;
478  StopCalc.AV_point = 1e30f;
479  /* highest allowed temperature */
482 
483  /* the floor sets a limit to the temperature in the calculation -
484  * if te falls below this, we do a constant temperature cloud at
485  * this temperature */
486  StopCalc.TeFloor = 0.;
487 
488  /* stop zone calculations when Te falls below this,
489  * TEMP_STOP_DEFAULT in phycon.h and is 4000 */
491  /* stop iterations, used to stop time dependent command */
493 
494  /* ending column densities */
502 
504  StopCalc.chSpeciesColumn[0] = '\0';
506 
507  /* stopping electron density */
509 
510  /* stopping electron and molecular fractions */
511  StopCalc.StopElecFrac = -FLT_MAX;
512  StopCalc.StopHPlusFrac = -FLT_MAX;
513  /* stopping molecular fraction has opposite sign - want to stop when 2H_2/NH gt this */
514  StopCalc.StopH2MoleFrac = FLT_MAX;
515  /* this flag says that 21cm line optical depth is the stop quantity */
516  StopCalc.lgStop21cm = false;
517  /* debugging aid - stop when conv.nTotalIoniz reaches this value */
519  /* stop when absolute value of velocity falls below this */
520  StopCalc.StopVelocity = 0.;
521  /* number of stop line commands entered */
522  StopCalc.nstpl = 0;
523 
524  /* initialize some variables for the optimizer */
525  optimize.nIterOptim = 400;
526  optimize.OptGlobalErr = 0.10f;
527  optimize.nEmergent = 0;
528  optimize.chLineLabel.clear();
529  optimize.wavelength.clear();
530  optimize.errorwave.clear();
531  optimize.ipobs.clear();
532  optimize.xLineInt_Obs.clear();
533  optimize.xLineInt_error.clear();
534  optimize.chTempLab.clear();
535  optimize.ionTemp.clear();
536  optimize.temp_obs.clear();
537  optimize.temp_error.clear();
538  optimize.chTempWeight.clear();
539  optimize.chColDen_label.clear();
540  optimize.ion_ColDen.clear();
541  optimize.ColDen_Obs.clear();
542  optimize.ColDen_error.clear();
543  optimize.ContIndex.clear();
544  optimize.ContEner.clear();
545  optimize.ContNFnu.clear();
546  optimize.ContNFnuErr.clear();
547  optimize.nRangeSet = 0;
548  strcpy( optimize.chOptRtn, "PHYM" );
549 
550  /* flags says what is to be matched */
551  optimize.lgOptLum = false;
552  optimize.lgOptDiam = false;
553  optimize.lgOptimize = false;
554  optimize.lgInitialParse = false;
555 
556  /* trace flag for optimization process */
557  optimize.lgTrOpt = false;
558 
559  optimize.lgOptimFlow = false;
560  optimize.optint = 0.;
561  optimize.optier = 0.;
562 # if defined(__unix) || defined(__APPLE__)
564  grid.lgParallel = true;
565 # else
566  optimize.lgParallel = false;
567  grid.lgParallel = false;
568 # endif
569  if( optimize.lgParallel )
570  optimize.useCPU = cpu.i().nCPU();
571  else
572  optimize.useCPU = 1;
573  optimize.lgOptCont = false;
574 
575  grid.lgNegativeIncrements = false;
576  grid.lgSaveXspec = false;
578  if( grid.lgParallel )
579  grid.useCPU = cpu.i().nCPU();
580  else
581  grid.useCPU = 1;
582  grid.nCycle = 1;
583 
584  /* the fudge factors command */
585  fudgec.nfudge = 0;
586  fudgec.lgFudgeUsed = false;
587  for( i=0; i < NFUDGC; i++ )
588  fudgec.fudgea[i] = 0.;
589 
591  TauZero( DummyEmis );
592  DummyEmis.iRedisFun() = 0;
593  DummyEmis.ipFine() = -1;
594  DummyEmis.gf() = 0.;
595  DummyEmis.damp() = 0.;
596  DummyEmis.dampXvel() = 0.;
597  DummyEmis.opacity() = 0.;
598  DummyEmis.Aul() = 1e-30f;
599 
600  /* parameters dealing with printer plots */
601  for( i=0; i < NDPLOT; i++ )
602  {
603  plotCom.lgPltTrace[i] = false;
604  }
605 
606  /* this says what types of printer plots we will make */
607  for( i=0; i < NDPLOT; i++ )
608  {
609  strcpy( plotCom.chPType[i], "NONE" );
610  }
611  plotCom.lgPlotON = false;
612 
613  /* following were block data logic */
614  rt.lgStarkON = true;
615 
616  /* by default use Federman form of shielding function */
618 
619  /* parameters set with Case A and Case B commands */
620  /* this is flag for turning on case b */
621  opac.lgCaseB = false;
622 
623  /* this is separate flag for turning off collisions from n=2 */
624  opac.lgCaseB_HummerStorey = false;
625 
626  /* this is separate flag for turning off excited state photoionization */
627  opac.lgCaseB_no_photo = false;
628  /* another case b option, turn off background opacities, no Pdest */
629  opac.lgCaseB_no_pdest = false;
630 
631  /* smallest allowed line and Lya optical depths, reset with
632  * Case B command */
633  opac.tlamin = 0.f;
634 
635  /* taumin command minimum optical depths for lines default 1e-20 */
636  opac.taumin = 0.f;
637 
638  opac.eeFreeFreeTemp = -1.;
639 
640  /* set false with no induced processes */
641  rfield.lgInducProcess = true;
642 
643  /* this flag says that CMB has been set */
644  rfield.lgCMB_set = false;
645 
646  rfield.lgComptonOn = true;
647 
648  for( i=0; i < LIMSPC; i++ )
649  {
650  /* this is set true if particular continuum source can vary with time
651  * set true if TIME appears on intensity / luminosity command line */
652  rfield.lgTimeVary[i] = false;
653  /* most continua enter as a beam rather than isotropic */
654  rfield.lgBeamed[i] = true;
655  // default is radiation from the "illuminated" face
657  // optical depth = normal optical depth * this scale factor,
658  // is 1 / cos theta
660  /* default energy range is H-ionizing radiation */
661  rfield.range[i][0] = HIONPOT;
662  rfield.range[i][1] = rfield.egamry();
663  rfield.RSFCheck[i] = 0.;
664  rfield.tNu[i].clear();
665  rfield.tslop[i].clear();
666  rfield.tFluxLog[i].clear();
667  rfield.TableRadius[i] = -1.;
668  rfield.lgSphericalDilution[i] = false;
669  rfield.ncont[i] = 0;
670  }
671 
672  /* line overlap opacity, turn off with no fine opacity command */
673  rfield.lgOpacityFine = true;
674 
675  pseudoContDef.wlLo = 1000;
676  pseudoContDef.wlHi = 7000.;
677  pseudoContDef.nBins = 1000;
678 
679  /* this is the faintest the high-energy tail of the continuum be */
680  rfield.FluxFaint = 0.; // 1e-10;
681 
682  /* >>chng 01 jul 26, moved next statement from below loop to avoid bug in gcc 2.95.3, PvH */
683  /* default diffuse fields is outward only */
684  strcpy( rfield.chDffTrns, "OU2" );
685  rfield.lgOutOnly = true;
686 
687  /* flags for whether continuum is defined over all energies */
688  rfield.lgMMok = true;
689  rfield.lgHPhtOK = true;
690  rfield.lgXRayOK = true;
691  rfield.lgGamrOK = true;
692 
693  /* set logical flags saying whether to include element in AGN tables */
694  /* first set all false, since most not included */
695  for( long int i=0; i < LIMELM; i++ )
696  {
697  abund.lgAGN[i] = false;
698  }
699  abund.lgAGN[ipHYDROGEN] = true;
700  abund.lgAGN[ipHELIUM] = true;
701  abund.lgAGN[ipCARBON] = true;
702  abund.lgAGN[ipNITROGEN] = true;
703  abund.lgAGN[ipOXYGEN] = true;
704  abund.lgAGN[ipNEON] = true;
705  abund.lgAGN[ipMAGNESIUM] = true;
706  abund.lgAGN[ipSILICON] = true;
707  abund.lgAGN[ipSULPHUR] = true;
708  abund.lgAGN[ipARGON] = true;
709  abund.lgAGN[ipIRON] = true;
710 
711 
712  for( long int i=0; i < LIMELM; i++ )
713  {
714  abund.IsoAbn[i].init();
715  }
716 
717  return;
718 }
bool lgAsChoose[LIMELM][LIMELM]
Definition: dense.h:194
realnum col_h2
Definition: stopcalc.h:74
bool lgAGN[LIMELM]
Definition: abund.h:198
bool lgStoutLevelsSet
Definition: atmdat.h:415
realnum EdenFraction
Definition: dense.h:220
realnum StopElecDensity
Definition: stopcalc.h:92
long int & ipFine() const
Definition: emission.h:460
t_fudgec fudgec
Definition: fudgec.cpp:5
bool lgContRadPresOn
Definition: pressure.h:65
realnum optint
Definition: optimize.h:253
char chLamdaFile[FILENAME_PATH_LENGTH]
Definition: atmdat.h:395
realnum StopDepleteFrac
Definition: stopcalc.h:61
realnum colnut
Definition: stopcalc.h:69
long int nstpl
Definition: stopcalc.h:109
t_atmdat atmdat
Definition: atmdat.cpp:6
realnum dvdr
Definition: wind.h:21
bool lgBeamed[LIMSPC]
Definition: rfield.h:294
bool lgPrtStart
Definition: prt.h:227
bool lgPunContinuum
Definition: save.h:369
realnum AccelLine
Definition: wind.h:61
t_thermal thermal
Definition: thermal.cpp:6
bool lgPrtTau
Definition: prt.h:171
int & iRedisFun() const
Definition: emission.h:450
long int iptnu
Definition: stopcalc.h:29
bool lgGamrOK
Definition: rfield.h:442
realnum & opacity() const
Definition: emission.h:650
const int ipMAGNESIUM
Definition: cddefines.h:360
bool lgCaseB_no_photo
Definition: opacity.h:182
bool lgStoutHybrid
Definition: atmdat.h:404
realnum StopElecFrac
Definition: stopcalc.h:48
bool lgDustBug
Definition: trace.h:76
realnum size
Definition: geometry.h:77
bool lgChiantiLevelsSet
Definition: atmdat.h:388
realnum flcPhase
Definition: dense.h:265
char chStoutFile[FILENAME_PATH_LENGTH]
Definition: atmdat.h:408
long int nRangeSet
Definition: optimize.h:204
bool lgHeBug
Definition: trace.h:79
bool lgHeavyBug
Definition: trace.h:21
bool lgWindOK
Definition: wind.h:42
t_opac opac
Definition: opacity.cpp:5
long int npsbug
Definition: trace.h:18
realnum ResolutionAbs
Definition: save.h:496
double PressureInitialSpecified
Definition: pressure.h:58
vector< realnum > ColDen_Obs
Definition: optimize.h:214
bool lgPrtMaser
Definition: prt.h:168
bool lgDRHash
Definition: save.h:465
bool lgDrv_cdLine
Definition: trace.h:115
const int ipARGON
Definition: cddefines.h:366
bool lgSphericalDilution[LIMSPC]
Definition: rfield.h:321
bool lgStop21cm
Definition: stopcalc.h:120
vector< realnum > xLineInt_error
Definition: optimize.h:226
bool lgStoutOn
Definition: atmdat.h:402
bool lgPrnHeat
Definition: prt.h:188
bool lgDisk
Definition: wind.h:74
t_cpu_i & i()
Definition: cpu.h:419
bool lgPrintLineCumulative
Definition: prt.h:268
const int NISO
Definition: cddefines.h:311
realnum AV_extended
Definition: stopcalc.h:89
long int MapZone
Definition: hcmap.h:20
bool lgKeepMainOutputSeparate
Definition: grid.h:53
long nBins
Definition: species.h:77
bool lgIsoTraceFull[NISO]
Definition: trace.h:85
bool lgTraceMole
Definition: trace.h:55
bool lgCheckEnergyEveryZone
Definition: continuum.h:102
vector< Flux > ContNFnu
Definition: optimize.h:244
char chDffTrns[4]
Definition: rfield.h:217
DepthTable tlaw
Definition: thermal.h:95
bool lgFudgeUsed
Definition: fudgec.h:19
realnum windv0
Definition: wind.h:11
void set(double energy)
Definition: energy.h:26
bool lgSecIon
Definition: trace.h:124
const int ipOXYGEN
Definition: cddefines.h:356
bool lgDenFlucRadius
Definition: dense.h:259
bool lgComBug
Definition: trace.h:37
bool lgTracePrint
Definition: dynamics.h:183
realnum crtemp
Definition: hextra.h:24
bool lgTrOpt
Definition: optimize.h:256
long nStoutMaxLevelsFe
Definition: atmdat.h:410
t_StopCalc StopCalc
Definition: stopcalc.cpp:7
long int nPrnLineCell
Definition: prt.h:256
t_hextra hextra
Definition: hextra.cpp:5
long nLamdaMaxLevels
Definition: atmdat.h:397
bool lgOpacityFine
Definition: rfield.h:404
realnum drChange
Definition: radius.h:189
bool lgDrBug
Definition: trace.h:61
t_phycon phycon
Definition: phycon.cpp:6
double TableRadius[LIMSPC]
Definition: rfield.h:319
realnum col_monoxco
Definition: stopcalc.h:86
bool lg_CR_B_equipartition
Definition: hextra.h:29
char chHashString[INPUT_LINE_LENGTH]
Definition: save.h:416
vector< string > chLineLabel
Definition: optimize.h:219
realnum AccelAver
Definition: wind.h:46
double RSFCheck[LIMSPC]
Definition: rfield.h:327
bool lgDiffuseInward
Definition: prt.h:209
vector< Energy > tNu[LIMSPC]
Definition: rfield.h:314
realnum wlHi
Definition: species.h:76
bool lgTeHigh
Definition: thermal.h:72
CollIonRC CIRCData
Definition: atmdat.h:443
vector< realnum > tFluxLog[LIMSPC]
Definition: rfield.h:317
bool lgPrintLineAirWavelengths
Definition: prt.h:274
bool lgChiantiPrint
Definition: atmdat.h:378
bool lgCollIonOn
Definition: atmdat.h:349
#define NFUDGC
Definition: fudgec.h:9
t_noexec noexec
Definition: noexec.cpp:4
bool lgTemperatureConstant
Definition: thermal.h:44
bool lgFntSet
Definition: prt.h:249
realnum AccelElectron
Definition: wind.h:58
bool lgFLUSH
Definition: save.h:419
long ncont[LIMSPC]
Definition: rfield.h:323
bool lgGbarOn
Definition: atmdat.h:421
vector< realnum > tslop[LIMSPC]
Definition: rfield.h:315
t_pseudo_cont pseudoContDef
bool lgPrtCitations
Definition: prt.h:294
t_dynamics dynamics
Definition: dynamics.cpp:42
realnum SolarSave[LIMELM]
Definition: abund.h:200
realnum colpls
Definition: stopcalc.h:69
bool lgVelPos
Definition: wind.h:71
bool lgNoExec
Definition: noexec.h:14
bool lgWind
Definition: trace.h:106
const int ipSULPHUR
Definition: cddefines.h:364
bool lgInitialParse
Definition: optimize.h:182
bool lgPointBug
Definition: trace.h:34
bool lgFeBug
Definition: trace.h:46
long int nsave
Definition: save.h:318
t_dense dense
Definition: global.cpp:15
bool lgNeBug
Definition: trace.h:112
bool lgTimeVary[LIMSPC]
Definition: rfield.h:290
double range[LIMSPC][2]
Definition: rfield.h:331
bool lgPredNextTe
Definition: thermal.h:40
const int LIMSPC
Definition: rfield.h:21
bool lgSourceReflected
Definition: prt.h:207
realnum AccelMax
Definition: wind.h:68
realnum glbdst
Definition: radius.h:134
vector< realnum > temp_error
Definition: optimize.h:232
long int nMapStep
Definition: hcmap.h:26
bool lgPrintBlockIntrinsic
Definition: prt.h:134
bool lgCaseB_no_pdest
Definition: opacity.h:185
Wind wind
Definition: wind.cpp:5
long int nIterOptim
Definition: optimize.h:209
t_trace trace
Definition: trace.cpp:5
bool lgAbnSolar
Definition: abund.h:202
t_ionbal ionbal
Definition: ionbal.cpp:8
realnum ExtinguishLeakage
Definition: rfield.h:81
bool lgPrtArry[LIMELM]
Definition: prt.h:236
t_abund abund
Definition: abund.cpp:5
realnum AccelGravity
Definition: wind.h:49
bool lg_separate_iterations[LIMPUN]
Definition: save.h:334
t_geometry geometry
Definition: geometry.cpp:5
realnum AccelCont
Definition: wind.h:55
t_isotope IsoAbn[LIMELM]
Definition: abund.h:213
bool lgOutOnly
Definition: rfield.h:222
const double TEMP_STOP_DEFAULT
Definition: phycon.h:119
bool lgPrnIsoCollapsed
Definition: prt.h:195
bool lgChiantiHybrid
Definition: atmdat.h:376
bool lgPrintHeating
Definition: prt.h:233
const int ipIRON
Definition: cddefines.h:374
realnum WeakHeatCool
Definition: save.h:488
realnum & gf() const
Definition: emission.h:570
realnum TooFaint
Definition: prt.h:244
static const long LIMPUN
Definition: save.h:13
bool lgConBug
Definition: trace.h:97
realnum HColStop
Definition: stopcalc.h:69
bool lgPrnLineCell
Definition: prt.h:253
bool lgLamdaPrint
Definition: atmdat.h:393
bool lgESOURCE
Definition: trace.h:24
bool lgSaveXspec
Definition: grid.h:38
realnum StopHPlusFrac
Definition: stopcalc.h:56
bool lgHPhtOK
Definition: rfield.h:442
bool lgDiffuseOutward
Definition: prt.h:210
bool lgPrtLastIt
Definition: prt.h:216
bool lgChiantiOn
Definition: atmdat.h:374
bool lgTrace
Definition: trace.h:12
bool lgPrtContIndices
Definition: prt.h:199
realnum & dampXvel() const
Definition: emission.h:610
void setStatic(void)
Definition: wind.h:88
bool lgCMB_set
Definition: rfield.h:106
bool lgCalpgmOn
Definition: atmdat.h:419
bool lgStopSpeciesColumn
Definition: stopcalc.h:132
bool lgPressureVaryTime
Definition: dense.h:183
double PressureVaryTimeIndex
Definition: dense.h:188
realnum crpowr
Definition: hextra.h:24
t_continuum continuum
Definition: continuum.cpp:6
EmissionProxy DummyEmis
Definition: taulines.cpp:122
char chCloudyChiantiFile[FILENAME_PATH_LENGTH]
Definition: atmdat.h:382
long int ncSaveSkip
Definition: save.h:484
bool lgParallel
Definition: optimize.h:263
realnum TurbHeat
Definition: hextra.h:42
const long nDefaultMolLevels
Definition: atmdat.h:368
bool lgSurfaceBrightness
Definition: prt.h:179
t_plotCom plotCom
Definition: plot.cpp:20
double cr_energydensity
Definition: hextra.h:32
bool lgOnlyZone
Definition: prt.h:222
bool lgPrintBlockEmergent
Definition: prt.h:138
const double TEMP_LIMIT_HIGH
Definition: phycon.h:123
realnum wlLo
Definition: species.h:75
double DR_mean_scale[LIMELM]
Definition: ionbal.h:218
t_pressure pressure
Definition: pressure.cpp:9
t_rfield rfield
Definition: rfield.cpp:9
const long nDefaultPhotoLevels
Definition: atmdat.h:362
double collstrDefault
Definition: atmdat.h:426
long nStoutMaxLevels
Definition: atmdat.h:413
vector< realnum > ColDen_error
Definition: optimize.h:215
realnum xMass
Definition: stopcalc.h:77
bool lgCaseB
Definition: opacity.h:174
float realnum
Definition: cddefines.h:124
long int nstart
Definition: prt.h:230
bool lgCarBug
Definition: trace.h:94
realnum AccelTotalOutward
Definition: wind.h:52
bool lgLuminosityOld
Definition: save.h:423
bool lgTeTLaw
Definition: thermal.h:96
bool lgOnlyHead
Definition: prt.h:224
realnum col_species
Definition: stopcalc.h:134
Illuminate::IlluminationType Illumination[LIMSPC]
Definition: rfield.h:300
const realnum COLUMN_INIT
Definition: stopcalc.h:14
bool lgSaveDataRates
Definition: save.h:506
realnum AV_point
Definition: stopcalc.h:89
long int nSaveEveryZone[LIMPUN]
Definition: save.h:380
bool lgPres_magnetic_ON
Definition: pressure.h:91
string chSpeciesColumn
Definition: stopcalc.h:133
int nEmergent
Definition: optimize.h:218
realnum flong
Definition: dense.h:262
bool lgFaintOn
Definition: prt.h:245
vector< realnum > xLineInt_Obs
Definition: optimize.h:225
bool lgSurfaceBrightness_SR
Definition: prt.h:179
void clear()
Definition: depth_table.h:24
double FluxFaint
Definition: rfield.h:56
bool lgTurbHeatVaryTime
Definition: hextra.h:76
const int ipNEON
Definition: cddefines.h:358
realnum DirectionalCosin
Definition: geometry.h:25
DepthTable DLW
Definition: dense.h:198
bool lgDRPLst
Definition: save.h:465
bool lgTeBD96
Definition: thermal.h:84
realnum StopH2MoleFrac
Definition: stopcalc.h:52
vector< string > chTempLab
Definition: optimize.h:229
realnum col_H0_ov_Tspin
Definition: stopcalc.h:83
bool lgCalBug
Definition: trace.h:91
double eeFreeFreeTemp
Definition: opacity.h:130
bool lgTrLine
Definition: trace.h:43
long nChiantiMaxLevels
Definition: atmdat.h:386
bool lgPltTrace[NDPLOT]
Definition: plot.h:30
bool lgCoolTr
Definition: trace.h:109
bool lgPrtShort
Definition: prt.h:219
bool lgXRayOK
Definition: rfield.h:442
t_optimize optimize
Definition: optimize.cpp:6
int nTrConvg
Definition: trace.h:27
t_grid grid
Definition: grid.cpp:5
realnum cryden_ov_background
Definition: hextra.h:35
long int nTotalIonizStop
Definition: stopcalc.h:127
realnum cryden
Definition: hextra.h:24
t_radius radius
Definition: radius.cpp:5
realnum TempLoStopZone
Definition: stopcalc.h:42
bool lgNeonBug
Definition: trace.h:40
t_prt prt
Definition: prt.cpp:14
bool lgTrOvrd
Definition: trace.h:121
bool lgPrtLineLog
Definition: prt.h:264
long int ipSolar[LIMELM]
Definition: abund.h:238
long int nfudge
Definition: fudgec.h:17
bool lgHextraSS
Definition: hextra.h:64
bool lgPrintBlock
Definition: prt.h:130
realnum glbrad
Definition: radius.h:134
realnum AbundanceLimit
Definition: dense.h:151
realnum optier
Definition: optimize.h:254
realnum TempLoStopIteration
Definition: stopcalc.h:45
realnum tlamin
Definition: opacity.h:171
vector< realnum > wavelength
Definition: optimize.h:221
bool lgTemperatureConstantCommandParsed
Definition: thermal.h:50
const int ipSILICON
Definition: cddefines.h:362
realnum PrtTauFnt
Definition: prt.h:182
bool lgSaveEveryZone[LIMPUN]
Definition: save.h:379
char chOptRtn[5]
Definition: optimize.h:268
bool lgSortLines
Definition: prt.h:142
bool lgNegativeIncrements
Definition: grid.h:37
realnum RangeMap[2]
Definition: hcmap.h:23
realnum covaper
Definition: geometry.h:54
realnum taunu
Definition: stopcalc.h:26
void EmLineZero(EmissionList::reference t)
Definition: emission.cpp:95
bool lgStarkON
Definition: rt.h:211
char chDenseLaw[5]
Definition: dense.h:176
bool lgHeatBug
Definition: trace.h:58
bool lgPrintHTML
Definition: prt.h:277
double PressureVaryTimeTimescale
Definition: dense.h:186
vector< long > ContIndex
Definition: optimize.h:242
const int ipNITROGEN
Definition: cddefines.h:355
const long nDefaultPhotoLevelsFe
Definition: atmdat.h:360
long int nznbug
Definition: trace.h:15
realnum ConstTemp
Definition: thermal.h:56
bool lgSaveDataGf
Definition: save.h:506
bool lgHashEndIter[LIMPUN]
Definition: save.h:412
bool lgHBug
Definition: trace.h:82
const int ipH_LIKE
Definition: iso.h:64
bool lgAbTaON
Definition: abund.h:218
realnum emdot
Definition: wind.h:39
const int LIMELM
Definition: cddefines.h:308
vector< chi2_type > ContNFnuErr
Definition: optimize.h:245
bool lgPressureInitialSpecified
Definition: pressure.h:56
bool lgHextraDensity
Definition: hextra.h:57
bool lgOptimize
Definition: optimize.h:257
int nLineContShield
Definition: rt.h:190
bool lgTLaw
Definition: thermal.h:80
#define DEBUG_ENTRY(funcname)
Definition: cddefines.h:723
vector< long > ionTemp
Definition: optimize.h:230
const int ipHELIUM
Definition: cddefines.h:350
long useCPU
Definition: optimize.h:265
realnum ExtinguishColumnDensity
Definition: rfield.h:81
vector< long > ipobs
Definition: optimize.h:224
long int npSolar
Definition: abund.h:238
char chPType[NDPLOT][5]
Definition: plot.h:18
bool lgPrnAges
Definition: prt.h:164
bool lgOpacBug
Definition: trace.h:73
bool lgMMok
Definition: rfield.h:442
bool lgTrDiff
Definition: trace.h:67
realnum ConstGrainTemp
Definition: thermal.h:59
bool lgTeSN99
Definition: thermal.h:92
double egamry() const
Definition: mesh.h:97
bool lgPrnPump
Definition: prt.h:188
void init()
Definition: abund.h:61
long ipEmisFreq[LIMPUN]
Definition: save.h:502
bool lgBug2nu
Definition: trace.h:103
bool lgDenseInitConstant
Definition: dense.h:180
vector< Energy > ContEner
Definition: optimize.h:243
long int nzdump
Definition: prt.h:291
unsigned int useCPU
Definition: grid.h:50
vector< realnum > temp_obs
Definition: optimize.h:231
realnum tauend
Definition: stopcalc.h:23
bool lgPrintFluxEarth
Definition: prt.h:175
realnum StopVelocity
Definition: stopcalc.h:65
bool lgPrintColumns
Definition: prt.h:157
bool lgOptCont
Definition: optimize.h:264
void TauZero(EmissionList::reference t)
Definition: emission.cpp:75
double TeFloor
Definition: stopcalc.h:33
bool lgInducProcess
Definition: rfield.h:233
bool lgStoutPrint
Definition: atmdat.h:406
realnum & damp() const
Definition: emission.h:620
vector< string > chColDen_label
Definition: optimize.h:212
string chSpeciesDominantRates[LIMPUN]
Definition: save.h:498
bool lgOptDiam
Definition: optimize.h:236
long nCycle
Definition: grid.h:64
bool lgSourceTransmitted
Definition: prt.h:208
realnum OpticalDepthScaleFactor[LIMSPC]
Definition: rfield.h:298
bool lgOTSBug
Definition: trace.h:100
bool lgDenFlucOn
Definition: dense.h:255
const int ipCARBON
Definition: cddefines.h:354
bool lgPres_ram_ON
Definition: pressure.h:92
void InitDefaultsPreparse(void)
long nCPU() const
Definition: cpu.h:388
t_hcmap hcmap
Definition: hcmap.cpp:23
bool lgOptLum
Definition: optimize.h:259
realnum EdenSet
Definition: dense.h:214
bool lgSizeSet
Definition: geometry.h:80
bool lgOptcBug
Definition: trace.h:49
double DiskRadius
Definition: wind.h:78
bool lgPlotON
Definition: plot.h:21
vector< string > chTempWeight
Definition: optimize.h:233
bool lgTrace3Bod
Definition: trace.h:52
realnum OptGlobalErr
Definition: optimize.h:247
bool lgTraceConvergeBaseHash
Definition: save.h:470
bool lgLamdaOn
Definition: atmdat.h:391
static t_cpu cpu
Definition: cpu.h:427
bool lgSubtrCont
Definition: save.h:312
realnum ScaleElement[LIMELM]
Definition: abund.h:242
bool lgSaveDataWn
Definition: save.h:506
t_save save
Definition: save.cpp:5
long nChiantiMaxLevelsFe
Definition: atmdat.h:384
bool lgPrnColl
Definition: prt.h:188
realnum Resolution
Definition: save.h:493
const int ipHYDROGEN
Definition: cddefines.h:349
bool lgOptimFlow
Definition: optimize.h:252
bool lgAbundancesSet
Definition: abund.h:207
bool lgChiantiExp
Definition: atmdat.h:380
Energy emisfreq[LIMPUN]
Definition: save.h:501
vector< long > ion_ColDen
Definition: optimize.h:213
realnum & Aul() const
Definition: emission.h:690
realnum acldr
Definition: wind.h:46
realnum TempHiStopZone
Definition: stopcalc.h:36
bool lgMPISingleRankMode() const
Definition: cpu.h:393
bool lgAbunTabl[LIMELM]
Definition: abund.h:218
bool lgTrLevN
Definition: trace.h:31
bool lg_coronal_time_init
Definition: dynamics.h:99
bool lgPres_radiation_ON
Definition: pressure.h:90
realnum EdenExtra
Definition: dense.h:217
realnum col_h2_nut
Definition: stopcalc.h:80
bool lgCaseB_HummerStorey
Definition: opacity.h:178
realnum windv
Definition: wind.h:18
realnum comass
Definition: wind.h:14
realnum taumin
Definition: opacity.h:167
bool lgPrnInwd
Definition: prt.h:188
bool lgLamdaLevelsSet
Definition: atmdat.h:399
bool lgParallel
Definition: grid.h:47
bool lgTr8446
Definition: trace.h:70
bool lgComptonOn
Definition: rfield.h:279
realnum TempHiStopIteration
Definition: stopcalc.h:38
realnum ExtinguishLowEnergyLimit
Definition: rfield.h:81
realnum fmul
Definition: wind.h:65
vector< realnum > errorwave
Definition: optimize.h:223
#define NDPLOT
Definition: plot.h:13
bool lgPrtLineArray
Definition: prt.h:260
realnum fudgea[NFUDGC]
Definition: fudgec.h:15
bool lgHextraDepth
Definition: hextra.h:49
t_rt rt
Definition: rt.cpp:5
realnum solar[LIMELM]
Definition: abund.h:210