| cloudy
    trunk
    | 
#include "cddefines.h"#include "lines_service.h"#include "dense.h"#include "geometry.h"#include "ipoint.h"#include "lines.h"#include "trace.h"#include "opacity.h"#include "radius.h"#include "rfield.h"#include "rt.h"#include "prt.h"#include "taulines.h"#include "save.h"
Go to the source code of this file.
| Functions | |
| void | LineStackCreate () | 
| double | eina (double gf, double enercm, double gup) | 
| double | GetGF (double trans_prob, double enercm, double gup) | 
| double | abscf (double gf, double enercm, double gl) | 
| realnum | wlAirVac (double wlAir) | 
| double | RefIndex (double EnergyWN) | 
| realnum | WavlenErrorGet (realnum wavelength, long sig_figs) | 
| STATIC LinSv * | lincom (double xEmiss, double xEmissIsoBkg, realnum wavelength, const char *chLab, long int ipnt, char chInfo, const char *chComment, bool lgAdd, const TransitionProxy &tr) | 
| LinSv * | linadd (double xEmiss, realnum wavelength, const char *chLab, char chInfo, const char *chComment) | 
| double | emergent_line (double emissivity_in, double emissivity_out, long int ipCont) | 
| void | outline_base (double dampXvel, double damp, bool lgTransStackLine, long int ip, double phots, realnum inwd, double nonScatteredFraction) | 
| void | outline_base_bin (bool lgTransStackLine, long int ip, double phots, realnum inwd, double nonScatteredFraction) | 
| static void | lindst1 (double dampXvel, double damp, double xEmiss, double xEmissIsoBkg, realnum wavelength, const char *chLab, long int ipnt, char chInfo, bool lgOutToo, const char *chComment, const TransitionProxy &tr) | 
| void | lindst (double xEmiss, realnum wavelength, const char *chLab, long int ipnt, char chInfo, bool lgOutToo, const char *chComment) | 
| void | lindst (double dampXvel, double damp, double xEmiss, realnum wavelength, const char *chLab, long int ipnt, char chInfo, bool lgOutToo, const char *chComment) | 
| void | lindst (const TransitionProxy &t, const ExtraInten &extra, const char *chLab, char chInfo, bool lgOutToo, const char *chComment) | 
| void | PntForLine (double wavelength, const char *chLabel, long int *ipnt) | 
| double | ConvRate2CS (realnum gHi, realnum rate) | 
| double | ConvCrossSect2CollStr (double CrsSectCM2, double gLo, double E_ProjectileRyd, double reduced_mass_grams) | 
| double | totlin (int chInfo) | 
| const TransitionProxy | FndLineHt (long int *level) | 
| void | set_xIntensity (const TransitionProxy &t) | 
| double abscf | ( | double | gf, | 
| double | enercm, | ||
| double | gl | ||
| ) | 
abscf convert gf into absorption coefficient
| gf | |
| enercm | |
| gl | 
Definition at line 113 of file lines_service.cpp.
References ASSERT, and DEBUG_ENTRY.
Referenced by ContCreatePointers(), FillExtraLymanLine(), diatomics::init(), iso_satellite_update(), and iso_setOpacity().
| double ConvCrossSect2CollStr | ( | double | CrsSectCM2, | 
| double | gLo, | ||
| double | E_ProjectileRyd, | ||
| double | reduced_mass_grams | ||
| ) | 
convert collisional deexcitation cross section for into collision strength
| CrsSectCM2 | - the cross section | 
| gLo | - statistical weight of lower level of transition | 
| E_ProjectileRyd | - initial projectile energy in Rydbergs | 
| reduced_mass_grams | - reduced mass MpMt/(Mp+Mt) of projectile-target system | 
Definition at line 686 of file lines_service.cpp.
References ASSERT, cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), and ioQQQ.
Referenced by collision_strength_VF01(), CS_l_mixing_S62(), and hydro_vs_coll_str().

