Show
Ignore:
Timestamp:
05/10/08 09:03:02 (6 months ago)
Author:
peter
Message:

Merging all changes from mainline upto r2033, except r1902.

Files:
1 modified

Legend:

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

    r1815 r2034  
    5252        ipLo = 0; 
    5353        j = 0; 
    54         while(intlnct < 5) 
     54        while(intlnct < 3) 
    5555        { 
    5656                intlnct++; 
     
    6161                } 
    6262        } 
    63  
     63        /*Extracting out the molecular weight*/ 
     64        if(read_whole_line( chLine , (int)sizeof(chLine) , atmolLevDATA ) == NULL ) 
     65        { 
     66                fprintf( ioQQQ, " The data file %s is corrupted .\n",chEFilename); 
     67                cdEXIT(EXIT_FAILURE); 
     68        } 
     69        Species[intNS].fmolweight = (realnum)atof(chLine); 
     70 
     71        /*Discard this line*/ 
     72        if(read_whole_line( chLine , (int)sizeof(chLine) , atmolLevDATA ) == NULL ) 
     73        { 
     74                fprintf( ioQQQ, " The data file %s is corrupted .\n",chEFilename); 
     75                cdEXIT(EXIT_FAILURE); 
     76        } 
     77        /*Reading in the number of energy levels*/ 
    6478        if(read_whole_line( chLine , (int)sizeof(chLine) , atmolLevDATA ) == NULL ) 
    6579        { 
     
    99113        for( intcollindex = 0; intcollindex <NUM_COLLIDERS; intcollindex++ ) 
    100114        { 
    101                 CollRatesArray[intNS][intcollindex] = (double**)MALLOC((unsigned long)(ngMolLevs) * sizeof(double*)); 
    102                 for( ipHi = 0; ipHi<ngMolLevs; ipHi++ ) 
    103                 { 
    104                         CollRatesArray[intNS][intcollindex][ipHi] = (double*)MALLOC((unsigned long)(ngMolLevs) * sizeof(double)); 
    105                         for( ipLo = 0; ipLo<ngMolLevs; ipLo++ ) 
    106                         { 
    107                                 CollRatesArray[intNS][intcollindex][ipHi][ipLo] = 0.0; 
    108                         } 
    109                 } 
    110         } 
     115                CollRatesArray[intNS][intcollindex] = NULL; 
     116        } 
     117 
    111118 
    112119        if(read_whole_line( chLine , (int)sizeof(chLine) , atmolLevDATA ) == NULL ) 
     
    224231                /* don't need the energy in GHz, so throw it away. */ 
    225232                FFmtRead( chLine, &i, sizeof(chLine), &lgEOL ); 
    226                 fenergyK = (realnum)FFmtRead( chLine, &i, sizeof(chLine), &lgEOL ); 
    227  
     233                fenergyK = (realnum)(((atmolStates[intNS][ipHi].energy) -(atmolStates[intNS][ipLo].energy))*T1CM); 
    228234                ASSERT( index == intrtct + 1 ); 
    229235 
     
    329335                        TotalInsanity(); 
    330336                } 
     337                /*This is where we allocate memory if the collider exists*/ 
     338                /*Needed to take care of the he collisions*/ 
     339                CollRatesArray[intNS][intCollIndex] = (double**)MALLOC((unsigned long)(ngMolLevs) * sizeof(double*)); 
     340                for( ipHi = 0; ipHi<ngMolLevs; ipHi++ ) 
     341                { 
     342                        CollRatesArray[intNS][intCollIndex][ipHi] = (double*)MALLOC((unsigned long)(ngMolLevs) * sizeof(double)); 
     343                        for( ipLo = 0; ipLo<ngMolLevs; ipLo++ ) 
     344                        { 
     345                                CollRatesArray[intNS][intCollIndex][ipHi][ipLo] = 0.0; 
     346                        } 
     347                } 
    331348                if(read_whole_line( chLine , (int)sizeof(chLine)  , atmolLevDATA ) == NULL ) 
    332349                {