Changeset 1986

Show
Ignore:
Timestamp:
04/29/08 08:21:40 (2 weeks ago)
Author:
rporter
Message:

trunk/source/helike_einsta.cpp - cache As from collapsed to resolved levels

trunk/source/hydroeinsta.cpp - add white space

trunk/source/iso_continuum_lower.cpp - correct typo in comment

trunk/source/iso_create.cpp - exclude nP-ground emission in lifetimes and cascade probs if case B. Add bnl for He0.

trunk/source/iso_solve.cpp - do the new collapsed tweaking for He0 as well.

trunk/source/prt_lines_helium.cpp - correct collisional enhancement to he-like case B lines involving 23P.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/source/helike_einsta.cpp

    r1960 r1986  
    10151015                        Aul = he_1trans( nelem, Enerwn, n_eff_hi, L_(ipLo)+1, 
    10161016                                S_(ipLo), -1, n_eff_lo, L_(ipLo), S_(ipLo), ipLo-3); 
    1017                         Aul *= (2.*L_(ipLo)+3.) * S_(ipLo) /  
    1018                                 (4.*(double)N_(ipHi)*(double)N_(ipHi)); 
     1017 
     1018                        iso.CachedAs[ipISO][nelem][ N_(ipHi)-iso.n_HighestResolved_max[ipISO][nelem]-1 ][ ipLo ][0] = (realnum)Aul; 
     1019 
     1020                        Aul *= (2.*L_(ipLo)+3.) * S_(ipLo) / (4.*(double)N_(ipHi)*(double)N_(ipHi)); 
     1021 
    10191022                        if( L_(ipLo) != 0 ) 
    10201023                        { 
     
    10221025                                Aul1 = he_1trans( nelem, Enerwn, n_eff_hi, L_(ipLo)-1, 
    10231026                                        S_(ipLo), -1, n_eff_lo, L_(ipLo), S_(ipLo), ipLo-3); 
     1027 
     1028                                iso.CachedAs[ipISO][nelem][ N_(ipHi)-iso.n_HighestResolved_max[ipISO][nelem]-1 ][ ipLo ][1] = (realnum)Aul1; 
     1029 
    10241030                                /* now add in this part after multiplying by stat weight for lHi = lLo-1.       */ 
    1025                                 Aul += Aul1*(2.*L_(ipLo)-1.) * S_(ipLo) / 
    1026                                         (4.*(double)N_(ipHi)*(double)N_(ipHi)); 
     1031                                Aul += Aul1*(2.*L_(ipLo)-1.) * S_(ipLo) / (4.*(double)N_(ipHi)*(double)N_(ipHi)); 
    10271032                        } 
     1033                        else 
     1034                                iso.CachedAs[ipISO][nelem][ N_(ipHi)-iso.n_HighestResolved_max[ipISO][nelem]-1 ][ ipLo ][1] = NULL; 
     1035 
    10281036                        iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.01f); 
    10291037                        ASSERT( Aul > 0.); 
  • trunk/source/hydroeinsta.cpp

    r1969 r1986  
    8383                        else 
    8484                                iso.CachedAs[ipISO][nelem][ N_(ipHi)-iso.n_HighestResolved_max[ipISO][nelem]-1 ][ ipLo ][1] = NULL; 
     85 
    8586                        iso_put_error(ipISO,nelem,ipHi,ipLo,IPRAD,0.01f); 
    8687                        ASSERT( Aul > 0.); 
  • trunk/source/iso_continuum_lower.cpp

    r1925 r1986  
    102102                iso.n_HighestResolved_local[ipISO][nelem] = iso.n_HighestResolved_max[ipISO][nelem]; 
    103103                 
    104                 /* if levels were lowered on last past but are not now, must reeval */ 
     104                /* if levels were lowered on last pass but are not now, must reeval */ 
    105105                if( iso.lgLevelsLowered[ipISO][nelem] ) 
    106106                { 
  • trunk/source/iso_create.cpp

    r1969 r1986  
    1515#include "iso.h" 
    1616#include "lines_service.h" 
     17#include "opacity.h" 
    1718#include "phycon.h" 
    1819#include "physconst.h" 
     
    329330                                { 
    330331                                        StatesElem[ipISO][nelem][ipHi].lifetime = SMALLFLOAT; 
    331                                         for( ipLo=0; ipLo < ipHi; ipLo++ )   
     332                                         
     333                                        long ipLoStart = 0; 
     334                                        if( opac.lgCaseB && L_(ipHi)==1 && (ipISO==ipH_LIKE || S_(ipHi)==1) ) 
     335                                                ipLoStart = 1; 
     336 
     337                                        for( ipLo=ipLoStart; ipLo < ipHi; ipLo++ )   
    332338                                        { 
    333339                                                if( Transitions[ipISO][nelem][ipHi][ipLo].Emis->Aul <= iso.SmallA ) 
     
    12831289 
    12841290                long ipLoStart = 0; 
    1285                 //if( opac.lgCaseB
    1286                 //    ipLoStart = 1; 
     1291                if( opac.lgCaseB && L_(ipHi)==1 && (ipISO==ipH_LIKE || S_(ipHi)==1)
     1292                      ipLoStart = 1; 
    12871293 
    12881294                for( ipLo=ipLoStart; ipLo<ipHi; ipLo++ ) 
     
    14361442        { 
    14371443                /* exclude the first collapsed level, since different treatments can cause discontinuity */ 
    1438                 ASSERT( (SumAPerN[i] > SumAPerN[i+1]) || (i==iso.n_HighestResolved_max[ipISO][nelem]+1) ); 
     1444                ASSERT( (SumAPerN[i] > SumAPerN[i+1]) || opac.lgCaseB || (i==iso.n_HighestResolved_max[ipISO][nelem]+1) ); 
    14391445        } 
    14401446 
     
    16681674        DEBUG_ENTRY( "iso_collapsed_bnl_set()" ); 
    16691675 
    1670         double bnl_array[2][3][4][10] = { 
    1671                 { 
    1672                         /* ipHYDROGEN */ 
    1673                         { 
    1674                                 {6.18E-01,     2.58E-01,       1.52E-01,       2.75E-01,       3.94E-01,       4.86E-01,       5.43E-01,       5.81E-01,       6.56E-01,       8.79E-01}, 
    1675                                 {1.31E+00,      5.20E-01,      2.77E-01,       4.47E-01,       5.83E-01,       6.69E-01,       7.16E-01,       7.57E-01,       8.69E-01,       1.20E+00}, 
    1676                                 {1.94E+00,      7.34E-01,      3.64E-01,       5.49E-01,       6.80E-01,       7.54E-01,       7.94E-01,       8.39E-01,       9.77E-01,       1.38E+00}, 
    1677                                 {2.52E+00,     9.16E-01,       4.29E-01,       6.17E-01,       7.39E-01,       8.04E-01,       8.40E-01,       8.89E-01,       1.05E+00,       1.50E+00} 
     1676        double bnl_array[4][3][4][10] = { 
     1677                { 
     1678                        /* H */ 
     1679                        { 
     1680                                {6.13E-01,     2.56E-01,       1.51E-01,       2.74E-01,       3.98E-01,       4.98E-01,       5.71E-01,       6.33E-01,       7.28E-01,       9.59E-01}, 
     1681                                {1.31E+00,      5.17E-01,      2.76E-01,       4.47E-01,       5.87E-01,       6.82E-01,       7.44E-01,       8.05E-01,       9.30E-01,       1.27E+00}, 
     1682                                {1.94E+00,      7.32E-01,      3.63E-01,       5.48E-01,       6.83E-01,       7.66E-01,       8.19E-01,       8.80E-01,       1.02E+00,       1.43E+00}, 
     1683                                {2.53E+00,     9.15E-01,       4.28E-01,       6.16E-01,       7.42E-01,       8.13E-01,       8.60E-01,       9.22E-01,       1.08E+00,       1.56E+00} 
    16781684                        }, 
    16791685                        { 
    1680                                 {5.62E-01,     2.65E-01,       1.55E-01,       2.74E-01,       3.89E-01,       4.75E-01,       5.32E-01,       5.73E-01,       6.14E-01,       6.58E-01}, 
    1681                                 {1.21E+00,      5.29E-01,      2.80E-01,       4.46E-01,       5.77E-01,       6.63E-01,       7.18E-01,       7.70E-01,       8.38E-01,       9.20E-01}, 
    1682                                 {1.81E+00,      7.44E-01,      3.67E-01,       5.47E-01,       6.75E-01,       7.52E-01,       8.05E-01,       8.65E-01,       9.53E-01,       1.07E+00}, 
    1683                                 {2.38E+00,      9.25E-01,      4.32E-01,       6.15E-01,       7.35E-01,       8.05E-01,       8.58E-01,       9.27E-01,       1.04E+00,       1.20E+00
     1686                                {5.63E-01,     2.65E-01,       1.55E-01,       2.76E-01,       3.91E-01,       4.75E-01,       5.24E-01,       5.45E-01,       5.51E-01,       5.53E-01}, 
     1687                                {1.21E+00,      5.30E-01,      2.81E-01,       4.48E-01,       5.80E-01,       6.62E-01,       7.05E-01,       7.24E-01,       7.36E-01,       7.46E-01}, 
     1688                                {1.81E+00,      7.46E-01,      3.68E-01,       5.49E-01,       6.78E-01,       7.51E-01,       7.88E-01,       8.09E-01,       8.26E-01,       8.43E-01}, 
     1689                                {2.38E+00,      9.27E-01,      4.33E-01,       6.17E-01,       7.38E-01,       8.05E-01,       8.40E-01,       8.65E-01,       8.92E-01,       9.22E-01
    16841690                        }, 
    16851691                        { 
    1686                                 {2.88E-01,     2.66E-01,       2.34E-01,       2.92E-01,       3.50E-01,       3.90E-01,       4.12E-01,       4.23E-01,       4.28E-01,       4.28E-01}, 
    1687                                 {5.52E-01,     4.93E-01,       3.87E-01,       4.58E-01,       5.26E-01,       5.70E-01,       5.93E-01,       6.03E-01,       6.07E-01,       6.08E-01}, 
    1688                                 {7.82E-01,     6.78E-01,       4.92E-01,       5.59E-01,       6.26E-01,       6.68E-01,       6.90E-01,       7.00E-01,       7.05E-01,       7.07E-01}, 
    1689                                 {1.03E+00,     8.53E-01,       5.62E-01,       6.27E-01,       6.95E-01,       7.37E-01,       7.59E-01,       7.70E-01,       7.77E-01,       7.80E-01} 
     1692                                {2.97E-01,     2.76E-01,       2.41E-01,       3.04E-01,       3.66E-01,       4.10E-01,       4.35E-01,       4.48E-01,       4.52E-01,       4.53E-01}, 
     1693                                {5.63E-01,     5.04E-01,       3.92E-01,       4.67E-01,       5.39E-01,       5.85E-01,       6.10E-01,       6.20E-01,       6.23E-01,       6.23E-01}, 
     1694                                {7.93E-01,     6.90E-01,       4.94E-01,       5.65E-01,       6.36E-01,       6.79E-01,       7.00E-01,       7.09E-01,       7.11E-01,       7.11E-01}, 
     1695                                {1.04E+00,     8.66E-01,       5.62E-01,       6.31E-01,       7.01E-01,       7.43E-01,       7.63E-01,       7.71E-01,       7.73E-01,       7.73E-01} 
    16901696                        } 
    16911697                }, 
    16921698                { 
    1693                         /* ipHELIUM */ 
    1694                         { 
    1695                                 {6.64E-02,     2.90E-02,       1.93E-02,       4.15E-02,       7.30E-02,       1.11E-01,       1.51E-01,       1.94E-01,       2.53E-01,       4.52E-01}, 
    1696                                 {2.38E-01,     1.02E-01,       6.48E-02,       1.30E-01,       2.08E-01,       2.87E-01,       3.60E-01,       4.32E-01,       5.44E-01,       9.92E-01}, 
    1697                                 {4.24E-01,     1.80E-01,       1.10E-01,       2.07E-01,       3.14E-01,       4.09E-01,       4.92E-01,       5.72E-01,       7.06E-01,       1.35E+00}, 
    1698                                 {6.09E-01,     2.54E-01,       1.50E-01,       2.72E-01,       3.95E-01,       4.95E-01,       5.78E-01,       6.60E-01,       8.00E-01,       1.61E+00} 
     1699                        /* He+ */ 
     1700                        { 
     1701                                {6.70E-02,     2.93E-02,       1.94E-02,       4.20E-02,       7.40E-02,       1.12E-01,       1.51E-01,       1.86E-01,       2.26E-01,       3.84E-01}, 
     1702                                {2.39E-01,     1.03E-01,       6.52E-02,       1.31E-01,       2.11E-01,       2.91E-01,       3.61E-01,       4.17E-01,       4.85E-01,       8.00E-01}, 
     1703                                {4.26E-01,     1.80E-01,       1.10E-01,       2.09E-01,       3.18E-01,       4.15E-01,       4.93E-01,       5.54E-01,       6.34E-01,       1.04E+00}, 
     1704                                {6.11E-01,     2.55E-01,       1.51E-01,       2.74E-01,       3.99E-01,       5.02E-01,       5.80E-01,       6.41E-01,       7.30E-01,       1.21E+00} 
    16991705                        }, 
    17001706                        { 
     
    17101716                                {6.01E-01,      2.60E-01,       1.53E-01,       2.76E-01,       3.95E-01,       4.87E-01,       5.45E-01,       5.76E-01,       5.93E-01,       6.05E-01} 
    17111717                        } 
     1718                }, 
     1719                { 
     1720                        /* He singlets */ 
     1721                        { 
     1722                                {1.77E-01,      3.59E-01,       1.54E-01,       2.75E-01,       3.98E-01,       4.94E-01,       5.51E-01,       5.68E-01,       5.46E-01,       4.97E-01}, 
     1723                                {4.09E-01,      7.23E-01,       2.83E-01,       4.48E-01,       5.89E-01,       6.78E-01,       7.22E-01,       7.30E-01,       7.07E-01,       6.65E-01}, 
     1724                                {6.40E-01,      1.02E+00,       3.74E-01,       5.49E-01,       6.85E-01,       7.63E-01,       7.98E-01,       8.03E-01,       7.84E-01,       7.53E-01}, 
     1725                                {8.70E-01,      1.28E+00,       4.42E-01,       6.17E-01,       7.44E-01,       8.13E-01,       8.42E-01,       8.46E-01,       8.34E-01,       8.13E-01} 
     1726                        }, 
     1727                        { 
     1728                                {1.78E-01,      3.62E-01,       1.55E-01,       2.73E-01,       3.91E-01,       4.73E-01,       5.10E-01,       5.04E-01,       4.70E-01,       4.32E-01}, 
     1729                                {4.08E-01,      7.26E-01,       2.83E-01,       4.45E-01,       5.79E-01,       6.54E-01,       6.78E-01,       6.64E-01,       6.30E-01,       5.98E-01}, 
     1730                                {6.37E-01,      1.03E+00,       3.73E-01,       5.46E-01,       6.75E-01,       7.40E-01,       7.57E-01,       7.43E-01,       7.15E-01,       6.92E-01}, 
     1731                                {8.65E-01,      1.28E+00,       4.41E-01,       6.14E-01,       7.35E-01,       7.92E-01,       8.05E-01,       7.95E-01,       7.74E-01,       7.59E-01} 
     1732                        }, 
     1733                        { 
     1734                                {2.07E-01,      3.73E-01,       1.73E-01,       2.85E-01,       4.03E-01,       4.76E-01,       5.06E-01,       5.03E-01,       4.84E-01,       4.63E-01}, 
     1735                                {4.32E-01,      7.13E-01,       3.06E-01,       4.54E-01,       5.81E-01,       6.44E-01,       6.59E-01,       6.49E-01,       6.28E-01,       6.11E-01}, 
     1736                                {6.40E-01,      9.85E-01,       3.98E-01,       5.53E-01,       6.74E-01,       7.27E-01,       7.36E-01,       7.26E-01,       7.10E-01,       6.98E-01}, 
     1737                                {8.38E-01,      1.21E+00,       4.67E-01,       6.20E-01,       7.34E-01,       7.79E-01,       7.87E-01,       7.79E-01,       7.69E-01,       7.63E-01} 
     1738                        } 
     1739                }, 
     1740                { 
     1741                        /* He triplets */ 
     1742                        { 
     1743                                {9.31E-02,      3.96E-01,       1.36E-01,       2.74E-01,       3.99E-01,       4.95E-01,       5.52E-01,       5.70E-01,       5.48E-01,       4.96E-01}, 
     1744                                {2.25E-01,      8.46E-01,       2.49E-01,       4.46E-01,       5.89E-01,       6.79E-01,       7.23E-01,       7.31E-01,       7.08E-01,       6.64E-01}, 
     1745                                {3.59E-01,      1.24E+00,       3.30E-01,       5.47E-01,       6.85E-01,       7.63E-01,       7.98E-01,       8.04E-01,       7.85E-01,       7.53E-01}, 
     1746                                {4.93E-01,      1.60E+00,       3.91E-01,       6.15E-01,       7.44E-01,       8.13E-01,       8.42E-01,       8.47E-01,       8.35E-01,       8.12E-01} 
     1747                        }, 
     1748                        { 
     1749                                {9.32E-02,      3.99E-01,       1.35E-01,       2.72E-01,       3.91E-01,       4.75E-01,       5.14E-01,       5.09E-01,       4.73E-01,       4.31E-01}, 
     1750                                {2.25E-01,      8.49E-01,       2.49E-01,       4.44E-01,       5.79E-01,       6.56E-01,       6.81E-01,       6.68E-01,       6.31E-01,       5.96E-01}, 
     1751                                {3.58E-01,      1.25E+00,       3.29E-01,       5.44E-01,       6.76E-01,       7.42E-01,       7.60E-01,       7.46E-01,       7.16E-01,       6.91E-01}, 
     1752                                {4.92E-01,      1.60E+00,       3.90E-01,       6.12E-01,       7.36E-01,       7.93E-01,       8.07E-01,       7.97E-01,       7.74E-01,       7.58E-01} 
     1753                        }, 
     1754                        { 
     1755                                {1.13E-01,      4.21E-01,       1.47E-01,       2.83E-01,       4.04E-01,       4.80E-01,       5.13E-01,       5.12E-01,       4.93E-01,       4.71E-01}, 
     1756                                {2.52E-01,      8.56E-01,       2.61E-01,       4.50E-01,       5.82E-01,       6.48E-01,       6.66E-01,       6.56E-01,       6.35E-01,       6.16E-01}, 
     1757                                {3.85E-01,      1.23E+00,       3.41E-01,       5.49E-01,       6.75E-01,       7.30E-01,       7.41E-01,       7.31E-01,       7.15E-01,       7.02E-01}, 
     1758                                {5.14E-01,      1.56E+00,       4.01E-01,       6.15E-01,       7.34E-01,       7.82E-01,       7.90E-01,       7.83E-01,       7.72E-01,       7.65E-01} 
     1759                        } 
    17121760                } 
    17131761        }; 
     
    17411789 
    17421790                                long ipL = MIN2(9,lHi); 
     1791                                long ip1; 
     1792 
     1793                                if( nelem==ipHYDROGEN ) 
     1794                                        ip1 = 0; 
     1795                                else if( nelem==ipHELIUM ) 
     1796                                { 
     1797                                        if( ipISO==ipH_LIKE ) 
     1798                                                ip1 = 1; 
     1799                                        else if( ipISO==ipHE_LIKE ) 
     1800                                        { 
     1801                                                if( sHi==1 ) 
     1802                                                        ip1 = 2; 
     1803                                                else if( sHi==3 ) 
     1804                                                        ip1 = 3; 
     1805                                                else 
     1806                                                        TotalInsanity(); 
     1807                                        } 
     1808                                        else 
     1809                                                TotalInsanity(); 
     1810                                } 
     1811                                else 
     1812                                        TotalInsanity(); 
    17431813 
    17441814                                temp = MAX2( temps[0], phycon.te ); 
     
    17531823                         
    17541824                                if( temp < temps[0] && dens < log_dens[0] ) 
    1755                                         bnl = bnl_array[nelem][0][0][ipL]; 
     1825                                        bnl = bnl_array[ip1][0][0][ipL]; 
    17561826                                else if( temp < temps[0] && dens >= log_dens[2] ) 
    1757                                         bnl = bnl_array[nelem][2][0][ipL];  
     1827                                        bnl = bnl_array[ip1][2][0][ipL];  
    17581828                                else if( temp >= temps[3] && dens < log_dens[0] ) 
    1759                                         bnl = bnl_array[nelem][0][3][ipL];  
     1829                                        bnl = bnl_array[ip1][0][3][ipL];  
    17601830                                else if( temp >= temps[3] && dens >= log_dens[2] ) 
    1761                                         bnl = bnl_array[nelem][2][3][ipL]; 
     1831                                        bnl = bnl_array[ip1][2][3][ipL]; 
    17621832                                else 
    17631833                                { 
    17641834                                        bnl_at_lo_den = ( temp - temps[ipTe]) / (temps[ipTe+1] - temps[ipTe]) * 
    1765                                                 (bnl_array[nelem][ipDens][ipTe+1][ipL] - bnl_array[nelem][ipDens][ipTe][ipL]) + bnl_array[nelem][ipDens][ipTe][ipL]; 
     1835                                                (bnl_array[ip1][ipDens][ipTe+1][ipL] - bnl_array[ip1][ipDens][ipTe][ipL]) + bnl_array[ip1][ipDens][ipTe][ipL]; 
    17661836 
    17671837                                        bnl_at_hi_den = ( temp - temps[ipTe]) / (temps[ipTe+1] - temps[ipTe]) * 
    1768                                                 (bnl_array[nelem][ipDens+1][ipTe+1][ipL] - bnl_array[nelem][ipDens+1][ipTe][ipL]) + bnl_array[nelem][ipDens+1][ipTe][ipL]; 
     1838                                                (bnl_array[ip1][ipDens+1][ipTe+1][ipL] - bnl_array[ip1][ipDens+1][ipTe][ipL]) + bnl_array[ip1][ipDens+1][ipTe][ipL]; 
    17691839 
    17701840                                        bnl = ( dens - log_dens[ipDens]) / (log_dens[ipDens+1] - log_dens[ipDens]) *  
     
    17741844                                /** these are just sanity checks, the interpolated value should be between values at interpolation points */ 
    17751845                                { 
    1776                                         bnl_max = MAX4( bnl_array[nelem][ipDens][ipTe+1][ipL], bnl_array[nelem][ipDens+1][ipTe+1][ipL], 
    1777                                                 bnl_array[nelem][ipDens][ipTe][ipL], bnl_array[nelem][ipDens+1][ipTe][ipL] ); 
     1846                                        bnl_max = MAX4( bnl_array[ip1][ipDens][ipTe+1][ipL], bnl_array[ip1][ipDens+1][ipTe+1][ipL], 
     1847                                                bnl_array[ip1][ipDens][ipTe][ipL], bnl_array[ip1][ipDens+1][ipTe][ipL] ); 
    17781848                                        ASSERT( bnl <= bnl_max ); 
    17791849 
    1780                                         bnl_min = MIN4( bnl_array[nelem][ipDens][ipTe+1][ipL], bnl_array[nelem][ipDens+1][ipTe+1][ipL], 
    1781                                                 bnl_array[nelem][ipDens][ipTe][ipL], bnl_array[nelem][ipDens+1][ipTe][ipL] ); 
     1850                                        bnl_min = MIN4( bnl_array[ip1][ipDens][ipTe+1][ipL], bnl_array[ip1][ipDens+1][ipTe+1][ipL], 
     1851                                                bnl_array[ip1][ipDens][ipTe][ipL], bnl_array[ip1][ipDens+1][ipTe][ipL] ); 
    17821852                                        ASSERT( bnl >= bnl_min ); 
    17831853                                } 
     
    18941964        { 
    18951965                StatesElem[ipISO][nelem][ipHi].lifetime = SMALLFLOAT; 
     1966 
    18961967                long ipLoStart=0; 
    1897                 //if( opac.lgCaseB ) 
    1898                 //      ipLoStart=1; 
     1968                if( opac.lgCaseB && L_(ipHi)==1 && (ipISO==ipH_LIKE || S_(ipHi)==1) ) 
     1969                        ipLoStart=1; 
     1970 
    18991971                for( long ipLo=ipLoStart; ipLo < ipHi; ipLo++ )   
    19001972                { 
  • trunk/source/iso_solve.cpp

    r1985 r1986  
    117117                                if( opac.lgRedoStatic ) 
    118118                                { 
    119                                         if( ipISO==ipH_LIKE && nelem<=ipHELIUM ) 
     119                                        if( nelem<=ipHELIUM ) 
    120120                                        { 
    121121                                                iso_collapsed_bnl_set( ipISO, nelem ); 
  • trunk/source/prt_lines_helium.cpp

    r1969 r1986  
    124124                                                if( nMatch("Ca B",CaABLines[nelem][i].label) ) 
    125125                                                { 
    126                                                         /* chng 05 dec 14, branching ratio was missing here!  
    127                                                          * not a big effect because lines with biggest collision 
    128                                                          * enhancements tend to be dominant decay route from upper level. */ 
    129                                                         linadd( intens +  
    130                                                                 Pop2_3S*qTotEff[ipHi]*dense.xIonDense[nelem][nelem+1-ipISO]* 
    131                                                                 iso.BranchRatio[ipISO][nelem][ipHi][ipLo]* 
    132                                                                 Transitions[ipHE_LIKE][nelem][ipHi][ipLo].EnergyErg, 
    133                                                                 Transitions[ipHE_LIKE][nelem][ipHi][ipLo].WLAng, 
    134                                                                 "+Col",'i', 
    135                                                                 "Case B intensity with collisions included"); 
     126                                                        /* all lines to/from 2^3Pj are stored as lines to/from 2^3P1, so make sure this loop never tries to  
     127                                                         * explicitly consider 2^3P0 or 2^3P2 */ 
     128                                                        ASSERT( ipLo!=ipHe2p3P0 && ipLo!=ipHe2p3P2 ); 
     129                                                        ASSERT( ipHi!=ipHe2p3P0 && ipHi!=ipHe2p3P2 ); 
     130 
     131                                                        double totBranch = iso.BranchRatio[ipISO][nelem][ipHi][ipLo]; 
     132                                                        if( ipLo==4 ) 
     133                                                                totBranch += iso.BranchRatio[ipISO][nelem][ipHi][3] + iso.BranchRatio[ipISO][nelem][ipHi][5]; 
     134 
     135                                                        if( ipHi==4 ) 
     136                                                        { 
     137                                                                linadd( intens +  
     138                                                                        Pop2_3S*dense.xIonDense[nelem][nelem+1-ipISO]* 
     139                                                                        ( 
     140                                                                        qTotEff[ipHe2p3P0]*iso.BranchRatio[ipISO][nelem][ipHe2p3P0][ipLo]+ 
     141                                                                        qTotEff[ipHe2p3P1]*iso.BranchRatio[ipISO][nelem][ipHe2p3P1][ipLo]+ 
     142                                                                        qTotEff[ipHe2p3P2]*iso.BranchRatio[ipISO][nelem][ipHe2p3P2][ipLo] 
     143                                                                        )* 
     144                                                                        Transitions[ipHE_LIKE][nelem][ipHi][ipLo].EnergyErg, 
     145                                                                        Transitions[ipHE_LIKE][nelem][ipHi][ipLo].WLAng, 
     146                                                                        "+Col",'i', 
     147                                                                        "Case B intensity with collisions included"); 
     148 
     149                                                        } 
     150                                                        else 
     151                                                        { 
     152                                                                /* chng 05 dec 14, branching ratio was missing here!  
     153                                                                 * not a big effect because lines with biggest collision 
     154                                                                 * enhancements tend to be dominant decay route from upper level. */ 
     155                                                                linadd( intens +  
     156                                                                        Pop2_3S*qTotEff[ipHi]*dense.xIonDense[nelem][nelem+1-ipISO]*totBranch* 
     157                                                                        Transitions[ipHE_LIKE][nelem][ipHi][ipLo].EnergyErg, 
     158                                                                        Transitions[ipHE_LIKE][nelem][ipHi][ipLo].WLAng, 
     159                                                                        "+Col",'i', 
     160                                                                        "Case B intensity with collisions included"); 
     161                                                        } 
    136162                                                } 
    137163                                        }