Changeset 2031 for branches/newmole/source/conv_init_solution.cpp
- Timestamp:
- 05/07/08 16:29:10 (8 months ago)
- Files:
-
- 1 modified
-
branches/newmole/source/conv_init_solution.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/newmole/source/conv_init_solution.cpp
r2023 r2031 130 130 for( i=0; i<mole.num_calc; ++i ) 131 131 { 132 for (nelem=ipHYDROGEN;nelem<LIMELM;nelem++)133 { 134 if( dense.lgElmtOn[nelem] && mole.list[i]->location == NULL )132 if (mole.list[i]->location == NULL) 133 { 134 for (nelem=ipHYDROGEN;nelem<LIMELM;nelem++) 135 135 { 136 realnum dens_elemsp = (realnum) mole.list[i]->den*mole.list[i]->nElem[nelem]; 137 if ( FracMoleMax*dense.gas_phase[nelem] < dens_elemsp ) 136 if( dense.lgElmtOn[nelem] ) 138 137 { 139 FracMoleMax = dens_elemsp/dense.gas_phase[nelem]; 140 ipMax = i; 138 realnum dens_elemsp = (realnum) mole.list[i]->den*mole.list[i]->nElem[nelem]; 139 if ( FracMoleMax*dense.gas_phase[nelem] < dens_elemsp ) 140 { 141 FracMoleMax = dens_elemsp/dense.gas_phase[nelem]; 142 ipMax = i; 143 } 141 144 } 142 145 } … … 148 151 for(i=0;i<mole.num_calc;++i) 149 152 { 150 OxyInGrains += (1 - mole.list[i]->lgGas_Phase)*mole.list[i]->den*mole.list[i]->nElem[ipOXYGEN]; 153 if (! mole.list[i]->lgGas_Phase ) 154 OxyInGrains += mole.list[i]->den*mole.list[i]->nElem[ipOXYGEN]; 151 155 } 152 156 /* this is now fraction of O in ices */
