Changeset 2034 for branches/c08_branch/source/iso_continuum_lower.cpp
- Timestamp:
- 05/10/08 09:03:02 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/c08_branch/source/iso_continuum_lower.cpp
r1751 r2034 21 21 ASSERT( ipISO <= 1 ); 22 22 23 if( ipISO == ipH_LIKE ) 24 eff_charge = nelem + 1; 25 else 26 eff_charge = nelem; 23 eff_charge = nelem + 1 - ipISO; 27 24 28 25 /* Particle packing - the density here should be density of all nuclei in the plasma */ … … 83 80 iso.n_HighestResolved_local[ipISO][nelem] = nc; 84 81 iso.nCollapsed_local[ipISO][nelem] = 0; 85 if( ipISO == ipH_LIKE ) 86 iso.numLevels_local[ipISO][nelem] = (long)( 0.5 * nc * ( nc + 1 ) ); 87 else if( ipISO ==ipHE_LIKE ) 88 iso.numLevels_local[ipISO][nelem] = nc*nc + nc + 1; 89 else 90 TotalInsanity(); 82 iso.numLevels_local[ipISO][nelem] = iso_get_total_num_levels( ipISO, nc, 0 ); 91 83 } 92 84 /* Here is the case where the critical n lies among the one or more collapsed levels */ … … 99 91 iso.n_HighestResolved_local[ipISO][nelem] = iso.n_HighestResolved_max[ipISO][nelem]; 100 92 iso.nCollapsed_local[ipISO][nelem] = nc - iso.n_HighestResolved_local[ipISO][nelem]; 101 if( ipISO == ipH_LIKE ) 102 { 103 iso.numLevels_local[ipISO][nelem] = (long)( 104 iso.n_HighestResolved_max[ipISO][nelem] * 0.5 * 105 ( iso.n_HighestResolved_max[ipISO][nelem] + 1 ) ) + iso.nCollapsed_local[ipISO][nelem]; 106 } 107 else if( ipISO ==ipHE_LIKE ) 108 { 109 iso.numLevels_local[ipISO][nelem] = iso.n_HighestResolved_local[ipISO][nelem]*iso.n_HighestResolved_local[ipISO][nelem] + 110 iso.n_HighestResolved_local[ipISO][nelem] + 1 + iso.nCollapsed_local[ipISO][nelem]; 111 } 112 else 113 TotalInsanity(); 93 iso.numLevels_local[ipISO][nelem] = 94 iso_get_total_num_levels( ipISO, iso.n_HighestResolved_max[ipISO][nelem], iso.nCollapsed_local[ipISO][nelem] ); 114 95 } 115 96 /* This is usually where control will flow, because in most conditions the continuum will not be lowered. … … 121 102 iso.n_HighestResolved_local[ipISO][nelem] = iso.n_HighestResolved_max[ipISO][nelem]; 122 103 123 /* if levels were lowered on last pas tbut are not now, must reeval */104 /* if levels were lowered on last pass but are not now, must reeval */ 124 105 if( iso.lgLevelsLowered[ipISO][nelem] ) 125 106 {
