cloudy trunk
Loading...
Searching...
No Matches
Macros | Functions | Variables
atom_feii.cpp File Reference
#include "cddefines.h"
#include "cddrive.h"
#include "thermal.h"
#include "physconst.h"
#include "doppvel.h"
#include "taulines.h"
#include "dense.h"
#include "rfield.h"
#include "radius.h"
#include "lines_service.h"
#include "ipoint.h"
#include "thirdparty.h"
#include "hydrogenic.h"
#include "lines.h"
#include "rt.h"
#include "trace.h"
#include "save.h"
#include "phycon.h"
#include "atomfeii.h"
#include "iso.h"
#include "pressure.h"
#include "parser.h"
Include dependency graph for atom_feii.cpp:

Go to the source code of this file.

Macros

#define NPRADDAT   159
 
#define USE_OLD   true
 
#define AMAT(I_, J_)   (*(amat+(I_)*FeII.nFeIILevel_local+(J_)))
 
#define NLEVDEP   11
 
#define NLEVPOP   11
 

Functions

STATIC void FeIIContCreate (double xLamLow, double xLamHigh, long int ncell)
 
STATIC int FeIIBandsCreate (const char chFile[])
 
STATIC void FeIICollRatesBoltzmann (void)
 
STATIC void FeIILyaPump (void)
 
void FeII_Colden (const char *chLabel)
 
void FeIICreate (void)
 
void FeIILevelPops (void)
 
void FeIIPrint (void)
 
double FeIISumBand (realnum wl1, realnum wl2, double *SumBandInward)
 
void FeII_RT_TauInc (void)
 
void FeII_RT_tau_reset (void)
 
void FeIIPoint (void)
 
void FeIIAccel (double *fe2drive)
 
void FeII_RT_Make (void)
 
void FeIIAddLines (void)
 
void FeIIPunchLevels (FILE *ioPUN)
 
void FeIIPunchColden (FILE *ioPUN)
 
void FeIIPunchOpticalDepth (FILE *ioPUN)
 
void FeIISaveLines (FILE *ioPUN)
 
void FeII_LineZero (void)
 
void FeIIIntenZero (void)
 
void FeIIPunData (FILE *ioPUN, bool lgDoAll)
 
void FeIIPunDepart (FILE *ioPUN, bool lgDoAll)
 
void FeIIPun1Depart (FILE *ioPUN, long int nPUN)
 
void FeIIReset (void)
 
void FeIIZero (void)
 
void FeIIPunPop (FILE *ioPUN, bool lgPunchRange, long int ipRangeLo, long int ipRangeHi, bool lgPunchDensity)
 
void AssertFeIIDep (double *pred, double *BigError, double *StdDev)
 
void FeII_OTS (void)
 
void FeII_RT_Out (void)
 
void ParseAtomFeII (Parser &p)
 
void PunFeII (FILE *io)
 
void FeIIPunchLineStuff (FILE *io, realnum xLimit, long index)
 
double FeIIRadPress (void)
 

Variables

realnum CS2SMALL = (realnum)1e-5
 
int ** ncs1
 
realnum ** FeII_Bands
 
realnum ** FeII_Cont
 
long int nFeIIBands
 
long int nFeIIConBins
 
static long int * nnPradDat
 
static realnum *** sPradDat
 
static double ** Fe2SavN
 
static double ** Fe2A
 
static double ** Fe2LPump
 
static double ** Fe2CPump
 
realnumFe2Energies
 
static realnum ** Fe2Coll
 
static double * Fe2DepCoef
 
static double * Fe2LevelPop
 
static double * Fe2ColDen
 
static double * FeIIBoltzmann
 
static double EnerLyaProf1
 
static double EnerLyaProf4
 
static double PhotOccNumLyaCenter
 
static double * yVector
 
static double ** xMatrix
 
static double * amat
 
STATIC bool lgFeIIEverCalled =false
 

Macro Definition Documentation

◆ AMAT

#define AMAT (   I_,
  J_ 
)    (*(amat+(I_)*FeII.nFeIILevel_local+(J_)))

◆ NLEVDEP

#define NLEVDEP   11

◆ NLEVPOP

#define NLEVPOP   11

◆ NPRADDAT

