|
Cloudy
Spectral Synthesis Code for Astrophysics
|
#include "cddefines.h"#include "hydro_bauman.h"#include "thirdparty.h"#include "dense.h"#include "hydro_tbl.h"#include "vectorize.h"#include "iso.h"#include "service.h"
Classes | |
| struct | mx |
| struct | mxq |
Functions | |
| double | exp10i (long x) |
| double | H_photo_cs_log10 (double photon_energy, long int n, long int l, long int iz) |
| double | H_Einstein_A_log10 (long int n, long int l, long int np, long int lp, long int iz, double mass_nuc) |
| double | hv (long int n, long int nprime, long int iz, double mass_nuc) |
| STATIC double | fsff_log10 (long int n, long int l, long int np) |
| STATIC mx | F21_mx (long int a, long int b, long int c, double y, mx &Fa_plus, char ab) |
| STATIC mx | F21i_log (long int a, long int b, long int c, double y, mx &Fap2) |
| double | hri_log10 (long int n, long int l, long int np, long int lp, long int iz, double mass_nuc) |
| STATIC double | hrii_log (long int n, long int l, long int np, long int lp) |
| STATIC double | bh_log (double k, long int n, long int l, mxq *rcsvV_mxq) |
| STATIC double | bhintegrand_log (double k, long int n, long int l, long int lp, mxq *rcsvV_mxq) |
| STATIC mx | bhG_mx (double K, long int n, long int l, long int lp, mxq *rcsvV_mxq) |
| STATIC mx | bhGp_mx (long int q, double K, long int n, long int l, long int lp, mxq *rcsvV_mxq, const mx &GK_mx) |
| STATIC mx | bhGm_mx (long int q, double K, long int n, long int l, long int lp, mxq *rcsvV_mxq, const mx &GK_mx) |
| STATIC double | bhg_log (double K, long int n, long int l, long int lp, mxq *rcsvV_mxq) |
| void | normalize_mx (mx &target) |
| mx | add_mx (const mx &a, const mx &b) |
| mx | sub_mx (const mx &a, const mx &b) |
| mx | mxify (double a) |
| double | unmxify (const mx &a_mx) |
| mx | mxify_log10 (double log10_a) |
| mx | mult_mx (const mx &a, const mx &b) |
| double | prodxx_log10 (long int lp, double Ksqrd) |
| double | H_photo_cs (double rel_photon_energy, long int n, long int l, long int iz) |
| STATIC double | reduced_mass_rel (double mass_nuc) |
| realnum | H_Einstein_A (long int n, long int l, long int np, long int lp, long int iz) |
Variables | |
| static const int | maxe = 100 |
| static const double | maxm = 1.e100 |
| static const double | CONST_ONE = 32.*pow3(PI)*pow2(BOHR_RADIUS_CM)*FINE_STRUCTURE/(3.*pow2(SPEEDLIGHT)) |
| static const double | PHYSICAL_CONSTANT_TWO = 4./3.*PI*FINE_STRUCTURE*pow2(BOHR_RADIUS_CM) |
References exp10i(), mx::m, normalize_mx(), and mx::x.
Referenced by sub_mx().

References ASSERT, bhintegrand_log(), and DEBUG_ENTRY.
Referenced by H_photo_cs_log10().

References ASSERT, bhG_mx(), DEBUG_ENTRY, lfactorial(), mult_mx(), mxify_log10(), normalize_mx(), prodxx_log10(), and unmxify().
Referenced by bhintegrand_log().

References ASSERT, bhGm_mx(), bhGp_mx(), cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, lfactorial(), and mxify_log10().
Referenced by bhg_log().

| STATIC mx bhGm_mx | ( | long int | q, |
| double | K, | ||
| long int | n, | ||
| long int | l, | ||
| long int | lp, | ||
| mxq * | rcsvV_mxq, | ||
| const mx & | GK_mx | ||
| ) |
References ASSERT, DEBUG_ENTRY, mult_mx(), mxq::mx, mxify(), normalize_mx(), mxq::q, and sub_mx().
Referenced by bhG_mx().

| STATIC mx bhGp_mx | ( | long int | q, |
| double | K, | ||
| long int | n, | ||
| long int | l, | ||
| long int | lp, | ||
| mxq * | rcsvV_mxq, | ||
| const mx & | GK_mx | ||
| ) |
References ASSERT, DEBUG_ENTRY, mult_mx(), mxq::mx, mxify(), normalize_mx(), mxq::q, and sub_mx().
Referenced by bhG_mx().

|
inline |
References ASSERT, DEBUG_ENTRY, F21i_log(), and TotalInsanity().
Referenced by hrii_log().

| STATIC double fsff_log10 | ( | long int | n, |
| long int | l, | ||
| long int | np | ||
| ) |
References ASSERT, DEBUG_ENTRY, and lfactorial().
Referenced by hrii_log().