convert down coll rate back into electron cs in case other parts of code need this for reference
| gHi | - stat weight of upper level | 
| rate | - deexcitation rate, units s-1 | 
Definition at line 667 of file lines_service.cpp.
References ASSERT, t_dense::cdsqte, DEBUG_ENTRY, and dense.
| double eina | ( | double | gf, | 
| double | enercm, | ||
| double | gup | ||
| ) | 
eina convert a gf into an Einstein A
| gf | |
| enercm | |
| gup | 
Definition at line 75 of file lines_service.cpp.
References DEBUG_ENTRY, and POW2.
Referenced by atmdat_STOUT_readin(), ContCreatePointers(), ForbiddenAuls(), and read_UTA_lines().
| double emergent_line | ( | double | emissivity_in, | 
| double | emissivity_out, | ||
| long int | ipCont | ||
| ) | 
absorption due to continuous opacity
| emissivity | [erg cm-3 s-1] in inward direction | 
| emissivity | [erg cm-3 s-1] in outward direction | 
| array | index for continuum frequency | 
Definition at line 337 of file lines_service.cpp.
References t_opac::albedo, ASSERT, DEBUG_ENTRY, t_opac::E2TauAbsFace, t_opac::E2TauAbsOut, t_opac::E2TauAbsTotal, geometry, iteration, t_geometry::lgSphere, t_rfield::nflux_with_check, opac, and rfield.
Referenced by lincom(), lines_continuum(), RT_diffuse(), and RT_iso_integrate_RRC().
| const TransitionProxy FndLineHt | ( | long int * | level | ) | 
FndLineHt search through line heat arrays to find the strongest heat source
| *level | 
Definition at line 750 of file lines_service.cpp.
References ASSERT, TransitionProxy::associated(), TransitionProxy::Coll(), dBaseTrans, DEBUG_ENTRY, fixit, CollisionProxy::heat(), HFLines, NISO, nSpecies, nWindLine, TransitionList::size(), and TauLine2.
Referenced by PrtComment(), radius_next(), and SaveHeat().

| double GetGF | ( | double | eina, | 
| double | enercm, | ||
| double | gup | ||
| ) | 
GetGF convert Einstein A into oscillator strength
| eina | |
| enercm | |
| gup | 
Definition at line 92 of file lines_service.cpp.
References ASSERT, DEBUG_ENTRY, and POW2.
Referenced by atmdat_CHIANTI_readin(), atmdat_LAMDA_readin(), atmdat_STOUT_readin(), FillExtraLymanLine(), hydro_vs_coll_str(), hydro_vs_deexcit(), HyperfineCreate(), diatomics::init(), iso_get_collision_strength(), iso_satellite_update(), iso_setOpacity(), and ReadBadnellAIData().
| LinSv* linadd | ( | double | xEmiss, | 
| realnum | wavelength, | ||
| const char * | chLab, | ||
| char | chInfo, | ||
| const char * | chComment | ||
| ) | 
Definition at line 318 of file lines_service.cpp.
References DEBUG_ENTRY, and lincom().
Referenced by lines(), lines_continuum(), lines_general(), lines_grains(), lines_helium(), lines_hydro(), lines_iron_Ka(), lines_molecules(), and PutLine().

| STATIC LinSv* lincom | ( | double | xEmiss, | 
| double | xEmissIsoBkg, | ||
| realnum | wavelength, | ||
| const char * | chLab, | ||
| long int | ipnt, | ||
| char | chInfo, | ||
| const char * | chComment, | ||
| bool | lgAdd, | ||
| const TransitionProxy & | tr | ||
| ) | 
Definition at line 223 of file lines_service.cpp.
References t_mesh::anu(), ASSERT, DEBUG_ENTRY, t_radius::dVeffAper, emergent_line(), t_rt::fracin, t_LineSave::init(), t_LineSave::ipass, t_LineSave::lines, LineSave, MAX2, t_rfield::nflux, t_LineSave::nsum, radius, rfield, rt, wavelength, and t_mesh::widflx().
Referenced by linadd(), and lindst1().