#define NPRADDAT   159

Definition at line 100 of file atom_feii.cpp.

◆ USE_OLD

#define USE_OLD   true

Function Documentation

◆ AssertFeIIDep()

void AssertFeIIDep ( double *  pred,
double *  BigError,
double *  StdDev 
)

called by assert feii depart coef command

Parameters
*pred
*BigError
*StdDev

Definition at line 2452 of file atom_feii.cpp.

References ASSERT, DEBUG_ENTRY, Fe2DepCoef, FeII, lgFeIIEverCalled, t_FeII::lgSimulate, MAX2, t_FeII::nFeIILevel_local, and POW2.

Referenced by lgCheckMonitors().

◆ FeII_Colden()

void FeII_Colden ( const char *  chLabel)

FeII_Colden maintain H2 column densities within X

Parameters
*chLabel

Definition at line 177 of file atom_feii.cpp.

References cdEXIT, DEBUG_ENTRY, t_radius::drad_x_fillfac, EXIT_FAILURE, Fe2ColDen, Fe2LevelPop, FeII, ioQQQ, t_FeII::nFeIILevel_local, t_FeII::nFeIILevel_malloc, and radius.

Referenced by molcol().

◆ FeII_LineZero()

void FeII_LineZero ( void  )

initialize optical depth arrays, called by TauOut

Definition at line 1825 of file atom_feii.cpp.

References DEBUG_ENTRY, Fe2LevN, FeII, ipFe2LevN, and t_FeII::nFeIILevel_malloc.

Referenced by RT_tau_init().

◆ FeII_OTS()

void FeII_OTS ( void  )

do OTS and outward parts of FeII lines, if large atom is turned on

Definition at line 2504 of file atom_feii.cpp.

References ASSERT, EmissionProxy::Aul(), DEBUG_ENTRY, TransitionProxy::Emis(), Fe2LevN, FeII, TransitionProxy::Hi(), TransitionProxy::ipCont(), ipFe2LevN, t_FeII::nFeIILevel_local, EmissionProxy::ots(), EmissionProxy::Pdest(), and RT_OTS_AddLine().

Referenced by RT_OTS().

Here is the call graph for this function:

◆ FeII_RT_Make()

void FeII_RT_Make ( void  )

do line RT for FeII model

Definition at line 1538 of file atom_feii.cpp.

References t_dense::AtomicWeight, DEBUG_ENTRY, dense, Fe2LevN, FeII, GetDopplerWidth(), ioQQQ, TransitionProxy::ipCont(), ipFe2LevN, ipIRON, t_trace::lgTrace, t_FeII::nFeIILevel_local, t_FeII::nFeIILevel_malloc, RT_line_one(), and trace.

Referenced by Fe2_cooling().

Here is the call graph for this function:

◆ FeII_RT_Out()

void FeII_RT_Out ( void  )

do outward rates for FeII, called by RT_diffuse

Definition at line 2542 of file atom_feii.cpp.

References DEBUG_ENTRY, dense, Fe2LevN, FeII, TransitionProxy::ipCont(), ipFe2LevN, ipIRON, t_FeII::nFeIILevel_local, TransitionProxy::outline_resonance(), and t_dense::xIonDense.

Referenced by RT_diffuse().

Here is the call graph for this function:

◆ FeII_RT_tau_reset()

void FeII_RT_tau_reset ( void  )

FeII_RT_tau_reset reset optical depths for large FeII atom, called by update after each iteration

Definition at line 1425 of file atom_feii.cpp.

References DEBUG_ENTRY, Fe2LevN, FeII, ipFe2LevN, t_FeII::nFeIILevel_malloc, and RT_line_one_tau_reset().

Referenced by RT_tau_reset().

Here is the call graph for this function:

◆ FeII_RT_TauInc()

void FeII_RT_TauInc ( void  )

FeII_RT_TauInc called once per zone in RT_tau_inc to increment large FeII atom line optical depths

Definition at line 1396 of file atom_feii.cpp.

References t_dense::AtomicWeight, DEBUG_ENTRY, dense, Fe2LevN, FeII, GetDopplerWidth(), TransitionProxy::ipCont(), ipFe2LevN, ipIRON, t_FeII::nFeIILevel_local, t_FeII::nFeIILevel_malloc, and RT_line_one_tauinc().

