Changeset 1142

Show
Ignore:
Timestamp:
05/21/07 12:12:52 (18 months ago)
Author:
rporter
Message:

merge changes from porter branch. These are all iso refactoring changes. Test suite has zero botches.

Location:
trunk
Files:
3 removed
28 modified

Legend:

Unmodified
Added
Removed
  • trunk/source/assert_results.cpp

    r1111 r1142  
    23672367                                                                { 
    23682368                                                                        fprintf( ioQQQ, "\t%li  %li  %li  %li  %li  %li", 
    2369                                                                                 iso.quant_desig[ipHE_LIKE][ipHELIUM][ipHi].n, 
    2370                                                                                 iso.quant_desig[ipHE_LIKE][ipHELIUM][ipHi].l, 
    2371                                                                                 iso.quant_desig[ipHE_LIKE][ipHELIUM][ipHi].s, 
    2372                                                                                 iso.quant_desig[ipHE_LIKE][ipHELIUM][ipLo].n, 
    2373                                                                                 iso.quant_desig[ipHE_LIKE][ipHELIUM][ipLo].l, 
    2374                                                                                 iso.quant_desig[ipHE_LIKE][ipHELIUM][ipLo].s ); 
     2369                                                                                StatesElem[ipHE_LIKE][ipHELIUM][ipHi].n, 
     2370                                                                                StatesElem[ipHE_LIKE][ipHELIUM][ipHi].l, 
     2371                                                                                StatesElem[ipHE_LIKE][ipHELIUM][ipHi].s, 
     2372                                                                                StatesElem[ipHE_LIKE][ipHELIUM][ipLo].n, 
     2373                                                                                StatesElem[ipHE_LIKE][ipHELIUM][ipLo].l, 
     2374                                                                                StatesElem[ipHE_LIKE][ipHELIUM][ipLo].s ); 
    23752375                                                                        break; 
    23762376                                                                } 
  • trunk/source/cddefines.h

    r1121 r1142  
    10291029        double ConBoltz; 
    10301030 
     1031        long n, l, s, j; 
     1032 
    10311033} quantumState; 
    10321034 
  • trunk/source/cdspec.cpp

    r1078 r1142  
    463463        { 
    464464                /* this is exp(-tau) */ 
     465                cont = (float*)MALLOC( sizeof(float)*(size_t)rfield.nupper ); 
     466                /* need to free the vector once done */ 
     467                lgFREE = true; 
    465468                for( j=0; j<nEnergy; ++j) 
    466469                { 
    467470                        /* This is the TOTAL attentuation in both the continuum and lines.   
    468471                         * Jon Miller discovered that the line attentuation was missing in 07.02 */ 
    469                         ReturnedSpectrum[j] = opac.ExpmTau[j]*rfield.trans_coef[j]; 
     472                        cont[j] = opac.ExpmTau[j]*rfield.trans_coef[j]; 
    470473                } 
    471474                return; 
     
    478481        } 
    479482 
    480         /* this is array index used in Spec_cont */ 
    481         iplo = 0; 
    482         iphi = 0; 
    483483        /* now generate the continua */ 
    484484        for( ncell = 0; ncell < nEnergy; ++ncell ) 
  • trunk/source/helike.cpp

    r1116 r1142  
    6969/*lint -e662 creation of  out of bound pointer */ 
    7070/*lint -e661 creation of  out of bound pointer */ 
    71  
    72 /*      The Elevels data type, and then the iso.quant_desig[ipHE_LIKE] structure, 
    73  *  which contain the quantum numbers n,l, and s for a given 
    74  *  energy level, are defined in iso.h, for use in multiple subroutines. */ 
    75  
    76 /*typedef struct {  
    77         long n; 
    78         long s; 
    79         long l; 
    80 } Elevels; iso.h */  
    81  
    82 /* An array of structures each containing for a given element, n,l, and s 
    83  * s=0 for singlets, s=1 for triplets 
    84  * in helike.h 
    85 static Elevels **iso.quant_desig[ipHE_LIKE]; */ 
    8671 
    8772/*static long ipLev,globalZ;*/ 
     
    172157 
    173158                                /* evaluate recombination rates */ 
    174                                 /* if the flag iso.lgHugeCaseB[ipISO] is true, cloudy exits in HeRecom(). */ 
    175159                                HeRecom(nelem); 
    176160 
     
    303287 
    304288                ipFirstCollapsed= iso.numLevels_local[ipHE_LIKE][nelem]-iso.nCollapsed_local[ipHE_LIKE][nelem]; 
    305                 nResolved = iso.quant_desig[ipHE_LIKE][nelem][ipFirstCollapsed-1].n; 
     289                nResolved = StatesElem[ipHE_LIKE][nelem][ipFirstCollapsed-1].n; 
    306290                ASSERT( nResolved == iso.n_HighestResolved_local[ipHE_LIKE][nelem] ); 
    307291                ASSERT(nResolved > 0 ); 
     
    344328        for( il = ipFirstCollapsed; il < iso.numLevels_local[ipHE_LIKE][nelem]; ++il) 
    345329        { 
    346                 in = iso.quant_desig[ipHE_LIKE][nelem][il].n; 
     330                in = StatesElem[ipHE_LIKE][nelem][il].n; 
    347331 
    348332                /* prin quan number of collapsed levels */ 
     
    365349 
    366350                ipFirstCollapsed= iso.numLevels_local[ipHE_LIKE][nelem]-iso.nCollapsed_local[ipHE_LIKE][nelem]; 
    367                 nResolved = iso.quant_desig[ipHE_LIKE][nelem][ipFirstCollapsed-1].n; 
     351                nResolved = StatesElem[ipHE_LIKE][nelem][ipFirstCollapsed-1].n; 
    368352                ASSERT( nResolved == iso.n_HighestResolved_local[ipHE_LIKE][nelem] ); 
    369353                ASSERT(nResolved > 0 ); 
     
    407391        for( il = ipFirstCollapsed; il < iso.numLevels_local[ipHE_LIKE][nelem]; ++il) 
    408392        { 
    409                 in = iso.quant_desig[ipHE_LIKE][nelem][il].n; 
     393                in = StatesElem[ipHE_LIKE][nelem][il].n; 
    410394                /* prin quan number of collapsed levels */ 
    411395                fprintf(ioQQQ," %2ld           ",in); 
  • trunk/source/helike.h

    r1062 r1142  
    2121/** the magic number for the table of He1 case A and B emissivities, YYMMDD */ 
    2222#define CASEABMAGIC             (51214) 
    23  
    24 /** these macros are just an easy way to return the quantum numbers of a given level. */ 
    25 #define N_(A_)  (iso.quant_desig[ipISO][nelem][A_].n) 
    26 #define L_(A_)  (iso.quant_desig[ipISO][nelem][A_].l) 
    27 #define S_(A_)  (iso.quant_desig[ipISO][nelem][A_].s) 
    28 #define J_(A_)  ( (A_>=ipHe2p3P0 && A_<=ipHe2p3P2 && ipISO==ipHE_LIKE) ? (A_-3):0 ) 
    2923 
    3024/** He-like main routine to call HeLikeLevel and determine  
  • trunk/source/helike_create.cpp

    r1116 r1142  
    327327        }; 
    328328 
    329         long int n = iso.quant_desig[ipHE_LIKE][nelem][ipLo].n; 
    330         long int lqn = iso.quant_desig[ipHE_LIKE][nelem][ipLo].l; 
    331         long int s = iso.quant_desig[ipHE_LIKE][nelem][ipLo].s; 
     329        long int n = StatesElem[ipHE_LIKE][nelem][ipLo].n; 
     330        long int lqn = StatesElem[ipHE_LIKE][nelem][ipLo].l; 
     331        long int s = StatesElem[ipHE_LIKE][nelem][ipLo].s; 
    332332         
    333333        ASSERT(n >= 1L); 
     
    414414void HeCreate(void) 
    415415{ 
    416         double **energies, *n_effs, **SumAPerN, **RobbinsC, ***HeliumAs; 
     416        double **energies, *n_effs, **SumAPerN, **RobbinsC; 
    417417 
    418418        long int i, i1; 
    419419        long int j, ipLo, ipHi, ipFirstCollapsed, nelem; 
    420420        int ipISO = ipHE_LIKE; 
    421  
    422421 
    423422        static int nCalled = 0; 
     
    451450        } 
    452451 
    453         /* This is the flag that says to simulate the work of Benjamin, Skillman, and Smits (1999). */ 
    454         if( iso.lgSetBenjamin[ipISO] ) 
    455         { 
    456                 max_num_levels = iso.numLevels_max[ipHE_LIKE][ipHELIUM]; 
    457                 max_n = iso.n_HighestResolved_max[ipHE_LIKE][ipHELIUM]; 
    458                 iso.lgInd2nu_On = false; 
    459                  
    460                 if( iso.lgCompileRecomb[ipISO] ) 
    461                 { 
    462                         fprintf( ioQQQ, " Not compiling He recomb file...can not do with Benjamin command set."); 
    463                         iso.lgCompileRecomb[ipISO] = false; 
    464                 } 
    465                 if( iso.lgFSM[ipISO] ) 
    466                 { 
    467                         fprintf( ioQQQ, " Can not include f-s mixing with the Benjamin command!  I have turned it off."); 
    468                         iso.lgFSM[ipISO] = false; 
    469                 } 
    470         } 
    471         else 
    472         { 
    473                 /* first find the largest number of levels in any element in the he-like sequence */ 
    474                 max_num_levels = 0; 
    475                 max_n = 0; 
    476                 for( nelem=ipHELIUM; nelem < LIMELM; nelem++ ) 
    477                 { 
    478                         /* only check elements that are turned on */ 
    479                         if( nelem == ipHELIUM || dense.lgElmtOn[nelem] ) 
    480                         { 
    481                                 max_num_levels = MAX2( max_num_levels, iso.numLevels_max[ipHE_LIKE][nelem] ); 
    482                                 max_n = MAX2( max_n, iso.n_HighestResolved_max[ipHE_LIKE][nelem] + iso.nCollapsed_max[ipHE_LIKE][nelem] ); 
    483                         } 
    484                 } 
    485         } 
    486  
    487         /* This is the flag for including random error generation in the calculations. */ 
    488         if( iso.lgRandErrGen[ipISO] ) 
    489         { 
    490                 /* These are only needed if error generation is turned on */ 
    491                 /* this is the standard deviation for the error,  
    492                  * first dimension is iso, 
    493                  * second is nelem, 
    494                  * third, malloc'd below, is upper level, 
    495                  * fourth, malloc'd below, is lower level, 
    496                  * fifth, malloc'd below, is for radiative, collisional, or energy errors. 
    497                  * MACROS are used for the last dimension: IPRAD, IPCOLLIS, and IPENERGY. */ 
    498                 iso.Error = (float*****)MALLOC(sizeof(float****)*(unsigned)NISO ); 
    499                 iso.Error[ipISO] = (float****)MALLOC(sizeof(float***)*(unsigned)LIMELM ); 
    500  
    501                 iso.ErrorFactor = (float*****)MALLOC(sizeof(float****)*(unsigned)NISO ); 
    502                 iso.ErrorFactor[ipISO] = (float****)MALLOC(sizeof(float***)*(unsigned)LIMELM ); 
    503         } 
    504  
    505         /* Total of exchange collisions out of 2^3S into singlet states for every species in the sequence. */ 
    506         iso.qTot2TripS = (double**)MALLOC(sizeof(double*)*(unsigned)NISO ); 
    507         iso.qTot2TripS[ipISO] = (double*)MALLOC(sizeof(double)*(unsigned)LIMELM ); 
    508  
    509         /* In this array are stored the C values described in Robbins 68.       */ 
    510         HeliumAs = (double***)MALLOC(sizeof(double**)*(unsigned)(LIMELM) ); 
    511          
    512         /* branching ratios from all levels to all lower levels for all species. */ 
    513         iso.BranchRatio = (double****)MALLOC(sizeof(double***)*(unsigned)(NISO) ); 
    514         iso.BranchRatio[ipISO] = (double***)MALLOC(sizeof(double**)*(unsigned)(LIMELM) ); 
    515  
    516         /* In this array are stored the C values described in Robbins 68. */ 
    517         /* >>chng 06 jul 10, added "nelem" dimension to CascadeProb array. */ 
    518         iso.CascadeProb = (double****)MALLOC(sizeof(double***)*(unsigned)(NISO) ); 
    519         iso.CascadeProb[ipISO] = (double***)MALLOC(sizeof(double**)*(unsigned)(LIMELM) ); 
     452        /* first find the largest number of levels in any element in the he-like sequence */ 
     453        max_num_levels = 0; 
     454        max_n = 0; 
     455        for( nelem=ipHELIUM; nelem < LIMELM; nelem++ ) 
     456        { 
     457                /* only check elements that are turned on */ 
     458                if( nelem == ipHELIUM || dense.lgElmtOn[nelem] ) 
     459                { 
     460                        max_num_levels = MAX2( max_num_levels, iso.numLevels_max[ipHE_LIKE][nelem] ); 
     461                        max_n = MAX2( max_n, iso.n_HighestResolved_max[ipHE_LIKE][nelem] + iso.nCollapsed_max[ipHE_LIKE][nelem] ); 
     462                } 
     463        } 
    520464 
    521465        /*char ***helike chLevel[lev][lev][str]*/ 
     
    524468        /* In this array are stored the C values described in Robbins 68.       */ 
    525469        RobbinsC = (double**)MALLOC(sizeof(double*)*(unsigned)(max_num_levels) ); 
    526          
    527         /* Effective recombination into all levels for all species. */ 
    528         iso.RadEffec = (double**)MALLOC(sizeof(double*)*(unsigned)(max_num_levels) ); 
    529         iso.RadEffec[ipISO] = (double*)MALLOC(sizeof(double)*(unsigned)(max_num_levels) ); 
    530  
    531         if( iso.lgRandErrGen[ipISO] && iso.lgHugeCaseB[ipISO] ) 
    532         { 
    533                 /* Uncertainty in cascade probability and effective recombination, 
    534                  * only when error generation is turned on. */ 
    535                 iso.SigmaCascadeProb[ipISO] = (double**)MALLOC(sizeof(double*)*(unsigned)(max_num_levels) ); 
    536                 iso.SigmaRadEffec[ipISO] = (double*)MALLOC(sizeof(double)*(unsigned)(max_num_levels) ); 
    537         } 
    538470 
    539471        /* Wavenumber level energies for each element are stored here.  */ 
    540472        energies = (double**)MALLOC(sizeof(double*)*(unsigned)LIMELM ); 
    541473 
    542         /* The lifetime of individual levels.  iso.Lifetime[ipISO][LIMELM][iso.numLevels_max[ipHE_LIKE][nelem]] */ 
    543         iso.Lifetime = (double***)MALLOC(sizeof(double**)*(unsigned)NISO ); 
    544         iso.Lifetime[ipISO] = (double**)MALLOC(sizeof(double*)*(unsigned)LIMELM ); 
    545  
    546         if( iso.lgRandErrGen[ipISO] && iso.lgHugeCaseB[ipISO] ) 
    547         { 
    548                 /* The error in inverse lifetimes, for all species and all levels. */ 
    549                 iso.SigmaAtot[ipISO] = (double**)MALLOC(sizeof(double*)*(unsigned)LIMELM ); 
    550         } 
    551          
     474 
    552475        /* The sum of all A's coming out of a given n...used to make sure trend is monotonic    */ 
    553476        SumAPerN = (double**)MALLOC(sizeof(double*)*(unsigned)LIMELM ); 
     
    563486        { 
    564487                RobbinsC[ipLo] = (double*)MALLOC(sizeof(double)*(unsigned)(ipLo+1) ); 
    565  
    566                 if( iso.lgRandErrGen[ipISO] && iso.lgHugeCaseB[ipISO] ) 
    567                 { 
    568                         /* error in cascade probabilities, for all levels, but helium only. */ 
    569                         iso.SigmaCascadeProb[ipISO][ipLo] = (double*)MALLOC(sizeof(double)*(unsigned)(ipLo+1) ); 
    570                 } 
    571         } 
    572          
     488        } 
     489 
     490 
    573491        for( nelem=ipHELIUM; nelem < LIMELM; ++nelem ) 
    574492        { 
     
    577495                        /* energies for all levels and all species, info later stored elsewhere and space freed. */ 
    578496                        energies[nelem] = (double*)MALLOC(sizeof(double)*(unsigned)(iso.numLevels_max[ipHE_LIKE][nelem]) ); 
    579  
    580                         /* In this array are stored the C values described in Robbins 68.        
    581                          * this is a permanent one for helium only.     */ 
    582                         iso.CascadeProb[ipISO][nelem] = (double**)MALLOC(sizeof(double*)*(unsigned)(iso.numLevels_max[ipHE_LIKE][nelem]) ); 
    583                          
    584                         /* If enabled, malloc the remaining dimensions of the error infrastructure. */ 
    585                         if( iso.lgRandErrGen[ipISO] ) 
    586                         { 
    587                                 /* Here we add one slot for rates involving the continuum and one additional for an electric fence. */ 
    588                                 iso.Error[ipISO][nelem] = (float***)MALLOC(sizeof(float**)*(unsigned)(iso.numLevels_max[ipHE_LIKE][nelem]+2) ); 
    589  
    590                                 iso.ErrorFactor[ipISO][nelem] = (float***)MALLOC(sizeof(float**)*(unsigned)(iso.numLevels_max[ipHE_LIKE][nelem]+2) ); 
    591  
    592                                 for( i = 1; i< iso.numLevels_max[ipHE_LIKE][nelem] + 1; i++ ) 
    593                                 { 
    594                                         iso.Error[ipISO][nelem][i] = (float**)MALLOC(sizeof(float*)*(unsigned)(i+1) ); 
    595  
    596                                         iso.ErrorFactor[ipISO][nelem][i] = (float**)MALLOC(sizeof(float*)*(unsigned)(i+1) ); 
    597  
    598                                         for( j = 0; j<i+1; j++ ) 
    599                                         { 
    600                                                 iso.Error[ipISO][nelem][i][j] = (float*)MALLOC(sizeof(float)*(unsigned)(3) ); 
    601  
    602                                                 iso.ErrorFactor[ipISO][nelem][i][j] = (float*)MALLOC(sizeof(float)*(unsigned)(3) ); 
    603  
    604                                                 /* set each of these to negative one */ 
    605                                                 for( i1=0; i1<3; i1++ ) 
    606                                                 { 
    607                                                         iso.Error[ipISO][nelem][i][j][i1] = -1.f; 
    608                                                         iso.ErrorFactor[ipISO][nelem][i][j][i1] = -1.f; 
    609                                                 } 
    610                                         } 
    611                                 } 
    612  
    613                                 if( iso.lgHugeCaseB[ipISO] ) 
    614                                 { 
    615                                         iso.SigmaAtot[ipISO][nelem] = (double*)MALLOC(sizeof(double)*(unsigned)(iso.numLevels_max[ipHE_LIKE][nelem]) ); 
    616                                 } 
    617                         } 
    618                          
    619                         HeliumAs[nelem] = (double**)MALLOC(sizeof(double*)*(unsigned)(iso.numLevels_max[ipHE_LIKE][nelem]+1) ); 
    620  
    621                         iso.BranchRatio[ipISO][nelem] = (double**)MALLOC(sizeof(double*)*(unsigned)(iso.numLevels_max[ipHE_LIKE][nelem]+1) ); 
    622  
    623                         for( i = 1; i< iso.numLevels_max[ipHE_LIKE][nelem]; i++ ) 
    624                         { 
    625                                 HeliumAs[nelem][i] = (double*)MALLOC(sizeof(double)*(unsigned)(i+1) ); 
    626  
    627                                 iso.BranchRatio[ipISO][nelem][i] = (double*)MALLOC(sizeof(double)*(unsigned)(i+1) ); 
    628  
    629                                 for( j = 0; j< i; j++ ) 
    630                 { 
    631  
    632                                         HeliumAs[nelem][i][j] = -DBL_MAX; 
    633                                         iso.BranchRatio[ipISO][nelem][i][j] = -DBL_MAX; 
    634                                 } 
    635                         } 
    636  
    637                         /* malloc dimension for number of levels of each species. */ 
    638                         iso.Lifetime[ipISO][nelem] = (double*)MALLOC(sizeof(double)*(unsigned)(iso.numLevels_max[ipHE_LIKE][nelem]) ); 
    639                          
     497         
    640498                        /* The sum of all A's coming out of a given n...used to make sure trend is monotonic    */ 
    641499                        SumAPerN[nelem] = (double*)MALLOC(sizeof(double)*                               (unsigned)(iso.n_HighestResolved_max[ipHE_LIKE][nelem] + iso.nCollapsed_max[ipHE_LIKE][nelem] + 1) ); 
    642                          
    643                         /* malloc final dimension of cascade probabilities. */ 
    644                         for( i = 0; i < iso.numLevels_max[ipHE_LIKE][nelem]; ++i) 
    645                         { 
    646                                 iso.CascadeProb[ipISO][nelem][i] = (double*)MALLOC(sizeof(double)*(unsigned)(i+1) ); 
    647  
    648                                 for( j = 0; j< i; j++ ) 
    649                 { 
    650                                         iso.CascadeProb[ipISO][nelem][i][j] = -DBL_MAX; 
    651                                 } 
    652                         } 
    653500                } 
    654501        } 
     
    704551                        iso.Lifetime[ipISO][nelem][ipHe1s1S] = 0.; 
    705552                        iso.CascadeProb[ipISO][nelem][ipHe1s1S][ipHe1s1S] = 1.; 
    706                         if( iso.lgRandErrGen[ipISO] && iso.lgHugeCaseB[ipISO] ) 
     553                        if( iso.lgRandErrGen[ipISO] ) 
    707554                        { 
    708555                                iso.SigmaAtot[ipISO][nelem][ipHe1s1S] = 0.; 
    709                                 iso.SigmaCascadeProb[ipISO][ipHe1s1S][ipHe1s1S] = 0.; 
     556                                iso.SigmaCascadeProb[ipISO][nelem][ipHe1s1S][ipHe1s1S] = 0.; 
    710557                        } 
    711558                        StatesElem[ipHE_LIKE][nelem][ipHe1s1S].g = 1.f; 
     
    726573                                        ( N_(ipHi) - n_effs[ipHi] >= 0. ) ); 
    727574 
    728                                 HeliumAs[nelem][ipHi][ipHi] = 0.; 
    729                                  
    730575                                if(ipHi >= ipFirstCollapsed ) 
    731576                                { 
     
    748593                                        double Enerwn, Aul, Aul1; 
    749594                                         
    750                                         if( !iso.lgHugeCaseB[ipISO] ) 
    751595                                        { 
    752596                                                /** \todo       1 all this should already be true. */ 
     
    816660                                                */ 
    817661 
    818                                                 /* The Transitions structure does not exist if helike.lgHugeCaseB is true, so only 
    819                                                  * set these values if false.  */ 
    820                                                 if( !iso.lgHugeCaseB[ipISO] ) 
    821                                                 { 
    822                                                         Transitions[ipHE_LIKE][nelem][ipHi][ipLo].EnergyWN = (float)Enerwn; 
    823                                                         Transitions[ipHE_LIKE][nelem][ipHi][ipLo].EnergyErg = (float)(Enerwn*WAVNRYD*EN1RYD); 
    824                                                         Transitions[ipHE_LIKE][nelem][ipHi][ipLo].EnergyK = (float)(Enerwn*WAVNRYD*TE1RYD ); 
    825                                                 } 
     662                                                Transitions[ipHE_LIKE][nelem][ipHi][ipLo].EnergyWN = (float)Enerwn; 
     663                                                Transitions[ipHE_LIKE][nelem][ipHi][ipLo].EnergyErg = (float)(Enerwn*WAVNRYD*EN1RYD); 
     664                                                Transitions[ipHE_LIKE][nelem][ipHi][ipLo].EnergyK = (float)(Enerwn*WAVNRYD*TE1RYD ); 
    826665                                        } 
    827666                                         
     
    888727                                                } 
    889728 
    890                                                 /* Transitions structure only exists if iso.lgHugeCaseB[ipISO] is false. */ 
    891                                                 if( iso.lgHugeCaseB[ipISO] == false ) 
    892                                                 { 
    893                                                         /* set the transition probability */ 
    894                                                         Transitions[ipHE_LIKE][nelem][ipHi][ipLo].Emis.Aul = (float)Aul; 
    895  
    896                                                         ASSERT(Transitions[ipHE_LIKE][nelem][ipHi][ipLo].Emis.Aul > 0.); 
    897                                                 } 
    898  
    899                                                 HeliumAs[nelem][ipHi][ipLo] = Aul; 
    900                                                 ASSERT(HeliumAs[nelem][ipHi][ipLo] > 0.); 
     729                                                /* set the transition probability */ 
     730                                                Transitions[ipHE_LIKE][nelem][ipHi][ipLo].Emis.Aul = (float)Aul; 
     731                                                ASSERT(Transitions[ipHE_LIKE][nelem][ipHi][ipLo].Emis.Aul > 0.); 
    901732                                        } 
    902733                                } 
     
    914745                                        /* No stat. weight is needed because this is the lifetime of an individual level, 
    915746                                         * Collapsed or resolved is irrelevant. */ 
    916                                         if( !iso.lgHugeCaseB[ipISO] ) 
    917                                         { 
    918                                                 iso.Lifetime[ipISO][nelem][ipHi] += Transitions[ipHE_LIKE][nelem][ipHi][ipLo].Emis.Aul; 
    919                                         } 
    920                                         else 
    921                                         { 
    922                                                 iso.Lifetime[ipISO][nelem][ipHi] += HeliumAs[nelem][ipHi][ipLo]; 
    923                                         } 
     747                                        iso.Lifetime[ipISO][nelem][ipHi] += Transitions[ipHE_LIKE][nelem][ipHi][ipLo].Emis.Aul; 
    924748                                } 
    925749                                 
     
    931755                        /**********  Fine Structure Mixing - FSM ********/ 
    932756                        /************************************************/ 
    933                         if( iso.lgFSM[ipISO] && !iso.lgHugeCaseB[ipISO] ) 
     757                        if( iso.lgFSM[ipISO] == true ) 
    934758                        { 
    935759                                for( ipHi=ipHe2s3S; ipHi<iso.numLevels_max[ipHE_LIKE][nelem]; ipHi++ ) 
     
    950774                                RobbinsC[ipHi][ipHi] = 1.; 
    951775                                iso.CascadeProb[ipISO][nelem][ipHi][ipHi] = 1.; 
    952                                 if( iso.lgRandErrGen[ipISO] && iso.lgHugeCaseB[ipISO] ) 
     776                                if( iso.lgRandErrGen[ipISO] ) 
    953777                                { 
    954778                                        iso.SigmaAtot[ipISO][nelem][ipHi] = 0.; 
    955                                         iso.SigmaCascadeProb[ipISO][ipHi][ipHi] = 0.; 
     779                                        iso.SigmaCascadeProb[ipISO][nelem][ipHi][ipHi] = 0.; 
    956780                                } 
    957781                         
     
    961785                                        iso.CascadeProb[ipISO][nelem][ipHi][ipLo] = 0.; 
    962786 
    963                                         if( !iso.lgHugeCaseB[ipISO] ) 
    964                                         { 
    965                                                 /* there are some negative energy transitions, where the order 
    966                                                  * has changed, but these are not optically allowed, these are 
    967                                                  * same n, different L, forbidden transitions */ 
    968                                                 ASSERT( Transitions[ipHE_LIKE][nelem][ipHi][ipLo].EnergyWN > 0. || 
    969                                                         Transitions[ipHE_LIKE][nelem][ipHi][ipLo].Emis.Aul <= iso.SmallA ); 
    970