Changeset 1838 for branches/newmole/source/ion_solver.cpp
- Timestamp:
- 03/09/08 16:59:05 (10 months ago)
- Files:
-
- 1 modified
-
branches/newmole/source/ion_solver.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/newmole/source/ion_solver.cpp
r1835 r1838 378 378 * matrix is singular */ 379 379 totsrc = 0.; 380 /*>>chng 06 nov 28 only include source from molecules if we have an estimated first 381 * solution - first test is that we have called mole at least twice, 382 * second test is that we are on a later iteration */ 383 if( conv.nTotalIoniz > 1 || iteration > 1 ) 384 { 385 386 for( i=0; i<ion_range;i++ ) 387 { 388 ion = i+ion_low; 389 390 /* these are the external source and sink terms */ 391 /* need negative sign to get positive pops */ 392 source[i] -= mole.source[nelem][ion]; 393 totsrc += mole.source[nelem][ion]; 394 MAT( xmat, i, i ) -= mole.sink[nelem][ion]; 395 } 380 381 for( i=0; i<ion_range;i++ ) 382 { 383 ion = i+ion_low; 384 385 /* these are the external source and sink terms */ 386 /* need negative sign to get positive pops */ 387 source[i] -= mole.source[nelem][ion]; 388 totsrc += mole.source[nelem][ion]; 389 MAT( xmat, i, i ) -= mole.sink[nelem][ion]; 396 390 } 397 391 … … 1030 1024 fprintf( ioQQQ, "\n" ); 1031 1025 1026 /* grain ionization - not total rate but should be dominant process */ 1027 fprintf( ioQQQ, " %s ion xfr mol " ,elementnames.chElementSym[nelem]); 1028 for( ion=0; ion < dense.IonHigh[nelem]; ion++ ) 1029 { 1030 fprintf( ioQQQ, " %9.2e", mole.xMoleChTrRate[nelem][ion][ion+1] ); 1031 } 1032 fprintf( ioQQQ, "\n" ); 1033 1032 1034 /* charge exchange ionization */ 1033 1035 fprintf( ioQQQ, " %s chr trn ion " ,elementnames.chElementSym[nelem] ); … … 1080 1082 { 1081 1083 fprintf( ioQQQ, " %9.2e", gv.GrainChTrRate[nelem][ion+1][ion] ); 1084 } 1085 fprintf( ioQQQ, "\n" ); 1086 1087 fprintf( ioQQQ, " %s rec xfr mol " ,elementnames.chElementSym[nelem]); 1088 for( ion=0; ion < dense.IonHigh[nelem]; ion++ ) 1089 { 1090 fprintf( ioQQQ, " %9.2e", mole.xMoleChTrRate[nelem][ion+1][ion] ); 1082 1091 } 1083 1092 fprintf( ioQQQ, "\n" );
