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-2017 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  prt.lgPrintTime = true;
374 
375  prt.lgPrtContIndices = false;
376  prt.lgPrnPump = false;
377  prt.lgPrnInwd = false;
378  prt.lgPrnColl = false;
379  prt.lgPrnHeat = false;
380  /* >>chng 00 dec 08, these determine the standard items included in "nFnu", PvH */
381  prt.lgSourceReflected = true;
382  prt.lgSourceTransmitted = false;
383  prt.lgDiffuseInward = true;
384  prt.lgDiffuseOutward = true;
385  prt.lgPrtLastIt = false;
386  prt.lgOnlyZone = false;
387  prt.lgOnlyHead = false;
388  prt.lgPrtStart = false;
389  prt.nstart = 0;
390  /* print predictions from collapsed levels of iso sequences */
391  prt.lgPrnIsoCollapsed = true;
392 
393  /* turn off printing of heating agents */
394  prt.lgPrintHeating = false;
395 
396  /* flag saying to print all ionization balance elements
397  * set with PRINT ARRAYS IONIZATION command */
398  for( nelem=ipHYDROGEN; nelem<LIMELM; ++nelem )
399  {
400  prt.lgPrtArry[nelem] = false;
401  }
402 
403  /* print line flux at earth */
404  prt.lgPrintFluxEarth = false;
405 
406  /* print line surface brightness, def sr, option arcsec */
407  prt.lgSurfaceBrightness = false;
409 
410  /* print line cumulative sets true, print integrated line intensity over
411  * time in temp dependent simulation */
412  prt.lgPrintLineCumulative = false;
413 
415 
416  prt.lgPrintHTML = false;
417 
418  prt.nzdump = -100;
419 
420  trace.lgSecIon = false;
421  trace.lgTrOvrd = true;
422  trace.lgOpacBug = false;
423  trace.nTrConvg = 0;
424  trace.lgTr8446 = false;
425  trace.lgTrLevN = false;
426  trace.lgOptcBug = false;
427  trace.lgTrace3Bod = false;
428  trace.lgOTSBug = false;
429  trace.lgESOURCE = false;
430  trace.lgTraceMole = false;
431  trace.lgHeatBug = false;
432  trace.lgHeavyBug = false;
433  trace.lgBug2nu = false;
434  trace.lgDrBug = false;
435  trace.lgWind = false;
436  trace.lgDrv_cdLine = false;
437  trace.lgDustBug = false;
438  trace.lgComBug = false;
439  trace.lgHeBug = false;
440  trace.lgCarBug = false;
441  trace.lgCalBug = false;
442  trace.lgConBug = false;
443  trace.lgNeBug = false;
444  trace.lgFeBug = false;
445  trace.lgHBug = false;
446  trace.lgTrLine = false;
447  trace.nznbug = 10000;
448  trace.npsbug = 10000;
449  trace.lgTrace = false;
450  trace.lgPointBug = false;
451  trace.lgNeonBug = false;
452  trace.lgCoolTr = false;
453  trace.lgTrDiff = false;
454  for( ipISO=ipH_LIKE; ipISO<NISO; ++ipISO )
455  trace.lgIsoTraceFull[ipISO] = false;
456 
457  /* variables used in stop ... command */
458 
459  /* various criteria for stopping model */
460  /* >>chng 04 dec 21, remove from here and init to 1e30 in zero */
461  /*StopCalc.tauend = 0.;*/
462  StopCalc.tauend = 1e30f;
463 
464  /* >>chng 05 nov 22 - NPA. Stop calculation when fraction of oxygen frozen
465  * out on grains ices gets too high - formation of ices */
466  /*StopCalc.StopDepleteFrac = 0.99f;*/
467  /* >>chng 05 dec 16, with revised ion solver logic, code should be able to
468  * converge away from situation where ices have disturbed the chemistry and
469  * net negative atomic abundances result. now we say solution not converged and
470  * soldier on
471  * this test should not be necessary */
472  StopCalc.StopDepleteFrac = 1.02f;
473 
474  StopCalc.xMass = 0.;
475  StopCalc.taunu = 0.;
476  StopCalc.iptnu = -1;
477  /* stopping AV */
478  StopCalc.AV_extended = 1e30f;
479  StopCalc.AV_point = 1e30f;
480  /* highest allowed temperature */
483 
484  /* the floor sets a limit to the temperature in the calculation -
485  * if te falls below this, we do a constant temperature cloud at
486  * this temperature */
487  StopCalc.TeFloor = 0.;
488 
489  /* stop zone calculations when Te falls below this,
490  * TEMP_STOP_DEFAULT in phycon.h and is 4000 */
492  /* stop iterations, used to stop time dependent command */
494 
495  /* ending column densities */
503 
505  StopCalc.chSpeciesColumn[0] = '\0';
507 
508  /* stopping electron density */
510 
511  /* stopping electron and molecular fractions */
512  StopCalc.StopElecFrac = -FLT_MAX;
513  StopCalc.StopHPlusFrac = -FLT_MAX;
514  /* stopping molecular fraction has opposite sign - want to stop when 2H_2/NH gt this */
515  StopCalc.StopH2MoleFrac = FLT_MAX;
516  /* this flag says that 21cm line optical depth is the stop quantity */
517  StopCalc.lgStop21cm = false;
518  /* debugging aid - stop when conv.nTotalIoniz reaches this value */
520  /* stop when absolute value of velocity falls below this */
521  StopCalc.StopVelocity = 0.;
522  /* number of stop line commands entered */
523  StopCalc.nstpl = 0;
524 
525  /* initialize some variables for the optimizer */
526  optimize.nIterOptim = 400;
527  optimize.OptGlobalErr = 0.10f;
528  optimize.nEmergent = 0;
529  optimize.chLineLabel.clear();
530  optimize.wavelength.clear();
531  optimize.errorwave.clear();
532  optimize.ipobs.clear();
533  optimize.xLineInt_Obs.clear();
534  optimize.xLineInt_error.clear();
535  optimize.chTempLab.clear();
536  optimize.ionTemp.clear();
537  optimize.temp_obs.clear();
538  optimize.temp_error.clear();
539  optimize.chTempWeight.clear();
540  optimize.chColDen_label.clear();
541  optimize.ion_ColDen.clear();
542  optimize.ColDen_Obs.clear();
543  optimize.ColDen_error.clear();
544  optimize.ContIndex.clear();
545  optimize.ContEner.clear();
546  optimize.ContNFnu.clear();
547  optimize.ContNFnuErr.clear();
548  optimize.nRangeSet = 0;
549  strcpy( optimize.chOptRtn, "PHYM" );
550 
551  /* flags says what is to be matched */
552  optimize.lgOptLum = false;
553  optimize.lgOptDiam = false;
554  optimize.lgOptimize = false;
555  optimize.lgInitialParse = false;
556 
557  /* trace flag for optimization process */
558  optimize.lgTrOpt = false;
559 
560  optimize.lgOptimFlow = false;
561  optimize.optint = 0.;
562  optimize.optier = 0.;
563 # if defined(__unix) || defined(__APPLE__)
565  grid.lgParallel = true;
566 # else
567  optimize.lgParallel = false;
568  grid.lgParallel = false;
569 # endif
570  if( optimize.lgParallel )
571  optimize.useCPU = cpu.i().nCPU();
572  else
573  optimize.useCPU = 1;
574  optimize.lgOptCont = false;
575 
576  grid.lgNegativeIncrements = false;
577  grid.lgSaveXspec = false;
579  if( grid.lgParallel )
580  grid.useCPU = cpu.i().nCPU();
581  else
582  grid.useCPU = 1;
583  grid.nCycle = 1;
584 
585  /* the fudge factors command */
586  fudgec.nfudge = 0;
587  fudgec.lgFudgeUsed = false;
588  for( i=0; i < NFUDGC; i++ )
589  fudgec.fudgea[i] = 0.;
590 
592  TauZero( DummyEmis );
593  DummyEmis.iRedisFun() = 0;
594  DummyEmis.ipFine() = -1;
595  DummyEmis.gf() = 0.;
596  DummyEmis.damp() = 0.;
597  DummyEmis.dampXvel() = 0.;
598  DummyEmis.opacity() = 0.;
599  DummyEmis.Aul() = 1e-30f;
600 
601  /* parameters dealing with printer plots */
602  for( i=0; i < NDPLOT; i++ )
603  {
604  plotCom.lgPltTrace[i] = false;
605  }
606 
607  /* this says what types of printer plots we will make */
608  for( i=0; i < NDPLOT; i++ )
609  {
610  strcpy( plotCom.chPType[i], "NONE" );
611  }
612  plotCom.lgPlotON = false;
613 
614  /* following were block data logic */
615  rt.lgStarkON = true;
616 
617  /* by default use Federman form of shielding function */
619 
620  /* parameters set with Case A and Case B commands */
621  /* this is flag for turning on case b */
622  opac.lgCaseB = false;
623 
624  /* this is separate flag for turning off collisions from n=2 */
625  opac.lgCaseB_HummerStorey = false;
626 
627  /* this is separate flag for turning off excited state photoionization */
628  opac.lgCaseB_no_photo = false;
629  /* another case b option, turn off background opacities, no Pdest */
630  opac.lgCaseB_no_pdest = false;
631 
632  /* smallest allowed line and Lya optical depths, reset with
633  * Case B command */
634  opac.tlamin = 0.f;
635 
636  /* taumin command minimum optical depths for lines default 1e-20 */
637  opac.taumin = 0.f;
638 
639  opac.eeFreeFreeTemp = -1.;
640 
641  /* set false with no induced processes */
642  rfield.lgInducProcess = true;
643 
644  /* this flag says that CMB has been set */
645  rfield.lgCMB_set = false;
646 
647  rfield.lgComptonOn = true;
648 
649  for( i=0; i < LIMSPC; i++ )
650  {
651  /* this is set true if particular continuum source can vary with time
652  * set true if TIME appears on intensity / luminosity command line */
653  rfield.lgTimeVary[i] = false;
654  /* most continua enter as a beam rather than isotropic */
655  rfield.lgBeamed[i] = true;
656  // default is radiation from the "illuminated" face
658  // optical depth = normal optical depth * this scale factor,
659  // is 1 / cos theta
661  /* default energy range is H-ionizing radiation */
662  rfield.range[i][0] = HIONPOT;
663  rfield.range[i][1] = rfield.egamry();
664  rfield.RSFCheck[i] = 0.;
665  rfield.tNu[i].clear();
666  rfield.tslop[i].clear();
667  rfield.tFluxLog[i].clear();
668  rfield.ncont[i] = 0;
669  }
670 
671  /* line overlap opacity, turn off with no fine opacity command */
672  rfield.lgOpacityFine = true;
673 
674  pseudoContDef.wlLo = 1000;
675  pseudoContDef.wlHi = 7000.;
676  pseudoContDef.nBins = 1000;
677 
678  /* this is the faintest the high-energy tail of the continuum be */
679  rfield.FluxFaint = 0.; // 1e-10;
680 
681  /* >>chng 01 jul 26, moved next statement from below loop to avoid bug in gcc 2.95.3, PvH */
682  /* default diffuse fields is outward only */
683  strcpy( rfield.chDffTrns, "OU2" );
684  rfield.lgOutOnly = true;
685 
686  /* flags for whether continuum is defined over all energies */
687  rfield.lgMMok = true;
688  rfield.lgHPhtOK = true;
689  rfield.lgXRayOK = true;
690  rfield.lgGamrOK = true;
691 
692  /* set logical flags saying whether to include element in AGN tables */
693  /* first set all false, since most not included */
694  for( long int i=0; i < LIMELM; i++ )
695  {
696  abund.lgAGN[i] = false;
697  }
698  abund.lgAGN[ipHYDROGEN] = true;
699  abund.lgAGN[ipHELIUM] = true;
700  abund.lgAGN[ipCARBON] = true;
701  abund.lgAGN[ipNITROGEN] = true;
702  abund.lgAGN[ipOXYGEN] = true;
703  abund.lgAGN[ipNEON] = true;
704  abund.lgAGN[ipMAGNESIUM] = true;
705  abund.lgAGN[ipSILICON] = true;
706  abund.lgAGN[ipSULPHUR] = true;
707  abund.lgAGN[ipARGON] = true;
708  abund.lgAGN[ipIRON] = true;
709 
710 
711  for( long int i=0; i < LIMELM; i++ )
712  {
713  abund.IsoAbn[i].init();
714  }
715 
716  return;
717 }
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:448
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:296
bool lgPrtStart
Definition: prt.h:227
bool lgPunContinuum
Definition: save.h:354
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:438
long int iptnu
Definition: stopcalc.h:29
bool lgGamrOK
Definition: rfield.h:440
realnum & opacity() const
Definition: emission.h:638
const int ipMAGNESIUM
Definition: cddefines.h:359
bool lgCaseB_no_photo
Definition: opacity.h:181
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:478
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:447
bool lgDrv_cdLine
Definition: trace.h:115
const int ipARGON
Definition: cddefines.h:365
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:415
bool lgPrintLineCumulative
Definition: prt.h:268
const int NISO
Definition: cddefines.h:310
realnum AV_extended
Definition: stopcalc.h:89
long int MapZone
Definition: hcmap.h:20
bool lgKeepMainOutputSeparate
Definition: grid.h:52
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:219
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:355
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:402
realnum drChange
Definition: radius.h:188
bool lgDrBug
Definition: trace.h:61
t_phycon phycon
Definition: phycon.cpp:6
realnum col_monoxco
Definition: stopcalc.h:86
bool lg_CR_B_equipartition
Definition: hextra.h:29
char chHashString[INPUT_LINE_LENGTH]
Definition: save.h:398
vector< string > chLineLabel
Definition: optimize.h:219
realnum AccelAver
Definition: wind.h:46
double RSFCheck[LIMSPC]
Definition: rfield.h:325
bool lgDiffuseInward
Definition: prt.h:209
vector< Energy > tNu[LIMSPC]
Definition: rfield.h:316
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:319
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:401
long ncont[LIMSPC]
Definition: rfield.h:321
bool lgGbarOn
Definition: atmdat.h:421
vector< realnum > tslop[LIMSPC]
Definition: rfield.h:317
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:363
bool lgInitialParse
Definition: optimize.h:182
bool lgPointBug
Definition: trace.h:34
bool lgFeBug
Definition: trace.h:46
long int nsave
Definition: save.h:303
t_dense dense
Definition: global.cpp:15
bool lgNeBug
Definition: trace.h:112
bool lgTimeVary[LIMSPC]
Definition: rfield.h:292
double range[LIMSPC][2]
Definition: rfield.h:329
bool lgPredNextTe
Definition: thermal.h:40
const int LIMSPC
Definition: rfield.h:20
bool lgSourceReflected
Definition: prt.h:207
realnum AccelMax
Definition: wind.h:68
realnum glbdst
Definition: radius.h:133
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:184
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:83
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:319
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:224
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:373
realnum WeakHeatCool
Definition: save.h:470
realnum & gf() const
Definition: emission.h:558
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:39
realnum StopHPlusFrac
Definition: stopcalc.h:56
bool lgHPhtOK
Definition: rfield.h:440
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:598
void setStatic(void)
Definition: wind.h:88
bool lgCMB_set
Definition: rfield.h:108
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:466
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:215
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:173
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:405
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:302
const realnum COLUMN_INIT
Definition: stopcalc.h:14
bool lgSaveDataRates
Definition: save.h:488
realnum AV_point
Definition: stopcalc.h:89
long int nSaveEveryZone[LIMPUN]
Definition: save.h:365
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:58
bool lgTurbHeatVaryTime
Definition: hextra.h:76
const int ipNEON
Definition: cddefines.h:357
realnum DirectionalCosin
Definition: geometry.h:25
DepthTable DLW
Definition: dense.h:198
bool lgDRPLst
Definition: save.h:447
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:129
bool lgTrLine
Definition: trace.h:43
bool lgPrintTime
Definition: prt.h:161
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:440
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:133
realnum AbundanceLimit
Definition: dense.h:151
realnum optier
Definition: optimize.h:254
realnum TempLoStopIteration
Definition: stopcalc.h:45
realnum tlamin
Definition: opacity.h:170
vector< realnum > wavelength
Definition: optimize.h:221
bool lgTemperatureConstantCommandParsed
Definition: thermal.h:50
const int ipSILICON
Definition: cddefines.h:361
realnum PrtTauFnt
Definition: prt.h:182
bool lgSaveEveryZone[LIMPUN]
Definition: save.h:364
char chOptRtn[5]
Definition: optimize.h:268
bool lgSortLines
Definition: prt.h:142
bool lgNegativeIncrements
Definition: grid.h:38
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:93
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:354
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:488
bool lgHashEndIter[LIMPUN]
Definition: save.h:394
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:307
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:729
vector< long > ionTemp
Definition: optimize.h:230
const int ipHELIUM
Definition: cddefines.h:349
long useCPU
Definition: optimize.h:265
realnum ExtinguishColumnDensity
Definition: rfield.h:83
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:440
bool lgTrDiff
Definition: trace.h:67
realnum ConstGrainTemp
Definition: thermal.h:59
bool lgTeSN99
Definition: thermal.h:92
double egamry() const
Definition: mesh.h:88
bool lgPrnPump
Definition: prt.h:188
void init()
Definition: abund.h:61
long ipEmisFreq[LIMPUN]
Definition: save.h:484
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:49
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:73
double TeFloor
Definition: stopcalc.h:33
bool lgInducProcess
Definition: rfield.h:235
bool lgStoutPrint
Definition: atmdat.h:406
realnum & damp() const
Definition: emission.h:608
vector< string > chColDen_label
Definition: optimize.h:212
string chSpeciesDominantRates[LIMPUN]
Definition: save.h:480
bool lgOptDiam
Definition: optimize.h:236
long nCycle
Definition: grid.h:64
bool lgSourceTransmitted
Definition: prt.h:208
realnum OpticalDepthScaleFactor[LIMSPC]
Definition: rfield.h:300
bool lgOTSBug
Definition: trace.h:100
bool lgDenFlucOn
Definition: dense.h:255
const int ipCARBON
Definition: cddefines.h:353
bool lgPres_ram_ON
Definition: pressure.h:92
void InitDefaultsPreparse(void)
long nCPU() const
Definition: cpu.h:385
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:452
bool lgLamdaOn
Definition: atmdat.h:391
static t_cpu cpu
Definition: cpu.h:423
bool lgSubtrCont
Definition: save.h:297
realnum ScaleElement[LIMELM]
Definition: abund.h:242
bool lgSaveDataWn
Definition: save.h:488
t_save save
Definition: save.cpp:5
long nChiantiMaxLevelsFe
Definition: atmdat.h:384
bool lgPrnColl
Definition: prt.h:188
realnum Resolution
Definition: save.h:475
const int ipHYDROGEN
Definition: cddefines.h:348
bool lgOptimFlow
Definition: optimize.h:252
bool lgAbundancesSet
Definition: abund.h:207
bool lgChiantiExp
Definition: atmdat.h:380
Energy emisfreq[LIMPUN]
Definition: save.h:483
vector< long > ion_ColDen
Definition: optimize.h:213
realnum & Aul() const
Definition: emission.h:668
realnum acldr
Definition: wind.h:46
realnum TempHiStopZone
Definition: stopcalc.h:36
bool lgMPISingleRankMode() const
Definition: cpu.h:390
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:177
realnum windv
Definition: wind.h:18
realnum comass
Definition: wind.h:14
realnum taumin
Definition: opacity.h:166
bool lgPrnInwd
Definition: prt.h:188
bool lgLamdaLevelsSet
Definition: atmdat.h:399
bool lgParallel
Definition: grid.h:46
bool lgTr8446
Definition: trace.h:70
bool lgComptonOn
Definition: rfield.h:281
realnum TempHiStopIteration
Definition: stopcalc.h:38
realnum ExtinguishLowEnergyLimit
Definition: rfield.h:83
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