Show
Ignore:
Timestamp:
04/04/08 03:02:50 (8 months ago)
Author:
gary
Message:

merge of r1913-1915 on mainline

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/c08_branch/source/iso_level.cpp

    r1868 r1916  
    4444 
    4545        int32 nerror; 
    46         double HighestPColOut[2] = {0.,0.}, 
     46        double HighestPColOut = 0., 
    4747                collider, 
    4848                sum_popn_ov_ion, 
     
    223223        else 
    224224        { 
     225                long SpinUsed[NISO] = {2,1}; 
     226                long indexNmaxP = 
     227                        iso.QuantumNumbers2Index[ipISO][nelem][ iso.n_HighestResolved_local[ipISO][nelem] ][1][SpinUsed[ipISO]]; 
     228 
    225229                strcpy( iso.chTypeAtomUsed[ipISO][nelem], "Popul" ); 
    226230                if( trace.lgTrace && (nelem == trace.ipIsoTrace[ipISO]) ) 
     
    280284 
    281285                                z[level][level] += RadDecay + pump_down + coll_down; 
    282                                 z[level][ipLo] = - (RadDecay + pump_down + coll_down); 
    283  
    284                                 if( ipISO == ipHE_LIKE ) 
    285                                 { 
    286                                         if ( nelem == ipHELIUM ) 
    287                                         { 
    288                                                 if( StElm[level].l == 1 &&  
    289                                                     StElm[level].n == iso.n_HighestResolved_local[ipISO][nelem] ) 
    290                                                 { 
    291                                                         if( StElm[level].S == 1 ) 
    292                                                         { 
    293                                                                 ASSERT( (int)(StElm[level].S >> 1) == 0 ); 
    294                                                         } 
    295                                                         else if( StElm[level].S == 3 ) 
    296                                                         { 
    297                                                                 ASSERT( (int)(StElm[level].S >> 1) == 1 );  
    298                                                         } 
    299  
    300                                                         HighestPColOut[StElm[level].S >> 1] += coll_down; 
    301                                                 } 
    302                                                                                           
    303                                                 if( StElm[ipLo].l == 1 && 
    304                                                     StElm[ipLo].n == iso.n_HighestResolved_local[ipISO][nelem] ) 
    305                                                 { 
    306                                                         if( StElm[ipLo].S == 1 ) 
    307                                                         { 
    308                                                                 ASSERT( (int)(StElm[ipLo].S >> 1) == 0 ); 
    309                                                         } 
    310                                                         else if( StElm[ipLo].S == 3 ) 
    311                                                         { 
    312                                                                 ASSERT( (int)(StElm[ipLo].S >> 1) == 1 );  
    313                                                         } 
    314                                                          
    315                                                         HighestPColOut[StElm[ipLo].S >> 1] += coll_up; 
    316                                                 } 
    317                                         } 
    318  
    319                                         /* find total collisions out of 2^3S to singlets. */ 
    320                                         if( (level == 1) && (ipLo==0) ) 
    321                                         { 
    322                                                 iso.qTot2S[ipISO][nelem] += coll_down/dense.EdenHCorr; 
    323                                         } 
    324                                         if( (ipLo == 1) && (ipISO==ipH_LIKE || (StElm[level].S==1)) ) 
    325                                         { 
    326                                                 iso.qTot2S[ipISO][nelem] += coll_up/dense.EdenHCorr; 
    327                                         } 
     286                                z[level][ipLo] = - (RadDecay + pump_down + coll_down);                                   
     287 
     288                                if( level == indexNmaxP ) 
     289                                { 
     290                                        HighestPColOut += coll_down; 
     291                                }                                 
     292                                if( ipLo == indexNmaxP ) 
     293                                { 
     294                                        HighestPColOut += coll_up; 
    328295                                } 
     296 
     297                                /* find total collisions out of 2^3S to singlets. */ 
     298                                if( (level == 1) && (ipLo==0) ) 
     299                                { 
     300                                        iso.qTot2S[ipISO][nelem] += coll_down/dense.EdenHCorr; 
     301                                } 
     302                                if( (ipLo == 1) && (ipISO==ipH_LIKE || (StElm[level].S==1)) ) 
     303                                { 
     304                                        iso.qTot2S[ipISO][nelem] += coll_up/dense.EdenHCorr; 
     305                                } 
     306                        } 
     307                } 
     308 
     309                if( ipISO == nelem ) 
     310                { 
     311                        /* iso.lgCritDensLMix[ipISO] is a flag used to print warning if density is 
     312                        * too low for first collapsed level to be l-mixed.  Check is if l-mixing collisions 
     313                        * out of highest resolved singlet P are greater than sum of transition probs out.       */ 
     314                        if( HighestPColOut < 1./StatesElem[ipISO][nelem][indexNmaxP].lifetime ) 
     315                        { 
     316                                iso.lgCritDensLMix[ipISO] = false; 
    329317                        } 
    330318                } 
     
    657645        if( ipISO == ipHE_LIKE ) 
    658646        { 
    659                 /* iso.lgCritDensLMix[ipISO] is a flag used to print warning if density is 
    660                  * too low for first collapsed level to be l-mixed.  Check is if l-mixing collisions 
    661                  * out of highest resolved singlet P are greater than sum of transition probs out.      */ 
    662                 if( ( (HighestPColOut[0] < 1./StatesElem[ipISO][ipHELIUM][iso.QuantumNumbers2Index[ipISO][ipHELIUM][iso.n_HighestResolved_max[ipISO][ipHELIUM]][1][1]].lifetime ) 
    663                         || (HighestPColOut[1] < 1./StatesElem[ipISO][ipHELIUM][iso.QuantumNumbers2Index[ipISO][ipHELIUM][iso.n_HighestResolved_max[ipISO][ipHELIUM]][1][3]].lifetime ) ) 
    664                         && nelem==ipHELIUM )  
    665                 { 
    666                         iso.lgCritDensLMix[ipISO] = false; 
    667                 } 
    668647 
    669648                if( nzone>0 && nelem==ipHELIUM )