Show
Ignore:
Timestamp:
06/13/08 11:23:57 (7 months ago)
Author:
peter
Message:

source/grains_mie.cpp:
source/grains.cpp:
source/grainvar.h:

Speed up the code for initializing the grain electron yields. No change in functionality.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/source/grains_mie.cpp

    r1891 r2108  
    10881088        mie_next_data(chFile,io2,chLine,&dl); 
    10891089        mie_read_realnum(chFile,chLine,&gv.bin[nd]->dustp[0],true,dl); 
     1090        /* constant needed in the evaluation of the electron escape length */ 
     1091        gv.bin[nd]->eec = pow((double)gv.bin[nd]->dustp[0],-0.85); 
    10901092 
    10911093        /* molecular weight of grain molecule (amu) */ 
     
    11081110        mie_next_data(chFile,io2,chLine,&dl); 
    11091111        mie_read_realnum(chFile,chLine,&gv.bin[nd]->AvRadius,true,dl); 
     1112        gv.bin[nd]->eyc = 1./gv.bin[nd]->AvRadius + 1.e7; 
    11101113 
    11111114        /* average grain area <4pi*a^2> for entire size distr (cm^2) */ 
     
    12791282                                        gv.bin[nd2]->dustp[j] = gv.bin[nd]->dustp[j]; 
    12801283                                } 
     1284                                gv.bin[nd2]->eec = gv.bin[nd]->eec; 
     1285                                gv.bin[nd2]->eyc = gv.bin[nd]->eyc; 
    12811286                                gv.bin[nd2]->DustWorkFcn = gv.bin[nd]->DustWorkFcn; 
    12821287                                gv.bin[nd2]->BandGap = gv.bin[nd]->BandGap;