Changeset 1209

Show
Ignore:
Timestamp:
06/24/07 09:41:13 (11 months ago)
Author:
rjrw
Message:

Move molecular effects into level matrix solve, following pattern
of ion_solver.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/newmole/source/hydrolevelpop.cpp

    r1137 r1209  
    1616#include "hydrogenic.h" 
    1717#include "dynamics.h" 
     18#include "mole.h" 
    1819/*lint -e662 Possible access of out-of-bounds pointer*/ 
    1920 
     
    332333        } 
    333334 
     335        CodeReview(); /* Check signs */ 
     336        if( conv.nTotalIoniz > 1 || iteration > 1 ) 
     337        { 
     338                 
     339                /* these are the external source and sink terms */ 
     340                /* source first */ 
     341                creation[ipH1s] += mole.source[nelem][i]/SDIV(dense.xIonDense[nelem][nelem+1]); 
     342                 
     343                for( ipLo=ipH1s; ipLo<iso.numLevels_local[ipH_LIKE][nelem]; ++ipLo ) 
     344                { 
     345                        z[ipLo][ipLo] += mole.sink[nelem][ipH_LIKE]; 
     346                } 
     347        } 
     348 
    334349        /* ===================================================================  
    335350         * 
  • branches/newmole/source/iso_ionize_recombine.cpp

    r1137 r1209  
    99#include "grainvar.h" 
    1010#include "hmi.h" 
    11 #include "mole.h" 
    1211#include "secondaries.h" 
    1312#include "iso.h" 
     
    120119                sum; 
    121120 
    122         /** The following are rates used in determining the ionization balance of helium */ 
    123         float hep_destroy; 
    124  
    125121        DEBUG_ENTRY( "iso_ionize_recombine()" ); 
    126122 
     
    200196 
    201197                /* The following terms in co.c destroy He+ and thereby need to be included  
    202                  * here.  Also included in the sum of co.hep_destroy are the contributions 
    203                  * to the recombination due to hmole_step.*/ 
    204  
    205                 hep_destroy = (float) CO_sink_rate("He+"); 
    206                  
    207                 iso.RateCont2Level[ipISO][nelem][ipHe1s1S] += hep_destroy; 
    208                 /*fprintf(ioQQQ,"DEBUG co hep destroy %e\n",co.hep_destroy );*/ 
     198                 * here. */ 
    209199 
    210200                /* this is ioniz of He due to ct with all other gas constituents */