/* */ #include "cddefines.h" /* cddefines.h set EXTERN, * now unset EXTERN so that everything is defined here */ #ifdef EXTERN # undef EXTERN #endif #define EXTERN /* */ /* some things in cddefines.h */ /* this is the output cloudy will talk to, default is stdout and is set below */ FILE *ioQQQ ; /* these are options to print error output * requested with print errors command */ FILE* ioPrnErr; /* this is declared in cddefines and is used for io * saying when subs are entered and return */ FILE *debug_fp ; /* used for punching map*/ FILE *ioMAP; /* following set TRUE with print errors command */ int lgPrnErr; /* levels within hydrogenic atoms */ const int IP1S = 0; const int IP2S = 1; const int IP2P = 2; /* these are pointers to some elements */ const int ipH=0; const int ipHE=1; #include "taulines.h"/* this must go here since it defines NTA needed for other lines*/ /* following is true extern in taulines.h */ long nWindLine = NWINDDIM; #include "abnslr.h" #include "abrems.h" #include "abuntablfac.h" #include "abuntabllg.h" #include "angllum.h" #include "assertresults.h" #include "assav.h" #include "atomcwgt.h" #include "augro3.h" #include "autoit.h" #include "badstp.h" #include "betaver.h" #include "bit32.h" #include "bndsok.h" #include "bounds.h" #include "bowoi.h" #include "broke.h" #include "ca2mly.h" #include "caline.h" #include "called.h" #include "casbhs.h" #include "caseb.h" #include "cextra.h" #include "cddrive.h" /* this will be set true when cdInit is called. The definition is in cdInit. * Other routines will check that this is TRUE when they are called, * to verify that cdInit was called first */ int lgcdInitCalled=FALSE; #include "charexc.h" #include "che2sn.h" #include "chmax.h" #include "chnukt.h" #include "cionhe.h" #include "cludon.h" #include "cmfrac.h" #include "cnegtk.h" #include "cnread.h" #include "coatom.h" #include "codish.h" #include "colden.h" #include "colimt.h" #include "colion.h" #include "collionrate.h" #include "colmas.h" #include "colneg.h" #include "comneg.h" #include "compton.h" #include "con0.h" #include "converge.h" #include "coolants.h" #include "coolheavy.h" #include "covib.h" #include "crsnut.h" #include "cyclot.h" #include "d10830.h" #include "dalerr.h" #include "dampon.h" #include "date.h" #include "dcala.h" #include "dclgas.h" #include "dcneg.h" #include "denpow.h" #include "densty.h" #include "deplon.h" #include "deptau.h" #include "destcrt.h" #include "dheton.h" #include "dhla.h" #include "didz.h" #include "diffheav.h" #include "difher.h" #include "dlaw.h" #include "dmetal.h" #include "dndt.h" #include "doppvel.h" #include "double.h" #include "dphoht.h" #include "drmin.h" #include "drminu.h" #include "drmnon.h" #include "drneg.h" #include "dtemp.h" #include "dtmase.h" #include "dtrans.h" #include "dump.h" #include "e2tau.h" #include "edgtcm.h" #include "edsqte.h" #include "egray.h" #include "elecden.h" #include "elmton.h" #include "em2nu.h" #include "embesq.h" #include "eovrlpvar.h" #include "escdst.h" #include "exptau.h" #include "extinc.h" #include "extramax.h" #include "extrintn.h" #include "facexp.h" #include "failz.h" #include "faint.h" #include "fe2cool.h" #include "fe2neg.h" #include "nfeii.h" #include "fe2pmp.h" #include "fe2tau.h" #include "fe4cool.h" #include "fekems.h" #include "ffsum.h" #include "filfac.h" #include "fillnu.h" #include "fluct.h" #include "fluors.h" #include "flxfnt.h" #include "flxsav.h" #include "fntset.h" #include "forcte.h" #include "fourpi.h" #include "frcind.h" #include "freeon.h" #include "fston.h" #include "fudgec.h" #include "gaunts.h" #include "geopp.h" #include "ghabng.h" #include "gionrc.h" #include "globul.h" #include "grainemis.h" #include "grainvar.h" #include "grmetl.h" #include "h.h" #include "h2dish.h" #include "h2max.h" #include "h2opac.h" #include "h2ozer.h" #include "h2pcng.h" #include "habing.h" #include "hahmin.h" #include "hcaseb.h" #include "hcbr.h" #include "hcolrec.h" #include "hcolrt.h" #include "hctmin.h" #include "hctonoff.h" #include "hdeltat.h" #include "he.h" #include "heots.h" #include "nhe1lvl.h" #include "nhe3lvl.h" #include "he1as.h" #include "he1blt.h" #include "he1bn.h" #include "he1cbr.h" #include "he1crt.h" #include "he1deltat.h" #include "he1dmp.h" #include "he1esc.h" #include "he1ex.h" #include "he1ind.h" #include "he1net.h" #include "he1nionryd.h" #include "he1nxt.h" #include "he1rate.h" #include "he1rb.h" #include "he1rsp.h" #include "he1stat.h" #include "he1str.h" #include "he1tau.h" #include "he3as.h" #include "he3bn.h" #include "he3c.h" #include "he3gams.h" #include "he3hsv.h" #include "he3lines.h" #include "he3lte.h" #include "he3n.h" #include "he3pht.h" #include "he3rate.h" #include "he3rr.h" #include "he3tau.h" #include "heat.h" #include "heatcool.h" #include "heating.h" #include "heatlmax.h" #include "heavy.h" #include "heclon.h" #include "hehp.h" #include "heinwd.h" #include "hemase.h" #include "heopfr.h" #include "herec.h" #include "hevmolec.h" #include "hextra.h" #include "hfbnet.h" #include "hgamsc.h" #include "hhe1.h" #include "hhe2phtots.h" #include "hionfraccom.h" #include "hionrad.h" #include "hlife.h" #include "hlmax.h" #include "hlteok.h" #include "hmi.h" #include "hmidep.h" #include "hmihet.h" #include "hmollte.h" #include "holod.h" #include "hpheat.h" #include "hphoto.h" #include "hratedest.h" #include "hsrate.h" #include "hstat.h" #include "htopoff.h" #include "hwidth.h" #include "hydrogenic.h" /* this is set true once space malloced, then never change * number of levels again with hydrogenic command, * it is used in gethydro to never set number of levels one set here, * also to make sure malloc only happens one time */ int lgHydroMalloc = FALSE; /* */ /* * variables for hydrogen routines */ /*default nnumber of levels for hydrogen atom */ long int nhlevel = 15; /* */ /* pointers within recombination coefficient array */ /* ipRecEsc is state specific escape probability*/ const int ipRecEsc = 2; /* the net escaping, including destruction by background and optical deepth*/ const int ipRecNetEsc = 1; /* ipRecRad is state specific radiative recombination rate*/ const int ipRecRad = 0; #include "hydrophocs.h" #include "i3727.h" #include "incidspec.h" #include "input.h" #include "insanity.h" #include "intalk.h" #include "ionfracs.h" #include "ionrange.h" #include "ioreco.h" #include "ip2gam.h" #include "ip2phtcom.h" #include "ip626.h" #include "ipdr.h" #include "ipfe2.h" #include "iph2.h" #include "iphe1l.h" #include "iphmin.h" #include "ipoi.h" #include "ipsolar.h" #include "ipvfil.h" #include "ircoil.h" #include "itagan.h" #include "itercnt.h" #include "jmin.h" #include "kshllenr.h" #include "lamase.h" #include "lastdt.h" #include "lev3fail.h" #include "levery.h" #include "limfal.h" #include "linelabl.h" #include "linesave.h" /* these are the definitions of the line save arrays in linesave.h */ LinDstSv *LineDSv=NULL; LinSv *LineSv=NULL; #include "logte.h" #include "lotsco.h" #include "lyaext.h" #include "lyamas.h" #include "mappar.h" #include "max2pht.h" #include "maxcor.h" #include "mean.h" #include "mewecoef.h" #include "mgexc.h" #include "moldrv.h" #include "negdrg.h" #include "negoi.h" #include "neutrn.h" #include "nh.h" #include "nhe1.h" #include "nitexc.h" #include "noconverge.h" #include "nodec.h" #include "noexec.h" #include "nomole.h" #include "noptot.h" #include "norm.h" #include "nphotl.h" #include "nsbig.h" #include "nsshells.h" #include "numderiv.h" #include "nustbl.h" #include "nxray.h" #include "o3data.h" #include "o3exc.h" #include "occ1hi.h" #include "occmax.h" #include "oii.h" #include "only.h" #include "opac.h" #include "opacpoint.h" #include "ophf.h" #include "optimr.h" #include "optype.h" #include "otsmin.h" #include "parray.h" #include "pbn.h" #include "pbowen.h" #include "pca2ex.h" #include "peimbt.h" #include "ph1com.h" #include "phe1lv.h" #include "pheat.h" #include "phfiton.h" #include "photn2.h" #include "photrate.h" #include "phycon.h" #include "physok.h" #include "plasnu.h" #include "plast.h" #include "plot.h" #include "plwidth.h" #include "pmp2s.h" #include "pmpcah.h" #include "pmpdmp.h" #include "pmptau.h" #include "pop371.h" /* this is set true when space is allocated for the FeII arrays, * once this happens nFeIILevel cannot be changed with the atom feii levels command */ int lgFeIIMalloc=FALSE; /* */ #include "poplevls.h" #include "popoi.h" #include "pressure.h" #include "prhd.h" #include "printit.h" #include "prnline.h" #include "prtmaser.h" #include "prttau.h" #include "pshort.h" #include "pstart.h" #include "pumpfe.h" #include "punchskip.h" #include "pnunit.h" #include "punconv.h" #include "punpoint.h" #include "punrlttype.h" #include "qs.h" #include "r1335.h" #include "r2s3bd.h" #include "radius.h" #include "rcota.h" #include "reason.h" #include "reccno.h" #include "recoil.h" #include "recomrate.h" #include "redis.h" #include "resion.h" #include "rfield.h" #include "rh2dis.h" #include "rin2ph.h" #include "s3727.h" #include "scalem.h" #include "sdrmin.h" #include "secondaries.h" #include "shell.h" #include "sii.h" #include "smbeta.h" #include "solar.h" #include "solars.h" #include "sphere.h" #include "sqrne.h" #include "stimax.h" #include "stopcalc.h" #include "strkon.h" #include "struc.h" #include "sumoutinc.h" #include "supdie.h" #include "supprs.h" #include "taddlya.h" #include "taucon.h" #include "taumin.h" #include "tcool.h" #include "tehigh.h" #include "teinv.h" #include "tenden.h" #include "tepowers.h" #include "testit.h" #include "tff.h" #include "tgff.h" #include "the1lo.h" #include "thigh.h" #include "thlo.h" #include "timed.h" #include "timefc.h" #include "timesc.h" #include "tlast.h" #include "toler.h" #include "totlum.h" #include "touton.h" #include "tpred.h" #include "trace.h" #include "trimstg.h" #include "trovrd.h" #include "tseton.h" #include "turb.h" #include "turhet.h" #include "twoway.h" #include "typmatrx.h" #include "u.h" #include "uspher.h" #include "vary.h" #include "varypar.h" #define NAMELEN 80 char chOptimFileName[NAMELEN] = "optimal.in"; #include "vrrfit.h" #include "warngs.h" #include "warnings.h" #include "wind.h" #include "wkhtcl.h" #include "xry.h" #include "yield.h" /* external ZeroNum used to div by zero * ok here since never changed*/ #include "zeronum.h" const double ZeroNum = 0.; #include "zonecnt.h" void cdDefines(void) { nhlevel = 15; } #undef EXTERN #define EXTERN extern