Changeset 684

Show
Ignore:
Timestamp:
12/05/06 13:55:14 (2 years ago)
Author:
rjrw
Message:

Patch back to deal with SEGVs on previous step.

Still need to a) reorganize startup b) improve treatment of
decoupling within the network.

Location:
branches/newmole/source
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/newmole/source/mole_co_etc.cpp

    r680 r684  
    189189        sp = newspecies("H2CCl+",MOLECULE,ACTIVE,NULL,0.00e+00); 
    190190        sp = newspecies("ClO+  ",MOLECULE,ACTIVE,NULL,4.00e-15); 
    191         if( gv.lgDustOn && mole.lgGrain_mole_deplete ) 
     191        if(1 || (gv.lgDustOn && mole.lgGrain_mole_deplete )) 
    192192        { 
    193193                sp = newspecies("COgrn ",MOLECULE,ACTIVE,NULL,1.00e-15); 
  • branches/newmole/source/mole_co_reactions.cpp

    r680 r684  
    16861686 
    16871687        /* >>chng 06 feb 28, turn off this rate when no grain molecules */ 
    1688         if (mole.lgGrain_mole_deplete) 
     1688        /* >>chng 06 dec 05 rjrw: do this in newreact rather than rate */ 
     1689        for( nd=0; nd < gv.nBin; nd++ ) 
    16891690        { 
    1690                 for( nd=0; nd < gv.nBin; nd++ ) 
    1691                 { 
    1692                         /* >>chng 06 mar 04, update expression for projected grain surface area, PvH */ 
    1693                         den_times_area += gv.bin[nd]->IntArea/4.*gv.bin[nd]->cnv_H_pCM3; 
    1694                 } 
     1691                /* >>chng 06 mar 04, update expression for projected grain surface area, PvH */ 
     1692                den_times_area += gv.bin[nd]->IntArea/4.*gv.bin[nd]->cnv_H_pCM3; 
    16951693        } 
    16961694 
  • branches/newmole/source/mole_co_solve.cpp

    r680 r684  
    5050        float abundan; 
    5151        struct chem_element_s *element; 
     52        double sum; 
    5253 
    5354        CO_step();                  /* Calculate the matrix elements */ 
     55 
     56        /* Ugly hack to deal with species which have become uncoupled */ 
     57        for (i=0;i<mole.num_comole_calc;i++) 
     58        { 
     59                sum = 0.; 
     60                for (j=0;j<mole.num_comole_calc;j++) 
     61                { 
     62                        sum = sum+fabs(mole.c[i][j]); 
     63                } 
     64                if (sum < SMALLFLOAT && fabs(mole.b[i]) < SMALLFLOAT) 
     65                { 
     66                        mole.c[i][i] = 1.; 
     67                } 
     68        } 
    5469 
    5570        cartot_mol = dense.xMolecules[ipCARBON] + findspecies("C")->hevmol + findspecies("C+")->hevmol;