| realnum H_Einstein_A | ( | long int | n, |
| long int | l, | ||
| long int | np, | ||
| long int | lp, | ||
| long int | iz | ||
| ) |
Calculates the Einstein A's for hydrogen
for the transition n,l --> n',l'
units of sec^(-1)
In the following, we have n > n' | n | principal quantum number, 1 for ground, upper level |
| l | angular momentum, 0 for s |
| np | principal quantum number, 1 for ground, lower level |
| lp | angular momentum, 0 for s |
| iz | Nuclear charge, 1 for H+, 2 for He++, etc |
References ASSERT, t_dense::AtomicWeight, t_iso_sp::CachedAs, DEBUG_ENTRY, dense, H_Einstein_A_log10(), Singleton< t_hydro_tbl >::Inst(), ipH_LIKE, iso_sp, LIMELM, and t_hydro_tbl::tp().
Referenced by FillExtraLymanLine(), he_1trans(), hydro_transprob(), hydro_transprob_collapsed_to_resolved(), and SanityCheckBegin().

| double H_Einstein_A_log10 | ( | long int | n, |
| long int | l, | ||
| long int | np, | ||
| long int | lp, | ||
| long int | iz, | ||
| double | mass_nuc | ||
| ) |
Calculates the Einstein A's for hydrogen for the transition n,l --> n',l' units of sec^(-1) In the following, we have n > n'
| n | principal quantum number, 1 for ground, upper level |
| l | angular momentum, 0 for s |
| np | principal quantum number, 1 for ground, lower level |
| lp | angular momentum, 0 for s |
| iz | Nuclear charge, 1 for H+, 2 for He++, etc |
References cdEXIT, CONST_ONE, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), hri_log10(), hv(), ioQQQ, and pow3().
Referenced by H_Einstein_A().

| double H_photo_cs | ( | double | photon_energy, |
| long int | n, | ||
| long int | l, | ||
| long int | iz | ||
| ) |
returns hydrogenic photoionization cross section in cm^2
| photon_energy | photon energy relative to threshold |
| n | principal quantum number, 1 for ground |
| l | angular momentum, 0 for s |
| iz | charge, 1 for H+, 2 for He++, etc |
References t_hydro_tbl::cs(), DEBUG_ENTRY, H_photo_cs_log10(), and Singleton< t_hydro_tbl >::Inst().
Referenced by cross_section(), H_cross_section(), Opacity_iso_photo_cs(), and SanityCheckBegin().

| double H_photo_cs_log10 | ( | double | photon_energy, |
| long int | n, | ||
| long int | l, | ||
| long int | iz | ||
| ) |
************************* for LOG version of the file ***************************************
In this version, quantities that would normal cause a 64-bit floating point processor
to underflowed or overflow on intermediate values (ones internal to the calculation)
are evaluated using logs. This allows us to use an upper principal quantum number `n'
greater than 50 which is where the other version begins to fail. The trade-off is,
of course, lower accuracy( or is it precision ) and perhaps speed.
We use LOG_10 for convenience.
**********************************************************************************************
The functions which are evaluated using logarithms are denoted with a trailing underscore.
example: hri_() calculates the same thing as hri_log10()
except it uses logs internally.
**********************************************************************************************
these are the hydrogenic routines written by Robert Bauman
For references, see h_bauman.c
**********************************************************************************************
IN THE FOLLOWING WE HAVE n > n'
| photon_energy | incident photon energy |
| n | principal quantum number, 1 for ground |
| l | angular momentum, 0 for s |
| iz | charge, 1 for H+, 2 for He++, etc |
References ASSERT, bh_log(), cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), get_ptr(), ioQQQ, MAX2, and PHYSICAL_CONSTANT_TWO.
Referenced by H_photo_cs().

|
inline |
This routine, hri_log10(), calculates the hydrogen radial integral, for the transition n,l --> n',l' It is, of course, dimensionless. In the following, we have n > n'
| n | principal quantum number, 1 for ground, upper level |
| l | angular momentum, 0 for s |
| np | principal quantum number, 1 for ground, lower level |
| lp | angular momentum, 0 for s |
| iz | Nuclear charge, 1 for H+, 2 for He++, etc |
| mass_nuc | nuclear mass, in g |
References ASSERT, cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, hrii_log(), and reduced_mass_rel().
Referenced by H_Einstein_A_log10().

| STATIC double hrii_log | ( | long int | n, |
| long int | l, | ||
| long int | np, | ||
| long int | lp | ||
| ) |
References ASSERT, DEBUG_ENTRY, exp10(), exp10i(), F21_mx(), fsff_log10(), lfactorial(), mx::m, maxe, maxm, powi(), and mx::x.
Referenced by hri_log10().

|
inline |
References ASSERT, DEBUG_ENTRY, and reduced_mass_rel().
Referenced by H_Einstein_A_log10().

|
inline |
References mx::m, normalize_mx(), and mx::x.
Referenced by bhGm_mx(), and bhGp_mx().

|
inline |
|
inline |
|
inline |
References avx_ptr< T, lgBC >::ptr0(), reduce_a(), and vlog10().
Referenced by bhg_log().

|
inline |
References ASSERT, and DEBUG_ENTRY.
Referenced by hri_log10(), and hv().
References add_mx(), mx::m, and normalize_mx().
Referenced by bhGm_mx(), and bhGp_mx().

|
inline |
|
static |
Referenced by H_Einstein_A_log10().
|
static |
Referenced by F21i_log(), hrii_log(), mxify_log10(), normalize_mx(), and solve_system().
|
static |
Referenced by F21i_log(), hrii_log(), and normalize_mx().
|
static |
Referenced by H_photo_cs_log10().