133 double rel_photon_energy,
166 double photon_energy,
537 inline double log10_prodxx(
long int lp,
double Ksqrd );
574 double rel_photon_energy,
604 double rel_photon_energy,
620 double electron_energy;
622 double xn_sqrd = (double)(n*n);
623 double z_sqrd = (double)(iz*iz);
624 double Z = (double)iz;
629 if( rel_photon_energy < 1.+FLT_EPSILON )
635 if( n < 1 || l >= n )
637 fprintf(
ioQQQ,
" The quantum numbers are impossible.\n");
650 electron_energy = (rel_photon_energy-1.) * (z_sqrd/xn_sqrd);
651 k = sqrt( ( electron_energy ) );
655 dim_rcsvV = (((n * 2) - 1) + 1);
657 for( i=0; i<dim_rcsvV; ++i )
675 double rel_photon_energy,
686 long int dim_rcsvV_mxq;
688 double electron_energy;
691 double xn_sqrd = (double)(n*n);
692 double z_sqrd = (double)(iz*iz);
693 double Z = (double)iz;
698 if( rel_photon_energy < 1.+FLT_EPSILON )
701 fprintf(
ioQQQ,
"PROBLEM IN HYDRO_BAUMAN: rel_photon_energy, n, l, iz: %e\t%li\t%li\t%li\n",
708 if( n < 1 || l >= n )
710 fprintf(
ioQQQ,
" The quantum numbers are impossible.\n");
716 electron_energy = (rel_photon_energy-1.) * (z_sqrd/xn_sqrd);
718 k = sqrt( ( electron_energy ) );
724 dim_rcsvV_mxq = (((n * 2) - 1) + 1);
727 vector<mxq> rcsvV_mxq(dim_rcsvV_mxq);
733 t1 =
MAX2( t1, 1.0e-250 );
739 fprintf(
ioQQQ,
"PROBLEM: Hydro_Bauman...t1\t%e\n", t1 );
768 for( lp = l - 1; lp <= l + 1; lp = lp + 2 )
805 for( lp = l - 1; lp <= l + 1; lp = lp + 2 )
848 double Two_L_Plus_One = (double)(2*l + 1);
849 double lg = (double)
max(l,lp);
851 double n2 = (double)(n*n);
853 double Ksqrd = (K*K);
867 double d2 = 1. + n2*Ksqrd;
868 double d5 =
bhg( K, n, l, lp, rcsvV );
869 double Theta = d2 * d5 * d5;
870 double d7 = (lg/Two_L_Plus_One) * Theta;
872 ASSERT( Two_L_Plus_One != 0. );
930 double n2 = (double)(n*n);
931 double Ksqrd = (K*K);
932 double Two_L_Plus_One = (double)(2*l + 1);
933 double lg = (double)
max(l,lp);
939 ASSERT( Two_L_Plus_One != 0. );
957 d2 = ( 1. + n2 * (Ksqrd) );
961 d5 =
bhg_log( K, n, l, lp, rcsvV_mxq );
963 d5 =
MAX2( d5, 1.0E-150 );
966 Theta = d2 * d5 * d5;
969 d7 = (lg/Two_L_Plus_One) * Theta;
1023 double n1 = (double)n;
1024 double n2 = (double)(n * n);
1025 double Ksqrd = K * K;
1028 double ld2 =
powi((
double)(4*n), n);
1029 double ld3 = exp(-(
double)(2 * n));
1039 double G0 = SQRTPIBY2 * (8. * n1 * ld2 * ld3) / ld1;
1041 double d1 = sqrt( 1. - exp(( -2. * PI )/ K ));
1042 double d2 =
powi(( 1. + (n2 * Ksqrd)), ( n + 2 ));
1043 double d3 = atan( n1 * K );
1044 double d4 = ((2. / K) * d3);
1045 double d5 = (double)( 2 * n );
1046 double d6 = exp( d5 - d4 );
1047 double GK = ( d6 /( d1 * d2 ) ) * G0;
1050 ASSERT( (l == lp - 1) || (l == lp + 1) );
1055 ASSERT( ((2*n) - 1) < 1755 );
1056 ASSERT( ((2*n) - 1) >= 0 );
1058 ASSERT( (1.0 / ld1) != 0. );
1083 double result =
bhGm( l, K, n, l, lp, rcsvV, GK );
1090 else if( l == lp + 1 )
1092 double result =
bhGp( l, K, n, l, lp, rcsvV, GK );
1099 printf(
"BadMagic: l and l' do NOT satisfy dipole requirements.\n\n" );
1117 double log10_GK = 0.;
1118 double log10_G0 = 0.;
1120 double d1 = 0., d2 = 0., d3 = 0., d4 = 0., d5 = 0., d6 = 0.;
1121 double ld1 = 0., ld2 = 0., ld3 = 0., ld4 = 0., ld5 = 0., ld6 = 0.;
1123 double n1 = (double)n;
1124 double n2 = n1 * n1;
1125 double Ksqrd = K * K;
1130 ASSERT( (l == lp - 1) || (l == lp + 1) );
1135 ASSERT( ((2*n) - 1) >= 0 );
1168 ld2 = n1 * log10( 4. * n1 );
1176 ld3 = (-(2. * n1)) * (LOG10_E);
1187 log10_G0 = log10(SQRTPIBY2 * 8. * n1) + ( (ld2 + ld3) - ld1);
1206 d1 = (1. - exp(-(2. * PI )/ K ));
1207 ld4 = (1./2.) * log10( d1 );
1218 d2 = ( 1. + (n2 * Ksqrd));
1219 ld5 = (n1 + 2.) * log10( d2 );
1232 d3 = atan( n1 * K );
1240 d5 = (double) ( 2. * n1 );
1259 log10_GK = (ld6 -(ld4 + ld5)) + log10_G0;
1260 ASSERT( log10_GK != 0. );
1267 mx result_mx =
bhGm_mx( l, K, n, l, lp, rcsvV_mxq , GK_mx );
1273 else if( l == lp + 1 )
1275 mx result_mx =
bhGp_mx( l, K, n, l, lp, rcsvV_mxq , GK_mx );
1282 printf(
"BadMagic: l and l' do NOT satisfy dipole requirements.\n\n" );
1285 printf(
"This code should be inaccessible\n\n" );
1341 long int rindx = 2*q;
1343 if( rcsvV[rindx] == 0. )
1348 double Ksqrd = K * K;
1349 double n2 = (double)(n*n);
1351 double dd1 = (double)(2 * n);
1352 double dd2 = ( 1. + ( n2 * Ksqrd));
1357 double G1 = ((dd2 * GK) / dd1);
1369 else if( q == (n - 2) )
1371 double Ksqrd = (K*K);
1372 double n2 = (double)(n*n);
1377 double dd1 = (double) (2 * n);
1378 double dd2 = ( 1. + ( n2 * Ksqrd));
1379 double G1 = ((dd2 * GK) / dd1);
1384 double dd3 = (double)((2 * n) - 1);
1385 double dd4 = (double)(n - 1);
1386 double dd5 = (4. + (dd4 * dd2));
1387 double G2 = (dd3 * dd5 * G1);
1418 long int lp1 = (q + 1);
1419 long int lp2 = (q + 2);
1421 double Ksqrd = (K*K);
1422 double n2 = (double)(n * n);
1423 double lp1s = (double)(lp1 * lp1);
1424 double lp2s = (double)(lp2 * lp2);
1426 double d1 = (4. * n2);
1427 double d2 = (4. * lp1s);
1428 double d3 = (double)((lp1)*((2 * q) + 3));
1429 double d4 = (1. + (n2 * Ksqrd));
1430 double d5 = (d1 - d2 + (d3 * d4));
1431 double d5_1 = d5 *
bhGp( (q+1), K, n, l, lp, rcsvV, GK );
1438 double d6 = (n2 - lp2s);
1439 double d7 = (1. + (lp1s * Ksqrd));
1440 double d8 = (d1 * d6 * d7);
1441 double d8_1 = d8 *
bhGp( (q+2), K, n, l, lp, rcsvV, GK );
1442 double d9 = (d5_1 - d8_1);
1467 ASSERT( rcsvV[rindx] != 0. );
1468 return rcsvV[rindx];
1492 long int rindx = 2*q;
1494 if( rcsvV_mxq[rindx].q == 0 )
1505 double Ksqrd = (K * K);
1506 double n2 = (double)(n*n);
1508 double dd1 = (double) (2 * n);
1509 double dd2 = ( 1. + ( n2 * Ksqrd));
1510 double dd3 = dd2/dd1;
1523 rcsvV_mxq[rindx].
q = 1;
1524 rcsvV_mxq[rindx].
mx = G1_mx;
1528 else if( q == (n - 2) )
1540 double Ksqrd = (K*K);
1541 double n2 = (double)(n*n);
1542 double dd1 = (double)(2 * n);
1543 double dd2 = ( 1. + ( n2 * Ksqrd) );
1544 double dd3 = (dd2/dd1);
1545 double dd4 = (double) ((2 * n) - 1);
1546 double dd5 = (double) (n - 1);
1547 double dd6 = (4. + (dd5 * dd2));
1548 double dd7 = dd4 * dd6;
1574 rcsvV_mxq[rindx].
q = 1;
1575 rcsvV_mxq[rindx].
mx = G2_mx;
1593 long int lp1 = (q + 1);
1594 long int lp2 = (q + 2);
1596 double Ksqrd = (K * K);
1597 double n2 = (double)(n * n);
1598 double lp1s = (double)(lp1 * lp1);
1599 double lp2s = (double)(lp2 * lp2);
1601 double d1 = (4. * n2);
1602 double d2 = (4. * lp1s);
1603 double d3 = (double)((lp1)*((2 * q) + 3));
1604 double d4 = (1. + (n2 * Ksqrd));
1606 double d5 = d1 - d2 + (d3 * d4);
1609 double d6 = (n2 - lp2s);
1612 double d7 = (1. + (lp1s * Ksqrd));
1615 double d8 = (d1 * d6 * d7);
1626 mx t0_mx =
bhGp_mx( (q+1), K, n, l, lp, rcsvV_mxq, GK_mx );
1627 mx t1_mx =
bhGp_mx( (q+2), K, n, l, lp, rcsvV_mxq, GK_mx );
1632 mx result_mx =
sub_mx( d9_mx, d10_mx );
1650 rcsvV_mxq[rindx].
q = 1;
1651 rcsvV_mxq[rindx].
mx = result_mx;
1657 ASSERT( rcsvV_mxq[rindx].q != 0 );
1658 rcsvV_mxq[rindx].
q = 1;
1659 return rcsvV_mxq[rindx].
mx;
1698 #if defined (__ICC) && defined(__amd64) && __INTEL_COMPILER < 1000
1699 #pragma optimize("", off)
1716 long int rindx = 2*q+1;
1718 if( rcsvV[rindx] == 0. )
1728 else if( q == n - 2 )
1756 dd1 = (double) ((2 * n) - 1);
1759 dd2 = (1. + (n2 * Ksqrd));
1762 G2 = dd1 * dd2 * n1 * GK;
1771 long int lp2 = (q + 2);
1772 long int lp3 = (q + 3);
1774 double lp2s = (double)(lp2 * lp2);
1775 double lp3s = (double)(lp3 * lp3);
1790 double Ksqrd = (K*K);
1791 double n2 = (double)(n*n);
1792 double d1 = (4. * n2);
1793 double d2 = (4. * lp2s);
1794 double d3 = (double)(lp2)*((2*q)+3);
1795 double d4 = (1. + (n2 * Ksqrd));
1797 double d5 = d1 - d2 + (d3 * d4);
1805 double d6 = (n2 - lp2s);
1807 double d7 = (1. + (lp3s * Ksqrd));
1809 double d8 = d1 * d6 * d7;
1810 double d9 = d5 *
bhGm( (q+1), K, n, l, lp, rcsvV, GK );
1811 double d10 = d8 *
bhGm( (q+2), K, n, l, lp, rcsvV, GK );
1812 double d11 = d9 - d10;
1836 ASSERT( rcsvV[rindx] != 0. );
1837 return rcsvV[rindx];
1840 #if defined (__ICC) && defined(__amd64) && __INTEL_COMPILER < 1000
1841 #pragma optimize("", on)
1863 long int rindx = 2*q+1;
1865 if( rcsvV_mxq[rindx].q == 0 )
1870 mx result_mx = GK_mx;
1873 rcsvV_mxq[rindx].
q = 1;
1874 rcsvV_mxq[rindx].
mx = result_mx;
1880 else if( q == n - 2 )
1882 double Ksqrd = (K * K);
1883 double n1 = (double)n;
1884 double n2 = (double) (n*n);
1885 double dd1 = (double)((2 * n) - 1);
1886 double dd2 = (1. + (n2 * Ksqrd));
1888 double dd3 = (dd1*dd2*n1);
1908 rcsvV_mxq[rindx].
q = 1;
1909 rcsvV_mxq[rindx].
mx = G2_mx;
1927 long int lp2 = (q + 2);
1928 long int lp3 = (q + 3);
1930 double lp2s = (double)(lp2 * lp2);
1931 double lp3s = (double)(lp3 * lp3);
1932 double n2 = (double)(n*n);
1933 double Ksqrd = (K * K);
1939 double d1 = (4. * n2);
1940 double d2 = (4. * lp2s);
1941 double d3 = (double)(lp2)*((2*q)+3);
1942 double d4 = (1. + (n2 * Ksqrd));
1944 double d5 = d1 - d2 + (d3 * d4);
1952 double d6 = (n2 - lp2s);
1953 double d7 = (1. + (lp3s * Ksqrd));
1955 double d8 = d1 * d6 * d7;
1965 mx d9_mx =
bhGm_mx( (q+1), K, n, l, lp, rcsvV_mxq, GK_mx );
1966 mx d10_mx =
bhGm_mx( (q+2), K, n, l, lp, rcsvV_mxq, GK_mx );
1969 mx result_mx =
sub_mx( d11_mx , d12_mx );
1970 rcsvV_mxq[rindx].
q = 1;
1971 rcsvV_mxq[rindx].
mx = result_mx;
1992 ASSERT( rcsvV_mxq[rindx].q != 0 );
1993 return rcsvV_mxq[rindx].
mx;
2072 double ld3 = (ld1 / ld2);
2093 double d2 = sqrt( ld3 * partprod );
2094 double d3 =
powi( (2 * n) , (l - n) );
2095 double d4 =
bhG( K, n, l, lp, rcsvV );
2096 double d5 = (d2 * d3);
2097 double d6 = (d5 * d4);
2101 ASSERT( ((n-l)-1) >= 0 );
2103 ASSERT( partprod != 0. );
2139 double d1 = (double)(2*n);
2140 double d2 = (double)(l-n);
2141 double Ksqrd = (K*K);
2188 double ld4 = (1./2.) * ( ld3 + ld1 - ld2 );
2196 double ld5 = d2 * log10( d1 );
2216 double ld6 = (ld5+ld4);
2219 mx dd1_mx =
bhG_mx( K, n, l, lp, rcsvV_mxq );
2222 double result =
unmxify( dd2_mx );
2229 ASSERT( result > 0. || (result==0. && l > 50 && K > 1.) );
2243 double Ksqrd =(K*K);
2244 double partprod = 1.;
2246 for( s = 0; s <= lp; s = s + 1 )
2248 double s2 = (double)(s*s);
2258 partprod *= ( 1. + ( s2 * Ksqrd ) );
2282 return 1./(1. + ELECTRON_MASS/mass_nuc);
2376 mass_nuc = PROTON_MASS;
2385 if( n > 60 || np > 60 )
2423 double d1 =
hv( n, np, iz, mass_nuc );
2424 double d2 = d1 / HPLANCK;
2425 double d3 =
pow3(d2);
2426 double lg = (double)(l > lp ? l : lp);
2427 double Two_L_Plus_One = (double)(2*l + 1);
2428 double d6 = lg / Two_L_Plus_One;
2429 double d7 =
hri( n, l, np, lp , iz, mass_nuc );
2430 double d8 = d7 * d7;
2431 double result =
CONST_ONE * d3 * d6 * d8;
2454 fprintf(
ioQQQ,
"Principal Quantum Number `n' too large.\n");
2462 if( n < 1 || np < 1 || l >= n || lp >= np )
2464 fprintf(
ioQQQ,
" The quantum numbers are impossible.\n");
2469 fprintf(
ioQQQ,
" The principal quantum numbers are such that n <= n'.\n");
2488 double d1 =
hv( n, np , iz, mass_nuc );
2489 double d2 = d1 / HPLANCK;
2490 double d3 =
pow3(d2);
2491 double lg = (double)(l > lp ? l : lp);
2492 double Two_L_Plus_One = (double)(2*l + 1);
2493 double d6 = lg / Two_L_Plus_One;
2494 double d7 =
hri_log10( n, l, np, lp , iz, mass_nuc );
2495 double d8 = d7 * d7;
2496 double result =
CONST_ONE * d3 * d6 * d8;
2522 if( n < 1 || np < 1 || l >= n || lp >= np )
2524 fprintf(
ioQQQ,
" The quantum numbers are impossible.\n");
2529 fprintf(
ioQQQ,
" The principal quantum numbers are such that n <= n'.\n");
2583 inline double hv(
long int n,
long int nprime,
long int iz,
double mass_nuc )
2587 double n1 = (double)n;
2589 double np1 = (double)nprime;
2590 double np2 = np1*np1;
2592 double izsqrd = (double)(iz*iz);
2594 double d1 = 1. / n2;
2595 double d2 = 1. / np2;
2596 double d3 = izsqrd * rmr * EN1RYD;
2597 double d4 = d2 - d1;
2598 double result = d3 * d4;
2608 fprintf(
ioQQQ,
" The principal quantum numbers are such that n <= n'.\n");
2670 double Z = (double)iz;
2684 ASSERT( n > np || ( n == np && l == lp + 1 ));
2686 ASSERT( lp == l + 1 || lp == l - 1 );
2697 else if( l == lp - 1 )
2707 printf(
"BadMagic: l and l' do NOT satisfy dipole requirements.\n\n" );
2746 inline double hri_log10(
long int n,
long int l,
long int np,
long int lp ,
long int iz,
2762 double Z = (double)iz;
2770 ASSERT( n > np || ( n == np && l == lp + 1 ));
2772 ASSERT( lp == l + 1 || lp == l - 1 );
2783 else if( l == lp - 1 )
2793 printf(
"BadMagic: l and l' do NOT satisfy dipole requirements.\n\n" );
2807 STATIC double hrii(
long int n,
long int l,
long int np,
long int lp)
2820 long int a = 0, b = 0, c = 0;
2821 long int i1 = 0, i2 = 0, i3 = 0, i4 = 0;
2827 double d1 = 0., d2 = 0., d3 = 0., d4 = 0., d5 = 0., d6 = 0., d7 = 0.;
2828 double d8 = 0., d9 = 0., d10 = 0., d11 = 0., d12 = 0., d13 = 0., d14 = 0.;
2829 double d00 = 0., d01 = 0.;
2843 printf(
"BadMagic: Energy requirements not met.\n\n" );
2850 d5 = (double)(i1 - i2);
2852 d7 = (double)n * d6;
2856 else if( l == np && lp == (l - 1) )
2867 d1 = (double)( 2*n - 2 );
2868 d2 = (double)( 2*n - 1 );
2872 d5 = (double)(4 * n * (n - 1));
2874 d6 = (double)(i1 * i1);
2884 d12 = d4 * d8 * d11;
2898 for( i1 = -l; i1 <= l; i1 = i1 + 1 )
2900 d1 = (double)(n - i1);
2909 d5 = (double)( 4. * n * l );
2911 d6 = (double)( i3 * i3 );
2913 d8 =
powi( d7, l+1 );
2917 d9 = (double)( i3 ) / (double)( i4 );
2918 d10 =
powi( d9 , i4 );
2925 d14 = d4 * d8 * d10 * d13;
2963 else if( lp == l + 1 )
2972 printf(
" BadMagic: Don't know what to do here.\n\n");
2989 fsf =
fsff( n, l, np );
3033 d2 = (double)(n - np);
3036 d5 = (double)(n * np);
3041 d00 =
F21( a, b, c, y, A );
3094 d01 =
F21(a, b, c, y, A );
3103 d1 =
pow2( (
double)i1 );
3105 d2 =
pow2( (
double)i2 );
3142 double log10_fsf = 0.;
3156 printf(
"BadMagic: l'= l+1 for n'= n.\n\n" );
3167 long int i1 = n * n;
3168 long int i2 = l * l;
3170 double d1 = 3. / 2.;
3171 double d2 = (double)n;
3172 double d3 = (double)(i1 - i2);
3173 double d4 = sqrt(d3);
3174 double result = d1 * d2 * d4;
3180 else if( l == np && lp == l - 1 )
3191 double d1 = (double)((2*n-2)*(2*n-1));
3192 double d2 = sqrt( d1 );
3193 double d3 = (double)(4*n*(n-1));
3194 double d4 = (double)(2*n-1);
3197 double d8 =
powi(d7,n);
3199 double d10 = d4 - d9;
3200 double d11 = 0.25*d10;
3201 double result = (d2 * d8 * d11);
3210 double ld1 = 0., ld2 = 0., ld3 = 0., ld4 = 0., ld5 = 0., ld6 = 0., ld7 = 0.;
3231 for(
long int i1 = (n-l); i1 <= (n+l); i1++ )
3233 double d1 = (double)(i1);
3253 ld3 = 0.5 * (ld1 - ld2);
3265 double d1 = (double)(l+1);
3266 double d2 = (double)(4*n*l);
3267 double d3 = (double)(n-l);
3268 double d4 = log10(d2);
3269 double d5 = log10(d3);
3271 ld4 = d1 * (d4 - 2.*d5);
3287 ld5 = d2 * (d3 - d4);
3300 double d6 = 0.25*d5;
3311 ld7 = ld3 + ld4 + ld5 + ld6;
3313 result =
exp10( ld7 );
3322 long int a = 0, b = 0, c = 0;
3323 double d1 = 0., d2 = 0., d3 = 0., d4 = 0., d5 = 0., d6 = 0., d7 = 0.;
3324 mx d00, d01, d02, d03;
3333 else if( lp == l + 1 )
3342 printf(
" BadMagic: Don't know what to do here.\n\n");
3423 d2 = (double)(n - np);
3427 d5 = (double)(n * np);
3460 d00 =
F21_mx( a, b, c, y, A );
3513 d01 =
F21_mx(a, b, c, y, A );
3538 d1 = (double)((n - np)*(n -np));
3539 d2 = (double)((n + np)*(n + np));
3545 while ( fabs(d02.
m) > 1.0e+25 )
3552 d03.
m = d00.
m * (1. - (d02.
m/d00.
m) *
powi( 10. , (d02.
x - d00.
x) ) );
3554 result =
exp10( (log10_fsf + d03.
x) ) * d03.
m;
3559 return fabs(result);
3562 printf(
" This code should be inaccessible\n\n");
3581 long int i0 = 0, i1 = 0, i2 = 0, i3 = 0, i4 = 0;
3582 double d0 = 0., d1 = 0., d2 = 0., d3 = 0., d4 = 0., d5 = 0.;
3608 printf(
"BadMagic: Relational error amongst n, l, n' and l'\n" );
3644 d2 =
powi( (
double)i0 , i1 );
3650 i1 = n + np - 2*l - 2;
3651 d2 =
powi( (
double)i0 , i1 );
3658 d2 =
powi( (
double)i0 , i1 );
3673 printf(
"BadMagic: Relational error amongst n, l, n' and l'\n" );
3681 printf(
"BadMagic: Relational error amongst n, l, n' and l'\n" );
3689 printf(
"BadMagic: Relational error amongst n, l, n' and l'\n" );
3697 printf(
"BadMagic: Relational error amongst n, l, n' and l'\n" );
3707 d5 = sqrt(d1)*sqrt(d2);
3731 double d0 = 0., d1 = 0.;
3732 double ld0 = 0., ld1 = 0., ld2 = 0., ld3 = 0., ld4 = 0.;
3748 d0 = (double)(2*l - 1);
3762 result = -(ld0 + ld1);
3771 d0 = (double)(4 * n * np);
3772 d1 = (double)(l + 1);
3773 result += d1 * log10(d0);
3783 d0 = (double)(n - np);
3784 d1 = (double)(n + np - 2*l - 2);
3785 result += d1 * log10(fabs(d0));
3790 d0 = (double)(n + np);
3791 d1 = (double)(-n - np);
3792 result += d1 * log10(d0);
3816 ld4 = 0.5*((ld0+ld1)-(ld2+ld3));
3914 double d0 = 0., d1 = 0., d2 = 0., d3 = 0., d4 = 0., d5 = 0., d6 = 0.;
3915 long int i1 = 0, i2 = 0;
3929 d1 = (double)i1 / (
double)i2;
3931 d2 =
hv( n, np, iz, mass_nuc ) / ( iz*iz * rMass );
3933 d4 =
hri( n, l, np, lp, iz, mass_nuc ) * iz * rMass;
3936 d6 = d0 * d1 * d3 * d5;
3942 inline double OscStr_f_log10(
long int n ,
long int l ,
long int np ,
long int lp ,
long int iz,
3947 double d0 = 0., d1 = 0., d2 = 0., d3 = 0., d4 = 0., d5 = 0., d6 = 0.;
3948 long int i1 = 0, i2 = 0;
3962 d1 = (double)i1 / (
double)i2;
3964 d2 =
hv( n, np, iz, mass_nuc ) / ( iz*iz * rMass );
3966 d4 =
hri_log10( n, l, np, lp, iz, mass_nuc ) * iz * rMass;
3969 d6 = d0 * d1 * d3 * d5;
3974 STATIC double F21(
long int a ,
long int b,
long int c,
double y,
char A )
3986 ASSERT( A ==
'a' || A ==
'b' );
3992 return F21( b, a, c, y,
'a' );
4074 vector<double> yV(-a + 5);
4091 ASSERT( A ==
'a' || A ==
'b' );
4097 return F21_mx( b, a, c, y,
'a' );
4179 vector<mxq> yV(-a + 5);
4184 STATIC double F21i(
long int a,
long int b,
long int c,
double y,
double *yV )
4188 double d0 = 0., d1 = 0., d2 = 0., d3 = 0., d4 = 0., d5 = 0.;
4189 double d8 = 0., d9 = 0., d10 = 0., d11 = 0., d12 = 0., d13 = 0., d14 = 0.;
4190 long int i1 = 0, i2 = 0;
4206 else if( yV[-a] != 0. )
4265 d2= (double)i1 * d1;
4270 d8=
F21i( (
long int)(a + 1), b, c, y, yV );
4271 d9=
F21i( (
long int)(a + 2), b, c, y, yV );
4291 if( yV[-a].q != 0. )
4298 ASSERT( yV[-a].q == 0. );
4307 yV[-a].
mx = result_mx;
4312 double d1 = (double)b;
4313 double d2 = (double)c;
4314 double d3 = y * (d1/d2);
4316 ASSERT( yV[-a].q == 0. );
4320 result_mx.
m = 1. - d3;
4323 while ( fabs(result_mx.
m) > 1.0e+25 )
4325 result_mx.
m /= 1.0e+25;
4333 yV[-a].
mx = result_mx;
4382 mx d8, d9, d10, d11;
4384 double db = (double)b;
4385 double d00 = (double)(a + 1 - c);
4386 double d0 = (double)(a + 1);
4388 double d2 = d0 * d1;
4389 double d3 = d2 / d00;
4391 double d5 = d00 + d4;
4392 double d6 = d5 / d00;
4394 ASSERT( yV[-a].q == 0. );
4404 d8=
F21i_log( (a + 1), b, c, y, yV );
4405 d9=
F21i_log( (a + 2), b, c, y, yV );
4410 d10.
m = d8.
m * (1. - (d9.
m/d8.
m) *
powi( 10., (d9.
x - d8.
x)));
4425 result_mx.
x = d11.
x;
4426 result_mx.
m = d11.
m * (1. + (d10.
m/d11.
m) *
powi( 10. , (d10.
x - d11.
x) ) );
4433 while ( fabs(result_mx.
m) > 1.0e+25 )
4435 result_mx.
m /= 1.0e+25;
4441 yV[-a].
mx = result_mx;
4450 while( fabs(target.
m) > 1.0e+25 )
4452 target.
m /= 1.0e+25;
4455 while( fabs(target.
m) < 1.0e-25 )
4457 target.
m *= 1.0e+25;
4470 result.
m = a.
m * (1. + (b.
m/a.
m) *
powi( 10. , (b.
x - a.
x) ) );
4484 minusb.
m = -minusb.
m;
4486 result =
add_mx( a, minusb );
4505 return a_mx.
m *
powi( 10., a_mx.
x );
4512 while ( log10_a > 25.0 )
4518 while ( log10_a < -25.0 )
4524 result_mx.
m =
exp10(log10_a);
4533 result.
m = (a.
m * b.
m);
4534 result.
x = (a.
x + b.
x);
4553 double partsum = 0.;
4554 for(
long int s = 1; s <= lp; s++ )
4556 double s2 =
pow2((
double)s);
4557 partsum += log10( 1. + s2*Ksqrd );
STATIC double bh(double k, long int n, long int l, double *rcsvV)
double log10_prodxx(long int lp, double Ksqrd)
void normalize_mx(mx &target)
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 F21i(long int a, long int b, long int c, double y, double *yV)
STATIC double bhGp(long int q, double K, long int n, long int l, long int lp, double *rcsvV, double GK)
STATIC double hrii(long int n, long int l, long int np, long int lp)
STATIC double bhintegrand(double k, long int n, long int l, long int lp, double *rcsvV)
STATIC double H_Einstein_A_lin(long int n, long int l, long int np, long int lp, long int iz, double mass_nuc)
double lfactorial(long n)
STATIC mx F21i_log(long int a, long int b, long int c, double y, mxq *yV)
STATIC double bh_log(double k, long int n, long int l, mxq *rcsvV_mxq)
static const double CONST_ONE
STATIC double bhG(double K, long int n, long int l, long int lp, double *rcsvV)
STATIC double log10_fsff(long int n, long int l, long int np)
STATIC double bhintegrand_log(double k, long int n, long int l, long int lp, mxq *rcsvV_mxq)
static const int NPRE_FACTORIAL
double local_product(double K, long int lp)
double OscStr_f(long int n, long int l, long int np, long int lp, long int iz, double mass_nuc)
STATIC double bhg(double K, long int n, long int l, long int lp, double *rcsvV)
STATIC double H_photo_cs_lin(double rel_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 hri(long int n, long int l, long int np, long int lp, long int iz, double mass_nuc)
STATIC mx bhG_mx(double K, long int n, long int l, long int lp, mxq *rcsvV_mxq)
mx mxify_log10(double log10_a)
static const double PHYSICAL_CONSTANT_TWO
double unmxify(const mx &a_mx)
double hv(long int n, long int nprime, long int iz, double mass_nuc)
STATIC double bhGm(long int q, double K, long int n, long int l, long int lp, double *rcsvV, double GK)
double powi(double, long int)
mx sub_mx(const mx &a, const mx &b)
double OscStr_f_log10(long int n, long int l, long int np, long int lp, long int iz, double mass_nuc)
double H_photo_cs(double rel_photon_energy, long int n, long int l, long int iz)
realnum AtomicWeight[LIMELM]
mx add_mx(const mx &a, const mx &b)
double H_photo_cs_log10(double photon_energy, long int n, long int l, long int iz)
STATIC double hrii_log(long int n, long int l, long int np, long int lp)
#define DEBUG_ENTRY(funcname)
STATIC double F21(long int a, long int b, long int c, double y, char A)
int fprintf(const Output &stream, const char *format,...)
STATIC double reduced_mass_rel(double mass_nuc)
STATIC mx F21_mx(long int a, long int b, long int c, double y, char A)
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 double fsff(long int n, long int l, long int np)
double H_Einstein_A(long int n, long int l, long int np, long int lp, long int iz)
double hri_log10(long int n, long int l, long int np, long int lp, long int iz, double mass_nuc)
mx mult_mx(const mx &a, const mx &b)
STATIC double bhg_log(double K, long int n, long int l, long int lp, mxq *rcsvV_mxq)