Changeset 2045

Show
Ignore:
Timestamp:
05/12/08 03:16:01 (4 months ago)
Author:
gary
Message:

rt_diffuse.cpp - BUGFIX - in case where extremely large increase in ionization threshold continuum index for ionization edge could extend beyond the number of cells

ion_trim.cpp - when the density falls to VERY low values, too low to compute on 32 bit cpu, error message is printed and code aborts. Improve information in error message.

service.cpp - fix misspelled words, one use in output

init_coreload.cpp - trivial changes in line skips

Location:
trunk/source
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/source/init_coreload.cpp

    r2036 r2045  
    306306        grid.lgGridDone = false; 
    307307        grid.lgStrictRepeat = false; 
     308 
    308309        /* these are energy range... if not changed with command, 0. says just use energy limits of mesh */ 
    309310        grid.LoEnergy_keV = 0.; 
    310311        grid.HiEnergy_keV = 0.; 
    311312 
    312  
    313313        PunchFilesInit(); 
    314314 
  • trunk/source/ion_trim.cpp

    r1960 r2045  
    55#include "cddefines.h" 
    66#include "elementnames.h" 
     7#include "radius.h" 
    78#include "heavy.h" 
    89#include "conv.h" 
     
    190191                        elementnames.chElementName[nelem]); 
    191192                fprintf(ioQQQ, 
    192                         "Turn off the element or do not consider gas with low density, the current hydrogen density is %.2e cm-3.\n", 
     193                        "Turn off the element with the command ELEMENT XXX OFF or do not consider " 
     194                        "gas with low density, the current hydrogen density is %.2e cm-3.\n", 
    193195                        dense.gas_phase[ipHYDROGEN]); 
    194196                fprintf(ioQQQ, 
    195                         "abort flag being set.\n"); 
     197                        "The outer radius of the cloud is %.2e cm - should a stopping " 
     198                        "radius be set?\n", 
     199                        radius.Radius ); 
     200                fprintf(ioQQQ, 
     201                        "The abort flag is being set - the calculation is stopping.\n"); 
    196202                lgAbort = true; 
    197203                return; 
  • trunk/source/rt_diffuse.cpp

    r1822 r2045  
    384384 
    385385                                ip = Heavy.ipHeavy[nelem][ion]-1; 
     386                                ASSERT( ip >= 0 ); 
    386387 
    387388                                /* nflux was reset upward in ConvInitSolution to encompass all 
    388389                                 * possible line and continuum emission.  this test should not 
    389                                  * possibly fail.  It could if the ionization were to increase with depth. 
    390                                  * This is important because the nflux cell in ConInterOut is used to carry out the 
    391                                  * unit integration, and if it gets clobbered by diffuse emission the code 
    392                                  * will declare insanity in PrtComment */ 
    393                                 ASSERT( ip >= 0 && ip < rfield.nflux ); 
     390                                 * possibly fail.  It could if the ionization were to increase with depth 
     391                                 * although the continuum mesh is designed to deal with this. 
     392                                 * This test is important because the nflux cell in ConInterOut  
     393                                 * is used to carry out the unit integration, and if it gets  
     394                                 * clobbered by diffuse emission the code will declare  
     395                                 * insanity in PrtComment */ 
     396                                if( ip >= rfield.nflux ) 
     397                                        continue; 
    394398 
    395399                                /* get shell number, stat weights for this species */ 
  • trunk/source/service.cpp

    r2035 r2045  
    140140        if( lgFail ) 
    141141        { 
    142                 fprintf( ioQQQ, " A syntax error occured while splitting the string: \"%s\"\n", str.c_str() ); 
     142                fprintf( ioQQQ, " A syntax error occurred while splitting the string: \"%s\"\n", str.c_str() ); 
    143143                fprintf( ioQQQ, " The separator is \"%s\". Empty substrings are not allowed.\n", sep.c_str() ); 
    144144                cdEXIT(EXIT_FAILURE); 
     
    929929        else 
    930930        { 
    931                 /* round number off for 9.3 format, neg numb not possilbe */ 
     931                /* round number off for 9.3 format, neg numb not possible */ 
    932932                tvalue = value; 
    933933                xlog = log10( tvalue );