| void lindst | ( | double | xInten, | 
| realnum | wavelength, | ||
| const char * | chLab, | ||
| long int | ipnt, | ||
| char | chInfo, | ||
| bool | lgOutToo, | ||
| const char * | chComment | ||
| ) | 
put forbidden line into stack, using index derived below
| xInten | - local emissivity per unit vol | 
| wavelength | wavelength Angstroms | 
| *chLab | string label for ion | 
| ipnt | offset of line in continuum mesh | 
| chInfo | character type of entry for line - 'c' cooling, 'h' heating, 'i' info only, 'r' recom line | 
| lgOutToo | should line be included in outward beam? | 
| *chComment | string explaining line | 
Definition at line 528 of file lines_service.cpp.
References DEBUG_ENTRY, and lindst().
Referenced by species_bands::insert(), lindst(), lines(), lines_continuum(), lines_general(), lines_hydro(), lines_iron_Ka(), and PutLine().

| void lindst | ( | double | dampXvel, | 
| double | damp, | ||
| double | xInten, | ||
| realnum | wavelength, | ||
| const char * | chLab, | ||
| long int | ipnt, | ||
| char | chInfo, | ||
| bool | lgOutToo, | ||
| const char * | chComment | ||
| ) | 
put forbidden line into stack, using index derived below
| dampXvel | - damping constant times Doppler velocity | 
| damp | - damping constant | 
| xInten | - local emissivity per unit vol | 
| wavelength | wavelength Angstroms | 
| *chLab | string label for ion | 
| ipnt | offset of line in continuum mesh | 
| chInfo | character type of entry for line - 'c' cooling, 'h' heating, 'i' info only, 'r' recom line | 
| lgOutToo | should line be included in outward beam? | 
| *chComment | string explaining line | 
Definition at line 549 of file lines_service.cpp.
References DEBUG_ENTRY, and lindst1().

| void lindst | ( | const TransitionProxy & | t, | 
| const ExtraInten & | extra, | ||
| const char * | chLab, | ||
| char | chInfo, | ||
| bool | lgOutToo, | ||
| const char * | chComment | ||
| ) | 
Definition at line 572 of file lines_service.cpp.
References EmissionProxy::damp(), EmissionProxy::dampXvel(), DEBUG_ENTRY, t_radius::depth, TransitionProxy::Emis(), fprintf(), TransitionProxy::Hi(), ioQQQ, t_LineSave::ipass, TransitionProxy::ipCont(), lindst1(), t_LineSave::lines, LineSave, t_LineSave::nsum, nzone, EmissionProxy::Pesc_total(), phots(), radius, ExtraInten::v, TransitionProxy::WLAng(), EmissionProxy::xIntensity(), and EmissionProxy::xObsIntensity().

| 
 | static | 
Definition at line 477 of file lines_service.cpp.
References t_mesh::anu(), ASSERT, t_geometry::covrt, DEBUG_ENTRY, geometry, t_LineSave::ipass, lincom(), LineSave, outline_base(), phots(), and rfield.
Referenced by lindst().

| void LineStackCreate | ( | void | ) | 
create vectors to save line intensities
Definition at line 30 of file lines_service.cpp.
References ASSERT, t_LineSave::clear(), DEBUG_ENTRY, fprintf(), ioQQQ, t_LineSave::ipass, t_trace::lgTrace, lines(), t_LineSave::lines, LineSave, t_LineSave::nsum, t_LineSave::resize(), and trace.
Referenced by cloudy().

| void outline_base | ( | double | dampXvel, | 
| double | damp, | ||
| bool | lgTransStackLine, | ||
| long int | ip, | ||
| double | phots, | ||
| realnum | inwd, | ||
| double | nonScatteredFraction | ||
| ) | 
Definition at line 397 of file lines_service.cpp.
References t_mesh::anu(), ASSERT, DEBUG_ENTRY, t_mesh::egamry(), t_mesh::emm(), fixit, get_ptr(), ipoint(), t_rfield::lgDoLineTrans, MAX2, MIN2, outline_base_bin(), rfield, and VoigtU().
Referenced by lindst1(), and TransitionProxy::outline().