Referenced by RT_tau_inc().

Here is the call graph for this function:

◆ FeIIAccel()

void FeIIAccel ( double *  fe2drive)

called by rt_line_driving to compute radiative acceleration due to FeII lines

Parameters
*fe2drive

Definition at line 1509 of file atom_feii.cpp.

References DEBUG_ENTRY, TransitionProxy::Emis(), TransitionProxy::EnergyErg(), Fe2LevN, FeII, ipFe2LevN, t_FeII::nFeIILevel_local, EmissionProxy::PopOpc(), and EmissionProxy::pump().

Referenced by RT_line_driving().

Here is the call graph for this function:

◆ FeIIAddLines()

void FeIIAddLines ( void  )

called by LineSet4, this adds feii line intensities together

Definition at line 1574 of file atom_feii.cpp.

References DEBUG_ENTRY, t_radius::dVeffAper, TransitionList::Emis(), Fe2LevN, Fe2SavN, FeII, ioQQQ, t_LineSave::ipass, ipFe2LevN, LineSave, t_FeII::nFeIILevel_local, t_FeII::nFeIILevel_malloc, nzone, and radius.

Referenced by lines_lv1_k_zn().

Here is the call graph for this function:

◆ FeIIBandsCreate()

STATIC int FeIIBandsCreate ( const char  chFile[])

Definition at line 2293 of file atom_feii.cpp.

References DEBUG_ENTRY, FeII_Bands, FFmtRead(), FILENAME_PATH_LENGTH_2, ioQQQ, lgCalled, t_trace::lgTrace, MALLOC, nFeIIBands, open_data(), read_whole_line(), and trace.

Referenced by FeIICreate().

Here is the call graph for this function:

◆ FeIICollRatesBoltzmann()

STATIC void FeIICollRatesBoltzmann ( void  )

◆ FeIIContCreate()

STATIC void FeIIContCreate ( double  xLamLow,
double  xLamHigh,
long int  ncell 
)

Definition at line 2574 of file atom_feii.cpp.

References DEBUG_ENTRY, FeII_Cont, lgCalled, MALLOC, and nFeIIConBins.

Referenced by FeIICreate().

◆ FeIICreate()

void FeIICreate ( void  )

reads in feii data from disk, creates space for main arrays

Definition at line 219 of file atom_feii.cpp.

References TransitionProxy::AddLine2Stack(), multi_arr< T, d, ALLOC, lgBC >::alloc(), AllTransitions, amat, ASSERT, EmissionProxy::Aul(), cdEXIT, CS2SMALL, DEBUG_ENTRY, TransitionProxy::Emis(), TransitionProxy::EnergyWN(), EXIT_FAILURE, Fe2A, Fe2ColDen, Fe2Coll, Fe2CPump, Fe2DepCoef, Fe2Energies, Fe2LevelPop, Fe2LevN, Fe2LPump, Fe2SavN, t_FeII::feconwlHi, t_FeII::feconwlLo, FeII, t_FeII::FeIIAul, FeIIBandsCreate(), FeIIBoltzmann, t_FeII::FeIIColl, FeIIContCreate(), t_FeII::FeIINRGs, t_FeII::FeIISTWT, FILENAME_PATH_LENGTH_2, fp_equal(), EmissionProxy::FracInwd(), g, EmissionProxy::gf(), TransitionProxy::Hi(), ioQQQ, ipFe2LevN, t_FeII::ipRedisFcnResonance, t_FeII::ipRedisFcnSubordinate, EmissionProxy::iRedisFun(), lgFeIIMalloc, t_trace::lgTrace, TransitionProxy::Lo(), MALLOC, max(), MAX2, MIN2, ncs1, t_FeII::nfe2con, NFE2LEVN, t_FeII::nFeIILevel_local, t_FeII::nFeIILevel_malloc, nLine, nnPradDat, NPRADDAT, open_data(), EmissionProxy::ots(), EmissionProxy::phots(), POW2, read_whole_line(), RefIndex(), multi_arr< T, d, ALLOC, lgBC >::reserve(), qList::resize(), TransitionList::resize(), save, TransitionProxy::setHi(), TransitionProxy::setLo(), multi_arr< T, d, ALLOC, lgBC >::size(), sPradDat, TransitionList::states(), trace, TRANS_PROB_CONST, USE_OLD, TransitionProxy::WLAng(), xMatrix, yVector, and TransitionProxy::Zero().

