cloudy trunk
|
Go to the source code of this file.
Functions | |
bool | linfit (long n, double x[], double y[], double &a, double &siga, double &b, double &sigb) |
double | factorial (long n) |
double | lfactorial (long n) |
complex< double > | cdgamma (complex< double > x) |
double | bessel_j0 (double x) |
double | bessel_y0 (double x) |
double | bessel_j1 (double x) |
double | bessel_y1 (double x) |
double | bessel_jn (int n, double x) |
double | bessel_yn (int n, double x) |
double | bessel_k0 (double x) |
double | bessel_k0_scaled (double x) |
double | bessel_k1 (double x) |
double | bessel_k1_scaled (double x) |
double | bessel_i0 (double x) |
double | bessel_i0_scaled (double x) |
double | bessel_i1 (double x) |
double | bessel_i1_scaled (double x) |
double | ellpk (double x) |
double | expn (int n, double x) |
void | init_genrand (unsigned long s) |
void | init_by_array (unsigned long init_key[], int key_length) |
unsigned long | genrand_int32 (void) |
long | genrand_int31 (void) |
double | genrand_real1 (void) |
double | genrand_real2 (void) |
double | genrand_real3 (void) |
double | genrand_res53 (void) |
void | spline_cubic_set (long n, const double t[], const double y[], double ypp[], int ibcbeg, double ybcbeg, int ibcend, double ybcend) |
void | spline_cubic_val (long n, const double t[], double tval, const double y[], const double ypp[], double *yval, double *ypval, double *yppval) |
void | spline (const double x[], const double y[], long int n, double yp1, double ypn, double y2a[]) |
void | splint (const double xa[], const double ya[], const double y2a[], long int n, double x, double *y) |
void | spldrv (const double xa[], const double ya[], const double y2a[], long int n, double x, double *y) |
void | splint_safe (const double xa[], const double ya[], const double y2a[], long int n, double x, double *y, bool *lgOutOfBounds) |
void | spldrv_safe (const double xa[], const double ya[], const double y2a[], long int n, double x, double *y, bool *lgOutOfBounds) |
double | lagrange (const double x[], const double y[], long n, double xval) |
double | linint (const double x[], const double y[], long n, double xval) |
template<class T > | |
long | hunt_bisect (const T x[], long n, T xval) |
template<class T > | |
long | hunt_bisect_reverse (const T x[], long n, T xval) |
void | getrf_wrapper (long M, long N, double *A, long lda, int32 *ipiv, int32 *info) |
void | getrs_wrapper (char trans, long N, long nrhs, double *A, long lda, int32 *ipiv, double *B, long ldb, int32 *info) |
Variables | |
static const int | NPRE_FACTORIAL = 171 |
double bessel_i0 | ( | double | x | ) |
Definition at line 1700 of file thirdparty.cpp.
References chbevl(), DEBUG_ENTRY, i0_A, and i0_B.
Referenced by bessel_k0(), and bessel_k0_scaled().
double bessel_i0_scaled | ( | double | x | ) |
Definition at line 1717 of file thirdparty.cpp.
References chbevl(), DEBUG_ENTRY, i0_A, and i0_B.
double bessel_i1 | ( | double | x | ) |
Definition at line 1882 of file thirdparty.cpp.
References chbevl(), DEBUG_ENTRY, i1_A, and i1_B.
Referenced by bessel_k1(), and bessel_k1_scaled().
double bessel_i1_scaled | ( | double | x | ) |
Definition at line 1903 of file thirdparty.cpp.
References chbevl(), DEBUG_ENTRY, i1_A, and i1_B.
double bessel_j0 | ( | double | x | ) |
Definition at line 683 of file thirdparty.cpp.
References b0_PP, b0_PQ, b0_QP, b0_QQ, b0_RP, b0_RQ, DEBUG_ENTRY, DR1, DR2, p1evl(), PIO4, polevl(), and SQ2OPI.
Referenced by bessel_jn(), and bessel_y0().
double bessel_j1 | ( | double | x | ) |
Definition at line 914 of file thirdparty.cpp.
References b1_PP, b1_PQ, b1_QP, b1_QQ, b1_RP, b1_RQ, DEBUG_ENTRY, p1evl(), polevl(), SQ2OPI, THPIO4, Z1, and Z2.
Referenced by bessel_jn(), and bessel_y1().
double bessel_jn | ( | int | n, |
double | x | ||
) |
Definition at line 1017 of file thirdparty.cpp.
References bessel_j0(), bessel_j1(), DEBUG_ENTRY, and sign().
double bessel_k0 | ( | double | x | ) |
Definition at line 1333 of file thirdparty.cpp.
References bessel_i0(), cdEXIT, chbevl(), DEBUG_ENTRY, ioQQQ, k0_A, and k0_B.
Referenced by S62_Therm_ave_coll_str().
double bessel_k0_scaled | ( | double | x | ) |
Definition at line 1356 of file thirdparty.cpp.
References bessel_i0(), cdEXIT, chbevl(), DEBUG_ENTRY, ioQQQ, k0_A, and k0_B.
double bessel_k1 | ( | double | x | ) |
Definition at line 1509 of file thirdparty.cpp.
References bessel_i1(), cdEXIT, chbevl(), DEBUG_ENTRY, ioQQQ, k1_A, and k1_B.
Referenced by S62_Therm_ave_coll_str().
double bessel_k1_scaled | ( | double | x | ) |
Definition at line 1531 of file thirdparty.cpp.
References bessel_i1(), cdEXIT, chbevl(), DEBUG_ENTRY, ioQQQ, k1_A, and k1_B.
double bessel_y0 | ( | double | x | ) |
Definition at line 721 of file thirdparty.cpp.
References b0_PP, b0_PQ, b0_QP, b0_QQ, b0_YP, b0_YQ, bessel_j0(), cdEXIT, DEBUG_ENTRY, ioQQQ, p1evl(), PIO4, polevl(), SQ2OPI, and TWOOPI.
Referenced by bessel_yn().
double bessel_y1 | ( | double | x | ) |
Definition at line 941 of file thirdparty.cpp.
References b1_PP, b1_PQ, b1_QP, b1_QQ, b1_YP, b1_YQ, bessel_j1(), cdEXIT, DEBUG_ENTRY, ioQQQ, p1evl(), polevl(), SQ2OPI, THPIO4, and TWOOPI.
Referenced by bessel_yn().
double bessel_yn | ( | int | n, |
double | x | ||
) |
Definition at line 1151 of file thirdparty.cpp.
References bessel_y0(), bessel_y1(), cdEXIT, DEBUG_ENTRY, ioQQQ, and sign().
complex<double> cdgamma | ( | complex< double > | x | ) |
Definition at line 411 of file thirdparty.cpp.
References DEBUG_ENTRY.
Referenced by DoSutherland(), and Hypergeometric2F1().
double ellpk | ( | double | x | ) |
Definition at line 2015 of file thirdparty.cpp.
References C1, cdEXIT, DEBUG_ENTRY, elk_P, elk_Q, ioQQQ, and polevl().
Referenced by StarkCollTransProb_VF01().
double expn | ( | int | n, |
double | x | ||
) |
expn, returns exponential integral,
n | is order, 1 for first integral integral |
x | is argument, must be positive |
Definition at line 2094 of file thirdparty.cpp.
References BIG, cdEXIT, DEBUG_ENTRY, EULER, factorial(), ioQQQ, is_odd(), MAXLOG, and powi().
Referenced by SanityCheckBegin().
double factorial | ( | long | n | ) |
factorial: compute n! by lookup in table of predefined factorials
Definition at line 340 of file thirdparty.cpp.
References cdEXIT, DEBUG_ENTRY, ioQQQ, NPRE_FACTORIAL, and pre_factorial.
Referenced by bhg(), bhG(), DoSutherland(), expn(), fsff(), and hrii().
long genrand_int31 | ( | void | ) |
Definition at line 2549 of file thirdparty.cpp.
References next, next_state(), and nleft.
unsigned long genrand_int32 | ( | void | ) |
Definition at line 2532 of file thirdparty.cpp.
References next, next_state(), and nleft.
Referenced by genrand_res53().
double genrand_real1 | ( | void | ) |
Definition at line 2566 of file thirdparty.cpp.
References next, next_state(), and nleft.
double genrand_real2 | ( | void | ) |
Definition at line 2584 of file thirdparty.cpp.
References next, next_state(), and nleft.
double genrand_real3 | ( | void | ) |
Definition at line 2602 of file thirdparty.cpp.
References next, next_state(), and nleft.
Referenced by RandGauss().
double genrand_res53 | ( | void | ) |
Definition at line 2620 of file thirdparty.cpp.
References genrand_int32().
void getrf_wrapper | ( | long | M, |
long | N, | ||
double * | A, | ||
long | lda, | ||
int32 * | ipiv, | ||
int32 * | info | ||
) |
getrf_wrapper return value is zero for success, non-zero is error condition
M | |
N | |
*A | |
lda | |
*ipiv | |
*info |
Definition at line 47 of file thirdparty_lapack.cpp.
References ASSERT, DGETRF(), and INT32_MAX.
Referenced by atom_levelN(), atom_pop5(), AtomSeqBeryllium(), CO_solve(), FeIILevelPops(), hmole_step(), ion_solver(), iso_level(), oi_level_pops(), and SanityCheckBegin().
void getrs_wrapper | ( | char | trans, |
long | N, | ||
long | nrhs, | ||
double * | A, | ||
long | lda, | ||
int32 * | ipiv, | ||
double * | B, | ||
long | ldb, | ||
int32 * | info | ||
) |
getrs_wrapper return value is zero for success, non-zero is error condition
trans | |
N | |
nrhs | |
*A | |
lda | |
*ipiv | |
*B | |
ldb | |
*info |
Definition at line 69 of file thirdparty_lapack.cpp.
References ASSERT, DGETRS(), and INT32_MAX.
Referenced by atom_levelN(), atom_pop5(), AtomSeqBeryllium(), CO_solve(), FeIILevelPops(), hmole_step(), ion_solver(), iso_level(), oi_level_pops(), and SanityCheckBegin().
long hunt_bisect | ( | const T | x[], |
long | n, | ||
T | xval | ||
) | [inline] |
find index ilo such that x[ilo] <= xval < x[ilo+1] using bisection this version implicitly assumes that x is monotonically increasing
Definition at line 260 of file thirdparty.h.
Referenced by t_fe2ovr_la::fe2par(), GrainsInit(), iso_collapsed_bnl_set(), iso_dielec_recomb_rate(), linint(), qheat_init(), spline_cubic_val(), TempInterp(), TempInterp2(), and UpdatePot1().
long hunt_bisect_reverse | ( | const T | x[], |
long | n, | ||
T | xval | ||
) | [inline] |
find index ilo such that x[ilo] <= xval < x[ilo+1] using bisection this version implicitly assumes that x is monotonically decreasing
Definition at line 280 of file thirdparty.h.
void init_by_array | ( | unsigned long | init_key[], |
int | key_length | ||
) |
Definition at line 2484 of file thirdparty.cpp.
References init_genrand(), initf, N, nleft, and state.
void init_genrand | ( | unsigned long | s | ) |
Definition at line 2465 of file thirdparty.cpp.
References initf, N, nleft, and state.
Referenced by init_by_array(), next_state(), ParseAtomH2(), ParseAtomISO(), and ParseSet().
double lagrange | ( | const double | x[], |
const double | y[], | ||
long | n, | ||
double | xval | ||
) |
lagrange: do lagrange interpolation of order n on x[], y[] use with caution, especialy for high order n! using spline interpolation above is preferred
x[] | |
y[] | |
n | |
xval | do lagrange interpolation of order n on x[], y[] |
Definition at line 433 of file thirdparty_interpolate.cpp.
References DEBUG_ENTRY.
Referenced by TempInterp(), and TempInterp2().
double lfactorial | ( | long | n | ) |
lfactorial: compute log10(n!), this sroutine cahes its results for efficiency
Definition at line 383 of file thirdparty.cpp.
References cdEXIT, DEBUG_ENTRY, t_lfact::get_lfact(), Singleton< t_lfact >::Inst(), and ioQQQ.
Referenced by bhg_log(), bhG_mx(), hrii_log(), and log10_fsff().
bool linfit | ( | long | n, |
double | x[], | ||
double | y[], | ||
double & | a, | ||
double & | siga, | ||
double & | b, | ||
double & | sigb | ||
) |
Definition at line 45 of file thirdparty.cpp.
References DEBUG_ENTRY, and pow2().
Referenced by ConvEdenIoniz().
double linint | ( | const double | x[], |
const double | y[], | ||
long | n, | ||
double | xval | ||
) |
do linear interpolation on x[], y[]; it is assumed that x[] is strictly monotonically increasing
x[] | |
y[] | |
n | |
xval | do linear interpolation on x[], y[]; it is assumed that x[] is strictly monotonically increasing |
Definition at line 456 of file thirdparty_interpolate.cpp.
References ASSERT, DEBUG_ENTRY, and hunt_bisect().
Referenced by cross_section(), DynaEndIter(), and LeidenCollRate().
void spldrv | ( | const double | xa[], |
const double | ya[], | ||
const double | y2a[], | ||
long int | n, | ||
double | x, | ||
double * | y | ||
) | [inline] |
Definition at line 141 of file thirdparty.h.
References spline_cubic_val().
Referenced by spldrv_safe().
void spldrv_safe | ( | const double | xa[], |
const double | ya[], | ||
const double | y2a[], | ||
long int | n, | ||
double | x, | ||
double * | y, | ||
bool * | lgOutOfBounds | ||
) | [inline] |
Definition at line 196 of file thirdparty.h.
References DEBUG_ENTRY, MAX2, MIN2, SAFETY, and spldrv().
Referenced by GetProbDistr_LowLimit(), and qheat().
void spline | ( | const double | x[], |
const double | y[], | ||
long int | n, | ||
double | yp1, | ||
double | ypn, | ||
double | y2a[] | ||
) | [inline] |
spline: set of routines to do spline interpolation call spline first to set coefficients up, then call splint to interpolate spldrv gives dy/dx(x) rather than y(x) splint_safe and spldrv_safe check whether x is within bounds
x[] | - array of x values given |
y[] | - array of y values given |
n | - number of points in these arrays |
yp1 | some sort of boundary condition, set to 2e31 |
yp2 | some sort of boundary condition, set to 2e31 |
y2a[] | - array n long to save coefficients |
Definition at line 107 of file thirdparty.h.
References spline_cubic_set().
Referenced by atmdat_2phot_shapefunction(), atmdat_Chianti_readin(), hmiopc(), InitEmissivities(), and InitEnthalpy().
void spline_cubic_set | ( | long | n, |
const double | t[], | ||
const double | y[], | ||
double | ypp[], | ||
int | ibcbeg, | ||
double | ybcbeg, | ||
int | ibcend, | ||
double | ybcend | ||
) |
Definition at line 105 of file thirdparty_interpolate.cpp.
References ASSERT, cdEXIT, d3_np_fs(), DEBUG_ENTRY, ioQQQ, and MALLOC.
Referenced by spline().
void spline_cubic_val | ( | long | n, |
const double | t[], | ||
double | tval, | ||
const double | y[], | ||
const double | ypp[], | ||
double * | yval, | ||
double * | ypval, | ||
double * | yppval | ||
) |
Definition at line 331 of file thirdparty_interpolate.cpp.
References DEBUG_ENTRY, and hunt_bisect().
Referenced by spldrv(), and splint().
void splint | ( | const double | xa[], |
const double | ya[], | ||
const double | y2a[], | ||
long int | n, | ||
double | x, | ||
double * | y | ||
) | [inline] |
splint: do spline interpolation
x[] | - array of x values given |
y[] | - array of y valus |
y2a[] | - array of save values found above |
n | - number of points in these arrays |
x | value where x is desired |
y2a[] | - array n long to save coefficients |
Definition at line 130 of file thirdparty.h.
References spline_cubic_val().
Referenced by atmdat_2phot_shapefunction(), Chianti_Upsilon(), hmiopc(), InitEmissivities(), and splint_safe().
void splint_safe | ( | const double | xa[], |
const double | ya[], | ||
const double | y2a[], | ||
long int | n, | ||
double | x, | ||
double * | y, | ||
bool * | lgOutOfBounds | ||
) | [inline] |
Definition at line 156 of file thirdparty.h.
References DEBUG_ENTRY, MAX2, MIN2, SAFETY, and splint().
Referenced by GetProbDistr_HighLimit(), GetProbDistr_LowLimit(), GrainChargeTemp(), GrainTemperature(), inv_ufunct(), RebinQHeatResults(), TryDoubleStep(), and ufunct().
const int NPRE_FACTORIAL = 171 [static] |
number of predefined factorials, so largest factorial that can be represented as double is (NPRE_FACTORIAL-1)!
Definition at line 24 of file thirdparty.h.
Referenced by factorial(), and H_photo_cs_lin().