Changeset 793

Show
Ignore:
Timestamp:
01/22/07 06:16:29 (1 year ago)
Author:
gary
Message:

cddefines.h, iter_startend.cpp, parse_drive.cpp, radius_increment.cpp, rt_tau_reset.cpp, sanity_check.cpp, service.cpp - remove unused second parameter from e2 function

slow/*.in - update asserted values after e2 function bug fix in r786

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/source/cddefines.h

    r791 r793  
    858858 
    859859/**e2 second exponential integral  
    860  \param t optical depth argument  
    861  \param t1n  exp(-x) - previously stored */ 
     860 \param t optical depth argument */ 
    862861double e2( 
    863           double t,  
    864           double tln); 
     862          double t ); 
    865863 
    866864/**ee1 first exponential integral 
  • trunk/source/iter_startend.cpp

    r787 r793  
    417417                /* e2(tau) in inward direction, up to illuminated face, this is used to get the 
    418418                 * recombination escape probability */ 
    419                 opac.E2TauAbsFace[i] = (float)e2(opac.TauAbsFace[i],opac.ExpmTau[i]); 
     419                opac.E2TauAbsFace[i] = (float)e2(opac.TauAbsFace[i] ); 
    420420        } 
    421421 
     
    11921192 
    11931193                /* e2(tau) in inward direction, up to illuminated face */ 
    1194                 opac.E2TauAbsFace[i] = (float)e2(opac.TauAbsFace[i],opac.ExpmTau[i]); 
     1194                opac.E2TauAbsFace[i] = (float)e2(opac.TauAbsFace[i]); 
    11951195                rfield.reflin[i] = 0.; 
    11961196                rfield.ConEmitReflec[i] = 0.; 
  • trunk/source/parse_drive.cpp

    r759 r793  
    9898                        double tau = pow( 10. , ((double)i/4. - 5.) ); 
    9999                        fprintf(ioQQQ,"tau\t%.3e\t exp-tau\t%.5e\t e1 tau\t%.5e  \t ee2 tau\t%.5e \n", 
    100                                 tau , sexp(tau) , ee1(tau) , e2(tau , sexp(tau) ) ); 
     100                                tau , sexp(tau) , ee1(tau) , e2(tau ) ); 
    101101                } 
    102102                cdEXIT(1); 
  • trunk/source/radius_increment.cpp

    r759 r793  
    3434#include "rt.h" 
    3535#include "radius.h" 
    36 /*cmshft - so compton scattering shift of spectrum */ 
     36/*cmshft - so Compton scattering shift of spectrum */ 
    3737static void cmshft(void); 
    3838 
     
    104104                                         * the error can approach 1%, and depends on the convergence criteria. 
    105105                                         * the code does not try to converge these quantities in an absolute sense,  
    106                                          * only the quantites relative to the electron or hydrogen density.  so it is not 
     106                                         * only the quantities relative to the electron or hydrogen density.  so it is not 
    107107                                         * safe to do the assert for small values  
    108108                                         * change is to only do this branch if abundance is large enough to be detected by 
     
    110110#                                       define ERR_CHK  1.001 
    111111                                        double err_chk = ERR_CHK; 
    112                                         /* >>chng 05 sep 02, when low-T solver used soln is approximate, 
     112                                        /* >>chng 05 sep 02, when low-T solver used solution is approximate, 
    113113                                         * and it must not matter (lot-T solver should not be used if it 
    114114                                         * does matter - so use more liberal expectation */ 
     
    243243        } 
    244244 
    245         /* H 21 cm equilibrium timescale, H21cm returns H (not e) collisional deexcit rate (not cs) */ 
     245        /* H 21 cm equilibrium timescale, H21cm returns H (not e) collisional deexcitation rate (not cs) */ 
    246246        t = H21cm_H_atom( phycon.te )* dense.xIonDense[ipHELIUM][ipHYDROGEN] + 
    247247                /* >>chng 02 feb 14, add electron term as per discussion in */ 
     
    381381        /* only update this if results will be punched */ 
    382382        /* tests show that always evaluating this changes fast run of 
    383          * parispn from 26.7 sec to 35.1 sec */ 
     383         * pn_paris from 26.7 sec to 35.1 sec */ 
    384384        /* >>chng 05 mar 01, must always update them since used for transmission */ 
    385385        if( rfield.lgOpacityFine /*&& rfield.lgPunchOpacityFine*/ ) 
     
    401401                        for( i=0; i < rfield.nflux-1; i++ ) 
    402402                        { 
    403                                 /* find transmission coef if lower and upper bounds of coarse continuum is within 
     403                                /* find transmission coefficient if lower and upper bounds of coarse continuum is within 
    404404                                 * boundaries of fine continuum  
    405405                                 * unity is default */ 
     
    409409                                        for( j=rfield.ipnt_coarse_2_fine[i]; j<rfield.ipnt_coarse_2_fine[i+1]; ++j ) 
    410410                                        { 
    411                                                 /* find transmission coef for this zone */ 
     411                                                /* find transmission coefficient for this zone */ 
    412412                                                /* here assume continuum transmission is exp(-tau) */ 
    413413                                                /*rfield.trans_coef[i] +=  
     
    460460                 * at the 1% - 5% level.) sphere effects in 
    461461                 * drNext was set by NEXTDR and will be next dr */ 
    462                 /* compute both total and thompson scat rad acceleration */ 
     462                /* compute both total and Thomson scat rad acceleration */ 
    463463                rforce += (rfield.flux[i] + rfield.outlin[i] + rfield.outlin_noplot[i]+ rfield.ConInterOut[i])* 
    464464                        rfield.anu[i]*(opac.opacity_abs[i] +  
     
    477477 
    478478                /* e2(tau) in inward direction, up to illuminated face */ 
    479                 opac.E2TauAbsFace[i] = (float)e2(opac.TauAbsFace[i],opac.ExpmTau[i]); 
     479                opac.E2TauAbsFace[i] = (float)e2(opac.TauAbsFace[i]); 
    480480                ASSERT( opac.E2TauAbsFace[i] <= 1. && opac.E2TauAbsFace[i] >= 0. ); 
    481481 
     
    483483                if( iteration > 1 ) 
    484484                { 
    485                         /* e2 from current position to outet edge of shell */ 
     485                        /* e2 from current position to outer edge of shell */ 
    486486                        float tau = MAX2(SMALLFLOAT , opac.TauAbsTotal[i] - opac.TauAbsFace[i] ); 
    487                         opac.E2TauAbsOut[i] = (float)e2( tau , sexp(tau) ); 
     487                        opac.E2TauAbsOut[i] = (float)e2( tau ); 
    488488                } 
    489489 
     
    504504 
    505505                /* this simulates the behavior in C90 and before, 
    506                  * first attenuate flux acculumated so far, then 
     506                 * first attenuate flux accumulated so far, then 
    507507                 * add on flux from this zone  
    508508                rfield.ConEmitOut[i] *= (float)opfac;*/ 
     
    538538                /* ratio of current to incident continuum, converted to optical depth */ 
    539539                /* >>chng 99 apr 23, this crashed on alpha due to underflow to zero in argy 
    540                  * to log.  defended two tways - above checks that ratio of fluxes is large enough,  
     540                 * to log.  defended two ways - above checks that ratio of fluxes is large enough,  
    541541                 * and here convert to double. 
    542542                 * error found by Peter van Hoof */ 
     
    546546 
    547547                /* this is computed absorption optical depth to illuminated face */ 
    548                 /* >>chng 06 jul 11, add geometry factor for illumination at an angle - bugfix - should have 
     548                /* >>chng 06 jul 11, add geometry factor for illumination at an angle - bug fix - should have 
    549549                 * always been there */ 
    550550                double tau_true = opac.TauAbsFace[iso.ipIsoLevNIonCon[ipH_LIKE][ipHYDROGEN][0]-1]*geometry.DirectionalCosin; 
     
    560560                         * incremented in RT_tau_inc */ 
    561561                        fprintf( ioQQQ, 
    562                                 " PROBLEM radius_increment lyman continuum insanity zone %li, effective tau=%g, atomic tau=%g simple tau=%g\n", 
     562                                " PROBLEM radius_increment Lyman continuum insanity zone %li, effective tau=%g, atomic tau=%g simple tau=%g\n", 
    563563                                nzone,  
    564564                                tau_effec ,  
     
    593593        } 
    594594 
    595         /* now do slight reshuffling of energy due to compton scattering */ 
     595        /* now do slight reshuffling of energy due to Compton scattering */ 
    596596        cmshft(); 
    597597 
    598598        relec *= EN1RYD; 
    599599 
    600         /* radiative acceleration; xMassDensity is gm per cc, eval when PTOT called */ 
     600        /* radiative acceleration; xMassDensity is gm per cc, evaluated when PTOT called */ 
    601601        t = 1./SPEEDLIGHT/dense.xMassDensity; 
    602602        /* >>chng 03 feb 01, lgLineRadPresOn was missing */ 
     
    632632        /* sound is sound travel time, sqrt term is sound speed */ 
    633633        timesc.sound_speed_isothermal = sqrt(pressure.PresGasCurr/dense.xMassDensity); 
    634         /* adiabatic sound speed assuming monatomic gas - gamnma is 5/3*/ 
     634        /* adiabatic sound speed assuming monatomic gas - gamma is 5/3*/ 
    635635        timesc.sound_speed_adiabatic = sqrt(5.*pressure.PresGasCurr/(3.*dense.xMassDensity) ); 
    636636        timesc.sound += radius.drad_x_fillfac / timesc.sound_speed_isothermal; 
     
    659659                        if( opac.TauAbsGeo[0][i] < 30. ) 
    660660                        { 
    661                                 /* ConEmitLocal is diffuse emission per unit vol, fill fac 
     661                                /* ConEmitLocal is diffuse emission per unit vol, fill factor 
    662662                                 * the 1/2 comes from isotropic emission 
    663663                                 * scatsv(i) = (flux(i)+ConInterOut(i))*0.5*scatop(i) 
    664                                  * >>chng 97 apr 25, remove fac of 2 to 
    665                                  * get agreement wth lightman&white 
     664                                 * >>chng 97 apr 25, remove factor of 2 to 
     665                                 * get agreement with Lightman&white 
    666666                                 * Reflec_Diffuse_Cont = (ConEmitLocal(i)+scatsv(i)) * dReff *E2TauAbsFace(i) 
    667667                                 * >>chng 97 may 08, needed 1/2 in front of ConEmitLocal  
    668668                                 * had been there, but also with scatsv, and lost both 
    669                                  * when /2 removed to get agreement with lightman and white */ 
     669                                 * when /2 removed to get agreement with Lightman and white */ 
    670670                                /* >>chng 99 dec 21, add ConLocNoInter to account for rec continua 
    671671                                 * >>chng 01 jul 01, remove ConLocNoInter from code - only had thick brems */ 
     
    681681                                  radius.drad_x_fillfac*opac.E2TauAbsFace[i]*radius.r1r0sq); 
    682682 
    683                                 /* >>chng 97 apr 25, remove fac of 2 to get 
    684                                  * agreement wth lightman&white */ 
     683                                /* >>chng 97 apr 25, remove factor of 2 to get 
     684                                 * agreement with Lightman&white */ 
    685685                                rfield.reflin[i] += (float)(rfield.outlin[i]*opac.opacity_sct[i]* 
    686686                                  radius.drad_x_fillfac*opac.E2TauAbsFace[i]*radius.r1r0sq); 
     
    772772        hydro.TexcLya = (float)TexcLine( &EmisLines[ipH_LIKE][ipHYDROGEN][ipH2p][ipH1s] ); 
    773773 
    774         /* count number of times Lya excit temp hotter than gas */ 
     774        /* count number of times Lya excitation temp hotter than gas */ 
    775775        if( hydro.TexcLya > phycon.te ) 
    776776        { 
     
    844844        molcol("ADD ",ioQQQ); 
    845845 
    846         /* increment forming the mean ionizatin and temperature */ 
     846        /* increment forming the mean ionization and temperature */ 
    847847        MeanInc(); 
    848848 
     
    976976 
    977977 
    978 /*cmshft - so compton scattering shift of spectrum */ 
     978/*cmshft - so Compton scattering shift of spectrum */ 
    979979static void cmshft(void) 
    980980{ 
  • trunk/source/rt_tau_reset.cpp

    r759 r793  
    293293                /* e2( tau across shell), optical depth from ill face to shielded face of cloud  
    294294                 * not that opac.TauAbsFace is reset to small number just after this */ 
    295                 opac.E2TauAbsTotal[i] = (float)e2( opac.TauAbsTotal[i] , sexp( opac.TauAbsTotal[i] ) ); 
     295                opac.E2TauAbsTotal[i] = (float)e2( opac.TauAbsTotal[i] ); 
    296296                /* TauAbsFace and TauScatFace are abs and sct optical depth to ill face */ 
    297297                opac.TauScatFace[i] = opac.taumin; 
  • trunk/source/sanity_check.cpp

    r785 r793  
    589589 
    590590                /* check that e2 is ok */ 
    591                 ans1 = e2(x,exp(-x)); 
     591                ans1 = e2(x); 
    592592                ans2 = expn( 2 , x ); 
    593593                if( fabs(ans1-ans2)/(ans1+ans2) > 1e-6 ) 
  • trunk/source/service.cpp

    r792 r793  
    299299double e2( 
    300300        /* the argument to E2 */ 
    301         double t,  
    302         /* exp(-t) - previously stored */ 
    303         double exp_mt) 
     301        double t ) 
    304302{ 
    305303        /* use recurrence relation */ 
  • trunk/tsuite/slow/feii_blr_n09_p18_Z20.in

    r749 r793  
    4343assert line luminosity "totl"  1402 5.211 //total O IV] 1402  
    4444// 
    45 assert line luminosity "totl"  1549 5.978 //total of sum of both C IV comp 
     45// >>chng 07 jan 20, from 5.978 to 5.953, e2 bug 
     46assert line luminosity "totl"  1549 5.953 //total of sum of both C IV comp 
    4647// 
    4748// >>chng 06 nov 29, from 5.394 to 5.415, Badnell DR 
  • trunk/tsuite/slow/feii_blr_n12_p19.in

    r749 r793  
    3939// >>chng 05 jul 17, from 5.39 to 5.37, first run in 6 mo 
    4040// >>chng 06 aug 09, from 5.37 to 5.51 Meudon 06, Bowen change 
    41 assert line luminosity "totl"  1549 5.51 error 0.1 
     41// >>chng 07 jan 20, from 5.51 to 5.45, e2 bug 
     42assert line luminosity "totl"  1549 5.45 error 0.1 
    4243// 
    4344assert line luminosity "he 2"  1640 6.732 //total He II Balmer-alpha 1640 
  • trunk/tsuite/slow/feii_blr_n12_p19_Z20.in

    r749 r793  
    3131// 
    3232// >>chng 06 aug 09, from 5.161 to 5.255 Meudon 06, Bowen change 
    33 assert line luminosity "totl"  1397 5.255 //total of sum of both Si IV comp 
     33// >>chng 07 jan 20, from 5.255 to 5.236, e2 bug 
     34assert line luminosity "totl"  1397 5.236 //total of sum of both Si IV comp 
    3435//  
    3536// >>chng 06 aub 06, update O+2 & N+2 CT, from 2.932 to 2.978 
    3637// >>chng 06 aug 09, from 2.978 to 3.105 Meudon 06, Bowen change 
    37 assert line luminosity "totl"  1402 3.105 //total O IV] 1402  
     38// >>chng 07 jan 20, from 3.105 to 3.076, e2 bug 
     39assert line luminosity "totl"  1402 3.076 //total O IV] 1402  
    3840//  
    3941// >>chng 06 aub 06, update O+2 & N+2 CT, from 5.088 to 5.116 
    4042// >>chng 06 aug 09, from 5.116 to 5.196 Meudon 06, Bowen change 
    4143// >>chng 06 nov 29, from 5.196 to 5.146, Badnell DR 
    42 assert line luminosity "totl"  1549 5.146 //total of sum of both C IV comp 
     44// >>chng 07 jan 20, from 5.146 to 5.108, e2 bug 
     45assert line luminosity "totl"  1549 5.108 //total of sum of both C IV comp 
    4346//  
    4447// >>chng 06 aub 06, update O+2 & N+2 CT, from 6.527 to 6.494 
     
    4750// >>chng 06 aub 06, update O+2 & N+2 CT, from 4.567 to 4.598 
    4851// >>chng 06 aug 09, from 4.597 to 4.671 Meudon 06, Bowen change 
    49 assert line luminosity "o  3"  1666 4.671 //total O III] 1666 
     52// >>chng 07 jan 20, from 4.671 to 4.634, e2 bug 
     53assert line luminosity "o  3"  1666 4.634 //total O III] 1666 
    5054//  
    5155// >>chng 06 aug 09, from 4.409 to 4.458 Meudon 06, Bowen change 
     
    5458// >>chng 05 sep 30, from 6.776 to 6.756, update charge transfer // >>chng 06 aub 06, update O+2 & N+2 CT, from 6.756 to 6.791 
    5559// >>chng 06 aug 09, from 6.691 to 6.823 Meudon 06, Bowen change 
    56 assert line luminosity "totl"  1888 6.823 //total of sum of Si III] 1892+ 
     60// >>chng 07 jan 20, from 6.823 to 6.798, e2 bug 
     61assert line luminosity "totl"  1888 6.798 //total of sum of Si III] 1892+ 
    5762// 
    5863// >>chng 06 aub 06, update O+2 & N+2 CT, from 6.220 to 6.259 
  • trunk/tsuite/slow/feii_blr_n13_p22.in

    r749 r793  
    3737// 
    3838// >>chng 06 aub 06, update O+2 & N+2 CT, from 9.554 to 9.610 
    39 assert line luminosity "totl"  1397 9.610 //total of sum of both Si IV comp 
     39// >>chng 07 jan 20, from 9.610 to 9.593, e2 bug 
     40assert line luminosity "totl"  1397 9.593 //total of sum of both Si IV comp 
    4041// 
    4142// >>chng 06 aub 06, update O+2 & N+2 CT, from 8.672 to 8.738 
     
    4445// 
    4546// >>chng 06 aub 06, update O+2 & N+2 CT, from 9.856 to 9.900 
    46 assert line luminosity "totl"  1549 9.900  //total of sum of both C IV comp 
     47// >>chng 07 jan 20, from 9.900 to 9.876, e2 bug 
     48assert line luminosity "totl"  1549 9.876  //total of sum of both C IV comp 
    4749// 
    4850// >>chng 06 aub 06, update O+2 & N+2 CT, from 9.255 to 9.510 
     
    6870// >>chng 06 jan 14, from 7.019 to 7.039, drift up 
    6971// >>chng 06 aub 06, update O+2 & N+2 CT, from 7.039 to 7.092 
    70 assert line luminosity "totl"  2326 7.092  
     72// >>chng 07 jan 20, from 7.092 to 7.037, e2 bug 
     73assert line luminosity "totl"  2326 7.037  
    7174// 
    7275// >>chng 06 aub 06, update O+2 & N+2 CT, from 8.985 to 9.007 
     
    8588// 
    8689// >>chng 06 aub 06, update O+2 & N+2 CT, from 9.181 to 9.224 
    87 assert line luminosity "He 1" 584.3 9.224 
     90// >>chng 07 jan 20, from 9.224 to 9.243, e2 bug 
     91assert line luminosity "He 1" 584.3 9.243 
    8892// 
    8993// >>chng 06 aub 06, update O+2 & N+2 CT, from 9.255 to 9.510 
  • trunk/tsuite/slow/feii_blr_n13_p22_Z20.in

    r749 r793  
    4343assert line luminosity "totl"  1402 8.714  //total O IV] 1402  
    4444//  
    45 assert line luminosity "totl"  1549 9.763  //total of sum of both C IV comp 
     45// >>chng 07 jan 20, from 9.763 to 9.740, e2 bug 
     46assert line luminosity "totl"  1549 9.740  //total of sum of both C IV comp 
    4647//  
    4748//total He II Balmer-alpha 1640