| void outline_base_bin | ( | bool | lgTransStackLine, | 
| long int | ip, | ||
| double | phots, | ||
| realnum | inwd, | ||
| double | nonScatteredFraction | ||
| ) | 
Definition at line 444 of file lines_service.cpp.
References t_radius::BeamInIn, t_radius::BeamInOut, t_radius::BeamOutOut, DEBUG_ENTRY, t_rfield::DiffuseLineEmission, t_radius::dVolOutwrd, t_radius::dVolReflec, t_opac::ExpZone, opac, t_rfield::outlin, radius, t_rfield::reflin, rfield, and t_opac::tmn.
Referenced by outline_base().
| void PntForLine | ( | double | wavelength, | 
| const char * | chLabel, | ||
| long int * | ipnt | ||
| ) | 
PntForLine generate pointer for forbidden line
| wavelength | wavelength of line in Angstroms | 
| *chLabel | label for the line | 
| *ipnt | this is array index on the f, not c scale, for the continuum cell holding the line | 
Definition at line 602 of file lines_service.cpp.
References ASSERT, cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), ioQQQ, t_LineSave::ipass, ipLineEnergy(), LineSave, and wavelength.
Referenced by species_bands::insert(), lines(), and lines_general().

| double RefIndex | ( | double | EnergyWN | ) | 
RefIndex calculates the index of refraction of air using the line energy in wavenumbers, used to convert vacuum wavelengths to air wavelengths.
| EnergyWN | - energy in wavenumbers | 
Definition at line 167 of file lines_service.cpp.
References ASSERT, DEBUG_ENTRY, t_prt::lgPrintLineAirWavelengths, and prt.
Referenced by atmdat_CHIANTI_readin(), atmdat_LAMDA_readin(), atmdat_STOUT_readin(), FillExtraLymanLine(), diatomics::init(), iso_create(), lines_continuum(), lines_setup(), and read_UTA_lines().
| void set_xIntensity | ( | const TransitionProxy & | t | ) | 
Definition at line 811 of file lines_service.cpp.
References EmissionProxy::Aul(), TransitionProxy::chLabel(), t_rfield::convoc, DEBUG_ENTRY, TransitionProxy::Emis(), TransitionProxy::EnergyErg(), t_rfield::flux_isotropic, fprintf(), TransitionProxy::Hi(), ioQQQ, TransitionProxy::ipCont(), t_LineSave::lgIsoContSubSignif, t_save::lgSubtrCont, LineSave, TransitionProxy::Lo(), MAX2, MIN2, EmissionProxy::Pesc_total(), rfield, save, EmissionProxy::xIntensity(), and EmissionProxy::xObsIntensity().
Referenced by atom_level2(), dBase_solve(), H21_cm_pops(), diatomics::H2_LevelPops(), lines_helium(), and lines_hydro().

| double totlin | ( | int | chInfo | ) | 
totlin sum total intensity of cooling, recombination, or intensity lines
| chInfo | chInfor is 1 char, 'i' information, 'r' recombination or 'c' collision | 
Definition at line 711 of file lines_service.cpp.
References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), ioQQQ, t_LineSave::lines, LineSave, and t_LineSave::nsum.
Referenced by badprt(), lgConserveEnergy(), and PrtFinal().

WavlenErrorGet - given the real wavelength in A for a line routine will find the error expected between the real wavelength and the wavelength printed in the output, with 4 sig figs,
| wavelength | 
Definition at line 196 of file lines_service.cpp.
References ASSERT, DEBUG_ENTRY, exp10(), LineSave, and t_LineSave::sig_figs_max.
Referenced by debugLine(), t_LineSave::findline(), GetOptLineInt(), lgCheckMonitors(), and PrtFinal().

| realnum wlAirVac | ( | double | wlAir | ) | 
RefIndex compute wavelength in air or vacuum given hardcoded air wavelengths, option set by parse option PRINT WAVELENGTH VACUUM returns wavelength in air or vac, depending on this flag
| wlAir | - air wavelength | 
Definition at line 135 of file lines_service.cpp.
References DEBUG_ENTRY, t_prt::lgPrintLineAirWavelengths, and prt.
Referenced by LinSv::addComponent(), lines(), LinSv::makeBlend(), PrtComment(), and PrtFinal().
 1.8.5
 1.8.5