Changeset 2085

Show
Ignore:
Timestamp:
05/19/08 12:30:10 (3 months ago)
Author:
rjrw
Message:

Remove some remaining inconsistencies between ion_solver and iso_level

Location:
trunk/source
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/source/ion_solver.cpp

    r1960 r2085  
    294294         * change ionization stages with this ladder - but do not remove from  
    295295         * the ladder */ 
    296         for( ion_to=dense.IonLow[nelem]; ion_to <= limit; ion_to++ ) 
     296        for( ion_to=dense.IonLow[nelem]; ion_to <= dense.IonHigh[nelem]; ion_to++ ) 
    297297        { 
    298298                for( ion_from=dense.IonLow[nelem]; ion_from <= dense.IonHigh[nelem]; ++ion_from ) 
     
    477477 
    478478                        totsrc += mole.source[nelem][ion]; 
    479                         /* sink next */ 
    480                         /*MAT( xmat, i, i ) += mole.sink[nelem][ion];*/ 
    481479                        MAT( xmat, i, i ) -= mole.sink[nelem][ion]; 
    482480                } 
  • trunk/source/iso_level.cpp

    r2084 r2085  
    333333                } 
    334334 
    335 #if     0 
     335                for( long ion=0; ion<=nelem+1; ++ion ) 
     336                { 
     337                        if( ion!=nelem-ipISO ) 
     338                        { 
     339                                /* recombination must be multiplied by a ratio of densities to get proper rate. */ 
     340                                source += mole.xMoleChTrRate[nelem][ion][nelem-ipISO] *  
     341                                        dense.xIonDense[nelem][ion] ; 
     342                                /* take ionization out of every level. */ 
     343                                sink += mole.xMoleChTrRate[nelem][nelem-ipISO][ion]; 
     344                        } 
     345                } 
     346 
    336347                /* add in source and sink terms from molecular network. */ 
    337                 CodeReview(); /* Check... */ 
    338                 if( nelem == ipISO && conv.nTotalIoniz ) 
     348                if( conv.nTotalIoniz > 1 || iteration > 1) 
    339349                { 
    340350                        /* these are the external source and sink terms */ 
     
    343353                        sink += mole.sink[nelem][nelem-ipISO]; 
    344354                } 
    345 #endif 
    346  
    347355 
    348356                if( nelem-ipISO >= 1 && ionbal.RateIonizTot[nelem][nelem-ipISO-1] > 0.)