Changeset 1846

Show
Ignore:
Timestamp:
03/15/08 05:40:05 (10 months ago)
Author:
rjrw
Message:

Fix most VS warnings

Fix bug in ordering of reactants (made obvious by VS warning on
unreachable code).

Switch off extended grain network, to get better A/B comparison with
trunk code -- previously Si freeze-out on to grains stopped CO forming
deep in pdr_leiden_f1.

Location:
branches/newmole/source
Files:
12 modified

Legend:

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

    r1800 r1846  
    523523                fprintf( ioQQQ, "Sorry.\n" ); 
    524524                cdEXIT(EXIT_FAILURE); 
    525                 return 0.0; 
    526525        } 
    527526} 
  • branches/newmole/source/cont_ipoint.cpp

    r1780 r1846  
    5252          energy_ryd ); 
    5353        cdEXIT(EXIT_FAILURE); 
    54         return ipoint_v; 
    5554} 
    5655 
  • branches/newmole/source/grains_mie.cpp

    r1830 r1846  
    34273427        ShowMe(); 
    34283428        cdEXIT(EXIT_FAILURE); 
    3429         return x0; 
    34303429} 
    34313430 
  • branches/newmole/source/heat_sum.cpp

    r1830 r1846  
    106106                /* add in if real molecule and not counted above */ 
    107107                if(mole.list[i]->location == NULL && mole.list[i]->charge == 0) 
    108                         xNeutralParticleDensity += mole.list[i]->den; 
     108                        xNeutralParticleDensity += (realnum)mole.list[i]->den; 
    109109        } 
    110110 
  • branches/newmole/source/hydro_bauman.cpp

    r1780 r1846  
    10961096                cdEXIT(EXIT_FAILURE); 
    10971097        } 
    1098         return 0.0; 
    10991098} 
    11001099 
     
    12821281        printf( "This code should be inaccessible\n\n" ); 
    12831282        cdEXIT(EXIT_FAILURE); 
    1284         return null_mx; 
    12851283} 
    12861284 
     
    34543452        printf(" This code should be inaccessible\n\n"); 
    34553453        cdEXIT(EXIT_FAILURE); 
    3456         return 0.0; 
    34573454} 
    34583455 
  • branches/newmole/source/mole_drive.cpp

    r1835 r1846  
    786786 
    787787                } 
    788                 return; 
    789788        } 
    790789 
  • branches/newmole/source/mole_eval_balance.cpp

    r1838 r1846  
    114114                                        if (sp->nElem[nelem] != 0) 
    115115                                        { 
    116                                                 mole.xMoleChTrRate[nelem][sp->charge][rate->rvector[i]->charge] += rate_deriv[i]; 
     116                                                mole.xMoleChTrRate[nelem][sp->charge][rate->rvector[i]->charge] += (realnum) rate_deriv[i]; 
    117117                                                break; 
    118118                                        } 
  • branches/newmole/source/mole_h2.cpp

    r1830 r1846  
    114114        collider_density[4] = dense.xIonDense[ipHYDROGEN][1]; 
    115115        /* H3+ - assume that H3+ has same rates as proton */ 
    116         collider_density[4] += findspecies("H3+")->den; 
     116        collider_density[4] += (realnum)findspecies("H3+")->den; 
    117117 
    118118        ASSERT( fp_equal(hmi.H2_total ,collider_density[2]+collider_density[3]) ); 
  • branches/newmole/source/mole_reactions.cpp

    r1839 r1846  
    16931693                if (a.reactants[i]<b.reactants[i]) 
    16941694                        return true; 
    1695                 else 
     1695                else if (a.reactants[i]>b.reactants[i]) 
    16961696                        return false; 
    16971697        } 
     
    17001700                if (a.products[i]<b.products[i]) 
    17011701                        return true; 
    1702                 else 
     1702                else if (a.products[i]>b.products[i]) 
    17031703                        return false; 
    17041704        } 
     
    17081708struct udfa_reaction_s { 
    17091709  int index; 
    1710         struct formula_species l; 
     1710  formula_species l; 
    17111711  char source;            /* Calculated, Estimated, Literature compilation, Measured */ 
    17121712  double a, b, c, trange[2]; /* Overall scale and valid temperature range */ 
    17131713}; 
    1714 static map <struct formula_species,struct udfa_reaction_s *> udfatab; 
     1714static map <formula_species,struct udfa_reaction_s *> udfatab; 
    17151715 
    17161716STATIC void read_data(const char file[], void (*parse)(char *s)) 
     
    17381738  char *f; 
    17391739        struct udfa_reaction_s *r; 
    1740         map <struct formula_species, struct udfa_reaction_s *>::iterator p; 
     1740        map <formula_species, struct udfa_reaction_s *>::iterator p; 
    17411741        unsigned int havespecies = 1, i, n; 
    17421742        /* lgCRPHOT is true for CRPHOT reactions as we change the data 
     
    18451845STATIC void compare_udfa(struct mole_reaction_s *rate) 
    18461846{ 
    1847         struct formula_species s; 
     1847        formula_species s; 
    18481848        unsigned int n; 
    1849         map<struct formula_species,     struct udfa_reaction_s *>::iterator p; 
     1849        map<formula_species,    struct udfa_reaction_s *>::iterator p; 
    18501850        struct udfa_reaction_s *u; 
    18511851 
  • branches/newmole/source/mole_species.cpp

    r1742 r1846  
    230230                sp = newspecies("H2Ogrn",MOLECULE,MOLE_ACTIVE,NULL,1.00e-15, -238.9f); 
    231231                sp = newspecies("OHgrn ",MOLECULE,MOLE_ACTIVE,NULL,1.00e-15, 38.4f); 
    232                 if (1) 
     232                if (0) 
    233233                { 
    234234                        sp = newspecies("Cgrn  ",MOLECULE,MOLE_ACTIVE,NULL,1.00e-15, 711.2f); 
     
    650650                } 
    651651 
    652                 mole.grain_area = den_times_area; 
    653                 mole.grain_density = den_grains; 
     652                mole.grain_area = (realnum) den_times_area; 
     653                mole.grain_density = (realnum) den_grains; 
    654654 
    655655                double mole_cs = 1e-15; 
     
    657657                        mole.grain_saturation = 1.0; 
    658658                else 
    659                         mole.grain_saturation = 4*den_times_area/(mole_cs*adsorbed_density); 
     659                        mole.grain_saturation = (realnum) 4*den_times_area/(mole_cs*adsorbed_density); 
    660660        } 
    661661        else 
     
    690690                if(mole.list[i]->location && mole.list[i]->state == MOLE_ACTIVE)  
    691691                { 
    692                         *(mole.list[i]->location) = mole.list[i]->den; 
     692                        *(mole.list[i]->location) = (realnum) mole.list[i]->den; 
    693693                } 
    694694        } 
     
    765765                        for( nelem=ipHYDROGEN; nelem<LIMELM; ++nelem ) 
    766766                        { 
    767                                 total[nelem] += mole.list[i]->den*mole.list[i]->nElem[nelem]; 
     767                                total[nelem] += (realnum) mole.list[i]->den*mole.list[i]->nElem[nelem]; 
    768768                        } 
    769769                } 
  • branches/newmole/source/nemala2.cpp

    r1800 r1846  
    5151                                fprintf(ioQQQ," PROBLEM atmol_popsolve did not find molecular species %li\n",i); 
    5252                        } 
    53                         abund = SpeciesCurrent->den; 
     53                        abund = (realnum) SpeciesCurrent->den; 
    5454                } 
    5555                else 
  • branches/newmole/source/thirdparty.cpp

    r1800 r1846  
    1 /* This file contains routines (perhaps in modified form) written by third parties. 
     1/* This file contains routines (perhaps in moified form) written by third parties. 
    22 * Use and distribution of these works are determined by their respective copyrights. */ 
    33#include "cddefines.h"