Referenced by atmdat_readin().

Here is the call graph for this function:

◆ FeIIIntenZero()

void FeIIIntenZero ( void  )

◆ FeIILevelPops()

void FeIILevelPops ( void  )

◆ FeIILyaPump()

STATIC void FeIILyaPump ( void  )

◆ FeIIPoint()

void FeIIPoint ( void  )

◆ FeIIPrint()

void FeIIPrint ( void  )

FeIIPrint

Definition at line 1340 of file atom_feii.cpp.

References DEBUG_ENTRY.

Referenced by PrtZone().

◆ FeIIPun1Depart()

void FeIIPun1Depart ( FILE *  ioPUN,
long int  nPUN 
)

send the departure coef for physical level nPUN to unit ioPUN

Parameters
ioPUNthe io unit where the print should be directed
nPUNthe physical (not c) number of the level

Definition at line 2082 of file atom_feii.cpp.

References ASSERT, DEBUG_ENTRY, Fe2DepCoef, FeII, and t_FeII::nFeIILevel_local.

Referenced by FeIIPunDepart().

◆ FeIIPunchColden()

void FeIIPunchColden ( FILE *  ioPUN)

FeIIPunchColden save level energies, stat weights, column density

Parameters
*ioPUNfile we will save to

Definition at line 1647 of file atom_feii.cpp.

References DEBUG_ENTRY, TransitionProxy::EnergyWN(), Fe2ColDen, Fe2LevN, FeII, g, TransitionProxy::Hi(), ipFe2LevN, and t_FeII::nFeIILevel_malloc.

Referenced by SaveDo().

Here is the call graph for this function:

◆ FeIIPunchLevels()

void FeIIPunchLevels ( FILE *  ioPUN)

called by parse_punch, save level energies and stat weights

Parameters
ioPUN

Definition at line 1625 of file atom_feii.cpp.

References DEBUG_ENTRY, TransitionProxy::EnergyWN(), Fe2LevN, FeII, g, TransitionProxy::Hi(), ipFe2LevN, and t_FeII::nFeIILevel_malloc.

Referenced by SaveDo().

Here is the call graph for this function:

◆ FeIIPunchLineStuff()

void FeIIPunchLineStuff ( FILE *  io,
realnum  xLimit,
long  index 
)

include FeII lines in punched optical depths, etc, called from SaveLineStuff

Parameters
io
xLimit
index

Definition at line 2820 of file atom_feii.cpp.

References t_dense::AtomicWeight, DEBUG_ENTRY, dense, Fe2LevN, FeII, GetDopplerWidth(), ipFe2LevN, ipIRON, t_FeII::nFeIILevel_local, and Save1Line().

Referenced by SaveLineStuff().

Here is the call graph for this function:

◆ FeIIPunchOpticalDepth()

void FeIIPunchOpticalDepth ( FILE *  ioPUN)

called by FeIIPunchLevels, this creates the save feii line optical depths

Parameters
ioPUN

Definition at line 1673 of file atom_feii.cpp.

References DEBUG_ENTRY, TransitionProxy::Emis(), Fe2LevN, FeII, ipFe2LevN, t_FeII::nFeIILevel_malloc, EmissionProxy::TauIn(), and TransitionProxy::WLAng().

Referenced by SaveDo().

Here is the call graph for this function:

◆ FeIIPunData()

void FeIIPunData ( FILE *  ioPUN,
bool  lgDoAll 
)

save line data for FeII atom

Parameters
ioPUNio unit for save
lgDoAllsave all levels if true, only subset if false

Definition at line 1954 of file atom_feii.cpp.

References EmissionProxy::Aul(), cdEXIT, DEBUG_ENTRY, TransitionProxy::Emis(), EXIT_FAILURE, Fe2LevN, FeII, ioQQQ, ipFe2LevN, lgFeIIEverCalled, MIN2, ncs1, t_FeII::nFeIILevel_local, and Save1LineData().

