cloudy trunk
Loading...
Searching...
No Matches
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_)
#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_ )
Value:
(*(amat+(I_)*FeII.nFeIILevel_local+(J_)))
static double * amat
t_FeII FeII
Definition atomfeii.cpp:5
#define J_(A_)
Definition iso.h:23

Referenced by FeIILevelPops().

◆ NLEVDEP

#define NLEVDEP   11

Referenced by FeIIPunDepart().

◆ NLEVPOP

#define NLEVPOP   11

Referenced by FeIIPunPop().

◆ NPRADDAT

#define NPRADDAT   159

Definition at line 100 of file atom_feii.cpp.

Referenced by FeIICollRatesBoltzmann(), and FeIICreate().

◆ USE_OLD

#define USE_OLD   true

Referenced by FeIICreate().

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, MAX2, 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, EXIT_FAILURE, Fe2ColDen, Fe2LevelPop, FeII, ioQQQ, 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, and ipFe2LevN.

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, 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 DEBUG_ENTRY, dense, Fe2LevN, FeII, GetDopplerWidth(), ioQQQ, TransitionProxy::ipCont(), ipFe2LevN, ipIRON, 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, and TransitionProxy::outline_resonance().

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, 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 DEBUG_ENTRY, dense, Fe2LevN, FeII, GetDopplerWidth(), TransitionProxy::ipCont(), ipFe2LevN, ipIRON, 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, 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, Fe2LevN, Fe2SavN, FeII, ioQQQ, ipFe2LevN, LineSave, nzone, and radius.

Referenced by lines_lv1_k_zn().

◆ 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, MALLOC, nFeIIBands, open_data(), read_whole_line(), STATIC, and trace.

Referenced by FeIICreate().

Here is the call graph for this function:

◆ FeIICollRatesBoltzmann()

◆ 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, nFeIIConBins, and STATIC.

Referenced by FeIICreate().

◆ FeIICreate()

◆ FeIIIntenZero()

◆ FeIILevelPops()

◆ FeIILyaPump()

◆ FeIIPoint()

void FeIIPoint ( void )

FeIIPoint called by ContCreatePointers to create pointers for lines in large FeII atom

Definition at line 1456 of file atom_feii.cpp.

References abscf(), EmissionProxy::Aul(), EmissionProxy::dampXvel(), DEBUG_ENTRY, TransitionProxy::Emis(), TransitionProxy::EnergyRyd(), TransitionProxy::EnergyWN(), Fe2LevN, FeII, EmissionProxy::gf(), TransitionProxy::ipCont(), ipFe2LevN, EmissionProxy::ipFine(), ipFineCont(), ipoint(), TransitionProxy::Lo(), EmissionProxy::opacity(), PI4, and rfield.

Referenced by ContCreatePointers().

Here is the call graph for this function:

◆ 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, and FeII.

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(), and ipFe2LevN.

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(), and ipFe2LevN.

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 DEBUG_ENTRY, dense, Fe2LevN, FeII, GetDopplerWidth(), ipFe2LevN, ipIRON, 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, 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, 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(), 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, NLEVPOP, and SDIV().

Referenced by SaveDo().

Here is the call graph for this function:

◆ FeIIRadPress()

double FeIIRadPress ( void )

rad pre due to FeII lines called in PresTotCurrent

Definition at line 2838 of file atom_feii.cpp.

References DEBUG_ENTRY, dense, DumpLine(), TransitionProxy::Emis(), Fe2LevN, FeII, GetDopplerWidth(), TransitionProxy::Hi(), ioQQQ, TransitionProxy::ipCont(), ipFe2LevN, ipIRON, iteration, lgFeIIEverCalled, nzone, EmissionProxy::PopOpc(), PressureRadiationLine(), RT_LineWidth(), and SMALLFLOAT.

Referenced by PresTotCurrent().

Here is the call graph for this function:

◆ FeIIReset()

void FeIIReset ( void )

initialize some variables, called by zero

Definition at line 2112 of file atom_feii.cpp.

References DEBUG_ENTRY, and FeII.

Referenced by IterRestart().

◆ FeIISaveLines()

void FeIISaveLines ( FILE * ioPUN)

called by FeIIPunchLevels, this creates the save feii line intensity

Parameters
ioPUN

Definition at line 1709 of file atom_feii.cpp.

References cdEXIT, cdLine(), DEBUG_ENTRY, TransitionProxy::Emis(), TransitionProxy::EnergyWN(), EXIT_FAILURE, Fe2LevN, Fe2SavN, FeII, ioQQQ, ipFe2LevN, LineSave, LineSv, MAX2, radius, SMALLFLOAT, EmissionProxy::TauIn(), and TransitionProxy::WLAng().

Referenced by SaveDo().

Here is the call graph for this function:

◆ 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, SMALLFLOAT, TransitionProxy::WLAng(), and EmissionProxy::xIntensity().

Referenced by lines_lv1_k_zn().

Here is the call graph for this function:

◆ FeIIZero()

void FeIIZero ( void )

zero out variables that deal with FeII, called by zero

Definition at line 2127 of file atom_feii.cpp.

References DEBUG_ENTRY, FeII, ipCRD, ipCRDW, and lgFeIIMalloc.

Referenced by zero().

◆ ParseAtomFeII()

void ParseAtomFeII ( Parser & p)

Definition at line 2619 of file atom_feii.cpp.

References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, FeII, Parser::getNumberCheck(), ioQQQ, ipCRD, ipCRDW, ipPRD, lgFeIIMalloc, NFE2LEVN, Parser::nMatch(), and TotalInsanity().

Referenced by ParseAtom(), and ParseTest().

Here is the call graph for this function:

◆ PunFeII()

void PunFeII ( FILE * io)

Definition at line 2799 of file atom_feii.cpp.

References DEBUG_ENTRY, TransitionProxy::Emis(), Fe2LevN, FeII, TransitionProxy::ipCont(), ipFe2LevN, 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 cdColm(), 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 cdColm(), 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 cdColm(), 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 cdColm(), 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().