Changeset 1906

Show
Ignore:
Timestamp:
04/01/08 09:29:16 (9 months ago)
Author:
gary
Message:

cddefines.h atmdat_chianti.cpp - add variable to identify species within state

atmdat_lamda.cpp - remember atomic weight from lamda database

cont_createpointers.cpp - bugfix - save dampXvel rather than damp

prt_lines_continuum.cpp - comments

punch_do.cpp, punch_line.cpp - comments

rt_escprob.cpp - assert damping constant is positive for partial redistribution

rt_tau_inc.cpp - increment database line optical depths

Location:
trunk/source
Files:
10 modified

Legend:

Unmodified
Added
Removed
  • trunk/source/atmdat_chianti.cpp

    r1815 r1906  
    263263                strncpy(atmolStates[intNS][j].chLabel,Species[intNS].chptrSpName, 4); 
    264264                atmolStates[intNS][j].chLabel[4] = '\0'; 
     265 
     266                /*Index for keep track of species index*/ 
     267                atmolStates[intNS][j].AtmolIndex = intNS; 
    265268 
    266269                fstatwt = (realnum)atof(&chLine[SWS]); 
  • trunk/source/atmdat_lamda.cpp

    r1815 r1906  
    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        { 
     
    127141                strncpy(atmolStates[intNS][nMolLevs].chLabel,Species[intNS].chptrSpName, 4); 
    128142                atmolStates[intNS][nMolLevs].chLabel[4] = '\0'; 
     143                /*Keeping track of species index*/ 
     144                atmolStates[intNS][nMolLevs].AtmolIndex = intNS; 
    129145 
    130146                long i = 1; 
     
    224240                /* don't need the energy in GHz, so throw it away. */ 
    225241                FFmtRead( chLine, &i, sizeof(chLine), &lgEOL ); 
    226                 fenergyK = (realnum)FFmtRead( chLine, &i, sizeof(chLine), &lgEOL ); 
    227  
     242                fenergyK = (realnum)(((atmolStates[intNS][ipHi].energy) -(atmolStates[intNS][ipLo].energy))*T1CM); 
    228243                ASSERT( index == intrtct + 1 ); 
    229244 
  • trunk/source/cddefines.h

    r1899 r1906  
    12821282        char chConfig[11]; 
    12831283 
     1284        /*Index to identify the quantum state with the species index*/ 
     1285        int AtmolIndex; 
     1286 
    12841287        species   *sp; 
    12851288 
  • trunk/source/cont_createpointers.cpp

    r1815 r1906  
    604604                atmolEmis[i].gf = (realnum)GetGF(atmolEmis[i].Aul, 
    605605                        atmolEmis[i].tran->EnergyWN,atmolEmis[i].tran->Hi->g); 
    606                 realnum fdampXvel = (realnum)(atmolEmis[i].Aul/ 
     606                atmolEmis[i].dampXvel = (realnum)(atmolEmis[i].Aul/ 
    607607                                        atmolEmis[i].tran->EnergyWN/PI4); 
    608                 atmolEmis[i].damp = fdampXvel/(realnum)atmolEmis[i].tran->Hi->lifetime ; 
     608                atmolEmis[i].damp = -1000.0; 
     609                //atmolEmis[i].damp = fdampXvel/(realnum)atmolEmis[i].tran->Hi->lifetime ; 
    609610                /*Put null terminated line label into chLab*/ 
    610611                strncpy(chLab,atmolEmis[i].tran->Hi->chLabel,4); 
  • trunk/source/nemala.txt

    r1837 r1906  
    1 to use the Chianti and Leiden data base files uncomment Nemala_Start at atmdat_readion.cpp near line 1433 
     1to use the Chianti and Leiden data base files uncomment Nemala_Start at  
     2atmdat_readin.cpp near line 1433 
  • trunk/source/prt_lines_continuum.cpp

    r1732 r1906  
    304304                        /* div by opac.E2TauAbsFace[i] because ConEmitReflec has already 
    305305                         * been corrected for this - emergent_line will introduce a  
    306                          * further correction so this will cancil the extra factor */ 
     306                         * further correction so this will cancel the extra factor */ 
    307307                        double xIntenIn =  
    308308                                ((double)rfield.ConEmitReflec[i-1]/SDIV((double)opac.E2TauAbsFace[i-1]) +  
  • trunk/source/punch_do.cpp

    r1889 r1906  
    21382138                        else if( strcmp(punch.chPunch[ipPun],"LINS") == 0 ) 
    21392139                        { 
    2140                                 /* punch line structure */ 
     2140                                /* punch line emissivity */ 
    21412141                                if( strcmp(chTime,"LAST") != 0 ) 
    21422142                                { 
  • trunk/source/punch_line.cpp

    r1771 r1906  
    144144        else if( strcmp(chDo,"PUNS") == 0 ) 
    145145        { 
    146                 /* punch lines structure command */ 
     146                /* punch lines emissivity command */ 
    147147                static bool lgMustGetLines=true, 
    148148                        lgBadLine=false; 
  • trunk/source/rt_escprob.cpp

    r1771 r1906  
    4848 
    4949        DEBUG_ENTRY( "esc_PRD_1side()" ); 
    50  
     50        ASSERT( a>0.0 ); 
    5151 
    5252        /* this is one of the three fundamental escape probability routines 
  • trunk/source/rt_tau_inc.cpp

    r1822 r1906  
    194194        H2_RT_tau_inc(); 
    195195 
     196        /*Atomic & Molecular Lines*/ 
     197        for(i=0; i < linesAdded2; i++) 
     198        { 
     199                RT_line_one_tauinc(atmolEmis[i].tran, 
     200                        -10 , -10 , -10 , i ); 
     201        } 
    196202        /* following is for static atmosphere */ 
    197203        if( wind.windv == 0. )