Referenced by SaveLineData().

Here is the call graph for this function:

◆ FeIIPunDepart()

void FeIIPunDepart ( FILE *  ioPUN,
bool  lgDoAll 
)

save some departure coef for large atom, set with save feii departure command

Parameters
ioPUN
lgDoAlloption to save all dep coef if true

Definition at line 2029 of file atom_feii.cpp.

References DEBUG_ENTRY, FeII, FeIIPun1Depart(), t_FeII::nFeIILevel_local, and NLEVDEP.

Referenced by SaveDo().

Here is the call graph for this function:

◆ FeIIPunPop()

void FeIIPunPop ( FILE *  ioPUN,
bool  lgPunchRange,
long int  ipRangeLo,
long int  ipRangeHi,
bool  lgPunchDensity 
)

save some level pops for large atom, set with save feii level populations command

Parameters
ioPUN
lgPunchRangesave range of levels if true, only selected subset if false
ipRangeLoif ipPunchRange is true, this is lower bound of range on C scale
ipRangeHiif ipPunchRange is true, this is upper bound of range on C scale
lgPunchDensityflag saying whether to save density (cm-3, true) or relative population (flase)

Definition at line 2189 of file atom_feii.cpp.

References ASSERT, DEBUG_ENTRY, dense, Fe2LevelPop, FeII, ipIRON, MIN2, t_FeII::nFeIILevel_local, NLEVPOP, SDIV(), and t_dense::xIonDense.

Referenced by SaveDo().

Here is the call graph for this function:

◆ FeIIRadPress()

double FeIIRadPress ( void  )

◆ FeIIReset()

void FeIIReset ( void  )

initialize some variables, called by zero

Definition at line 2112 of file atom_feii.cpp.

References DEBUG_ENTRY, FeII, t_FeII::nFeIILevel_local, and t_FeII::nFeIILevel_malloc.

Referenced by IterRestart().

◆ FeIISaveLines()

void FeIISaveLines ( FILE *  ioPUN)

◆ FeIISumBand()

double FeIISumBand ( realnum  wl1,
realnum  wl2,
double *  SumBandInward 
)

called in LineSet4, this sums over FeII bands and returns intensities args are lower and upper edges of bands as set in fe2bands.dat

Parameters
wl1
wl2
*SumBandInward

Definition at line 1355 of file atom_feii.cpp.

References ASSERT, DEBUG_ENTRY, dense, TransitionProxy::Emis(), Fe2LevN, FeII, EmissionProxy::FracInwd(), ipFe2LevN, ipIRON, t_FeII::nFeIILevel_local, SMALLFLOAT, TransitionProxy::WLAng(), EmissionProxy::xIntensity(), and t_dense::xIonDense.

Referenced by lines_lv1_k_zn().

Here is the call graph for this function:

◆ FeIIZero()

void FeIIZero ( void  )

◆ ParseAtomFeII()

void ParseAtomFeII ( Parser p)

◆ PunFeII()

void PunFeII ( FILE *  io)

Definition at line 2799 of file atom_feii.cpp.

References DEBUG_ENTRY, TransitionProxy::Emis(), Fe2LevN, FeII, TransitionProxy::ipCont(), ipFe2LevN, t_FeII::nFeIILevel_local, and EmissionProxy::TauIn().

Referenced by SaveSpecial().

Here is the call graph for this function:

Variable Documentation

◆ amat

double * amat
static

◆ CS2SMALL

realnum CS2SMALL = (realnum)1e-5

Definition at line 78 of file atom_feii.cpp.

Referenced by FeIICollRatesBoltzmann(), and FeIICreate().

◆ EnerLyaProf1

double EnerLyaProf1
static

Definition at line 162 of file atom_feii.cpp.

Referenced by FeIILyaPump().

◆ EnerLyaProf4

double EnerLyaProf4
static

Definition at line 163 of file atom_feii.cpp.

Referenced by FeIILyaPump().

◆ Fe2A

double** Fe2A
static

Definition at line 137 of file atom_feii.cpp.

Referenced by FeIICreate(), and FeIILevelPops().

◆ Fe2ColDen

double * Fe2ColDen
static

Definition at line 157 of file atom_feii.cpp.

Referenced by FeII_Colden(), FeIICreate(), and FeIIPunchColden().

◆ Fe2Coll

realnum** Fe2Coll
static

Definition at line 146 of file atom_feii.cpp.

Referenced by FeIICollRatesBoltzmann(), FeIICreate(), and FeIILevelPops().

◆ Fe2CPump

double ** Fe2CPump
static

Definition at line 140 of file atom_feii.cpp.

Referenced by FeIICreate(), and FeIILevelPops().

◆ Fe2DepCoef

double* Fe2DepCoef
static

Definition at line 153 of file atom_feii.cpp.

Referenced by AssertFeIIDep(), FeIICreate(), FeIILevelPops(), and FeIIPun1Depart().

◆ Fe2Energies

realnum* Fe2Energies

Definition at line 143 of file atom_feii.cpp.

Referenced by FeIICreate().

◆ Fe2LevelPop

double * Fe2LevelPop
static

Definition at line 155 of file atom_feii.cpp.

Referenced by FeII_Colden(), FeIICreate(), FeIIIntenZero(), FeIILevelPops(), and FeIIPunPop().

◆ Fe2LPump

double** Fe2LPump
static

Definition at line 140 of file atom_feii.cpp.

Referenced by FeIICreate(), FeIILevelPops(), and FeIILyaPump().

◆ Fe2SavN

double** Fe2SavN
static

Definition at line 134 of file atom_feii.cpp.

Referenced by FeIIAddLines(), FeIICreate(), and FeIISaveLines().

◆ FeII_Bands

realnum** FeII_Bands

FeII.bands[n][3], where n is the number of bands in fe2bands.dat these bands are defined in fe2bands.dat and read in at startup of calculation

Definition at line 106 of file atom_feii.cpp.

Referenced by FeIIBandsCreate(), and lines_lv1_k_zn().

◆ FeII_Cont

realnum** FeII_Cont

FeII_Cont[n][3], where n is the number of cells needed these bands are defined in cdGetFeIIBands

Definition at line 113 of file atom_feii.cpp.

Referenced by FeIIContCreate(), lines_lv1_k_zn(), SaveDo(), and SaveFeII_cont().

◆ FeIIBoltzmann

double * FeIIBoltzmann
static

Definition at line 159 of file atom_feii.cpp.

Referenced by FeIICollRatesBoltzmann(), FeIICreate(), and FeIILevelPops().

◆ lgFeIIEverCalled

STATIC bool lgFeIIEverCalled =false

Definition at line 717 of file atom_feii.cpp.

Referenced by AssertFeIIDep(), FeIILevelPops(), FeIIPunData(), and FeIIRadPress().

◆ ncs1

int** ncs1

Definition at line 94 of file atom_feii.cpp.

Referenced by FeIICollRatesBoltzmann(), FeIICreate(), and FeIIPunData().

◆ nFeIIBands

long int nFeIIBands

this is the number of bands read in from FeII_bands.ini

Definition at line 116 of file atom_feii.cpp.

Referenced by FeIIBandsCreate(), and lines_lv1_k_zn().

◆ nFeIIConBins

long int nFeIIConBins

number of bands in continuum array

Definition at line 119 of file atom_feii.cpp.

Referenced by FeIIContCreate(), lines_lv1_k_zn(), and SaveDo().

◆ nnPradDat

long int* nnPradDat
static

Definition at line 124 of file atom_feii.cpp.

Referenced by FeIICollRatesBoltzmann(), and FeIICreate().

◆ PhotOccNumLyaCenter

double PhotOccNumLyaCenter
static

Definition at line 164 of file atom_feii.cpp.

Referenced by FeIILyaPump().

◆ sPradDat

realnum*** sPradDat
static

Definition at line 129 of file atom_feii.cpp.

Referenced by FeIICollRatesBoltzmann(), and FeIICreate().

◆ xMatrix

double ** xMatrix
static

Definition at line 170 of file atom_feii.cpp.

Referenced by FeIICreate(), FeIILevelPops(), and SanityCheckBegin().

◆ yVector

double* yVector
static

Definition at line 167 of file atom_feii.cpp.

Referenced by FeIICreate(), FeIILevelPops(), and SanityCheckBegin().