Changeset 2266


Ignore:
Timestamp:
2008-07-26T10:13:34Z (15 years ago)
Author:
Gary J. Ferland
Message:

these are a number of small changes which should not affect the calculations in any way

sumlin -> SumLin? - many files have this as the sole change

update comments and remove commented out code in many files

assert_results.cpp - add total insanity block if key not recognized

atom_hyperfine.cpp - define damping constant as very small number - had not been defined before

Location:
trunk/source
Files:
32 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/assert_results.cpp

    r2217 r2266  
    544544                        strcpy( chAssertLineLabel[nAsserts] , "+Col");
    545545                }
     546                else
     547                {
     548                        /*no option found */
     549                        fprintf( ioQQQ,
     550                                " I could not identify an iso-sequence on this Case A/B command.\n");
     551                        fprintf( ioQQQ, " Sorry.\n" );
     552                        cdEXIT(EXIT_FAILURE);
     553                }
    546554        }
    547555        else if( nMatch("DEPA",input.chCARDCAPS ) )
     
    19421950                        strcat( chElemLabelCaseB , chNumb );
    19431951
    1944                         int iCase = 1;
     1952                        /* sets lowest quantum number index */
     1953                        int iCase;
    19451954                        if( strcmp( "Ca A", chAssertLineLabel[i] ) == 0 )
    19461955                                iCase = 0;
     
    19571966                        {
    19581967                                fprintf(ioASSERT,"                 Species  nHi nLo  Wl  Computed  Asserted       error\n");
    1959                                 /* limit of 10 is because that is all we printed and saved in prt_lines_hydro */
     1968                                /* limit of 10 is because that is all we printed and saved in prt_lines_hydro
     1969                                 * wavelengths will come out of atmdat.WaveLengthCaseB - first index is
     1970                                 * nelem on C scale, H is 0, second two are configurations of line on
     1971                                 * physics scale, so Ha is 3-2 */
    19601972                                for( long int ipLo=1+iCase; ipLo< MIN2(10,nHighestPrinted-1); ++ipLo )
    19611973                                {
  • trunk/source/atmdat.h

    r2012 r2266  
    203203        bool lgCollIonOn;
    204204
    205         /** wavelengths of Hummer & Storey case B lines for H - O */
     205        /** wavelengths of Hummer & Storey case B lines for H - O
     206         * first dimension is atomic number of C scale, H is 0
     207         * next two are upper and lower configurations on physics
     208         * scale - Lya is 2-1, Lyb is 3-1, Ha is 3-2, etc */
    206209        realnum WaveLengthCaseB[8][25][24];
    207210
  • trunk/source/atom_feii.cpp

    r2165 r2266  
    17621762
    17631763        /* get the normalization line */
    1764         if( LineSv[LineSave.ipNormWavL].sumlin[LineSave.lgLineEmergent] > 0. )
    1765         {
    1766                 renorm = LineSave.ScaleNormLine/LineSv[LineSave.ipNormWavL].sumlin[LineSave.lgLineEmergent];
     1764        if( LineSv[LineSave.ipNormWavL].SumLine[LineSave.lgLineEmergent] > 0. )
     1765        {
     1766                renorm = LineSave.ScaleNormLine/LineSv[LineSave.ipNormWavL].SumLine[LineSave.lgLineEmergent];
    17671767        }
    17681768        else
  • trunk/source/atom_hyperfine.cpp

    r2130 r2266  
    487487                        wavelength = (realnum)help[2];
    488488                        HFLines[j].Emis->Aul = (realnum)Aul;
     489                        HFLines[j].Emis->damp = 1e-20f;
    489490                        HFLines[j].Hi->g = (realnum) (2*(spin + .5) + 1);
    490491                        HFLines[j].Lo->g = (realnum) (2*(spin - .5) + 1);
  • trunk/source/cddrive.cpp

    r2217 r2266  
    13771377
    13781378                                /* does the normalization line have a positive intensity*/
    1379                                 if( LineSv[LineSave.ipNormWavL].sumlin[LineSave.lgLineEmergent] > 0. )
     1379                                if( LineSv[LineSave.ipNormWavL].SumLine[LineSave.lgLineEmergent] > 0. )
    13801380                                {
    1381                                         *relint = LineSv[ipobs].sumlin[LineSave.lgLineEmergent]/LineSv[LineSave.ipNormWavL].sumlin[LineSave.lgLineEmergent]*
     1381                                        *relint = LineSv[ipobs].SumLine[LineSave.lgLineEmergent]/LineSv[LineSave.ipNormWavL].SumLine[LineSave.lgLineEmergent]*
    13821382                                          LineSave.ScaleNormLine;
    13831383                                }
     
    13881388
    13891389                                /* return log of current line intensity if it is positive */
    1390                                 if( LineSv[ipobs].sumlin[LineSave.lgLineEmergent] > 0. )
     1390                                if( LineSv[ipobs].SumLine[LineSave.lgLineEmergent] > 0. )
    13911391                                {
    1392                                         *absint = log10(LineSv[ipobs].sumlin[LineSave.lgLineEmergent]) + radius.Conv2PrtInten;
     1392                                        *absint = log10(LineSv[ipobs].SumLine[LineSave.lgLineEmergent]) + radius.Conv2PrtInten;
    13931393                                }
    13941394                                else
     
    14521452
    14531453        /* does the normalization line have a positive intensity*/
    1454         if( LineSv[LineSave.ipNormWavL].sumlin[LineSave.lgLineEmergent] > 0. )
    1455         {
    1456                 *relint = LineSv[ipLine].sumlin[LineSave.lgLineEmergent]/LineSv[LineSave.ipNormWavL].sumlin[LineSave.lgLineEmergent]*
     1454        if( LineSv[LineSave.ipNormWavL].SumLine[LineSave.lgLineEmergent] > 0. )
     1455        {
     1456                *relint = LineSv[ipLine].SumLine[LineSave.lgLineEmergent]/LineSv[LineSave.ipNormWavL].SumLine[LineSave.lgLineEmergent]*
    14571457                  LineSave.ScaleNormLine;
    14581458        }
     
    14631463
    14641464        /* return log of current line intensity if it is positive */
    1465         if( LineSv[ipLine].sumlin[LineSave.lgLineEmergent] > 0. )
    1466         {
    1467                 *absint = log10(LineSv[ipLine].sumlin[LineSave.lgLineEmergent]) + radius.Conv2PrtInten;
     1465        if( LineSv[ipLine].SumLine[LineSave.lgLineEmergent] > 0. )
     1466        {
     1467                *absint = log10(LineSv[ipLine].SumLine[LineSave.lgLineEmergent]) + radius.Conv2PrtInten;
    14681468        }
    14691469        else
     
    15411541
    15421542                                /* does the normalization line have a positive intensity*/
    1543                                 if( LineSv[LineSave.ipNormWavL].sumlin[1] > 0. )
     1543                                if( LineSv[LineSave.ipNormWavL].SumLine[1] > 0. )
    15441544                                {
    1545                                         *relint = LineSv[ipobs].sumlin[1]/LineSv[LineSave.ipNormWavL].sumlin[1]*
     1545                                        *relint = LineSv[ipobs].SumLine[1]/LineSv[LineSave.ipNormWavL].SumLine[1]*
    15461546                                          LineSave.ScaleNormLine;
    15471547                                }
     
    15521552
    15531553                                /* return log of current line intensity if it is positive */
    1554                                 if( LineSv[ipobs].sumlin[1] > 0. )
     1554                                if( LineSv[ipobs].SumLine[1] > 0. )
    15551555                                {
    1556                                         *absint = log10(LineSv[ipobs].sumlin[1]) + radius.Conv2PrtInten;
     1556                                        *absint = log10(LineSv[ipobs].SumLine[1]) + radius.Conv2PrtInten;
    15571557                                }
    15581558                                else
  • trunk/source/continuum.txt

    r1757 r2266  
    88SummedCon is added together in RT_OTS_Update (in rtots.c)
    99
    10 rfield.SummedCon[i] = rfield.flux[i] + rfield.SummedDif[i];
     10rfield.SummedCon[i] = rfield.flux[0][i] + rfield.SummedDif[i];
    1111
    1212rfield.SummedDif[i] = rfield.otscon[i] + rfield.otslin[i] +
    13         rfield.ConInterOut[i]*rfield.lgOutOnly + rfield.outlin[i] +
     13        rfield.ConInterOut[i]*rfield.lgOutOnly + rfield.outlin[0][i] +
    1414        rfield.ConOTS_local_OTS_rate[i];
    1515
     
    7878
    7979incident continua
    80 rfield.flux_total_incident[j] - the original incident continuum
    81 rfield.flux - outward attenuated incident continuum
     80rfield.flux_total_incident[0][j] - the original incident continuum
     81rfield.flux[0] - outward attenuated incident continuum
    8282        incident continuum is initally defined in ContSetIntensity
    8383
     
    8686reflected continua
    8787inward or reflected part of continuum, only computed in open geometry
    88 rfield.ConRefIncid[j] reflected incident continuum
     88rfield.ConRefIncid[0][j] reflected incident continuum
    8989rfield.ConRefDiff[j]) reflected diffuse continua
    90 rfield.reflin[j] reflected lines
     90rfield.reflin[0][j] reflected lines
    9191
    9292====================================================================
     
    102102
    103103rfield.ConInterOut - integrated outward beam, interacts
    104 rfield.ConEmitOut - total outward emission
     104rfield.ConEmitOut[0] - total outward emission
    105105        calculated from local diffuse emission in radius_increment
    106106
     
    112112
    113113contains
    114 rfield.flux[i]
     114rfield.flux[0][i]
    115115rfield.otslin[i]
    116116rfield.otscon[i]
     
    118118====================================================================
    119119
    120 rfield.outlin[i]
     120rfield.outlin[0][i]
    121121outward lines, included in ionizing radiation
    122122
  • trunk/source/conv_base.cpp

    r2131 r2266  
    989989        }
    990990
    991         /* check on heating and cooling if vary temp model */
     991        /* check on heating and cooling if vary temp model
     992         * >>chng 08 jul 01, over the code's entire history it had tested whether
     993         * this is a constant temperature simulation and did not do this test if
     994         * the thermal solution was not done.  There are some cases where we do
     995         * want to specify the temperature and then find the heating or cooling -
     996         * this is done in calculations of cooling curves for instance.  With this
     997         * change the heating/cooling are converged even in a constant temperature
     998         * sim.  this does make CT sims run more slowly but with greater accuracy
     999         * if heating or cooling is reported */
    9921000        if( !thermal.lgTemperatureConstant )
    9931001        {
  • trunk/source/init_defaults_preparse.cpp

    r2133 r2266  
    22 * others.  For conditions of distribution and use see copyright notice in license.txt */
    33/*InitDefaultsPreparse initialization at start of simulation, called from cloudy
    4 * before parser, sets initial values of quantities changed by parser */
     4* before parser, sets initial values of quantities changed by parser
     5* called for each point in a grid but one time in multi-iteration sims */
    56#include "cddefines.h"
    67#include "physconst.h"
     
    3738 * should only set defaults for variables that change in the parser.
    3839 * It does not initialize variables for the start of a calculation.  That
    39  * is done by InitSimPostparse */
     40 * is done by InitSimPostparse
     41 * called one time in multi iteration sim */
    4042void InitDefaultsPreparse( void )
    4143{
  • trunk/source/init_sim_postparse.cpp

    r1914 r2266  
    22 * others.  For conditions of distribution and use see copyright notice in license.txt */
    33/*InitSimPostparse initialization at start of simulation, called from cloudy
    4 * after parser, will be called one time per sim in grid */
     4* after parser, will be called one time per sim in grid
     5* is not called for every iteration */
    56#include "cddefines.h"
    67#include "dense.h"
  • trunk/source/iter_end_chk.cpp

    r2133 r2266  
    364364                {
    365365                        /* the second line is always set to something, default is H beta */
    366                         if( LineSv[StopCalc.ipStopLin2[i]].sumlin[LineSave.lgLineEmergent] > 0. )
     366                        if( LineSv[StopCalc.ipStopLin2[i]].SumLine[LineSave.lgLineEmergent] > 0. )
    367367                        {
    368368                                char chString[10];
    369                                 if( LineSv[StopCalc.ipStopLin1[i]].sumlin[LineSave.lgLineEmergent]/
    370                                         LineSv[StopCalc.ipStopLin2[i]].sumlin[LineSave.lgLineEmergent] > StopCalc.stpint[i] )
     369                                if( LineSv[StopCalc.ipStopLin1[i]].SumLine[LineSave.lgLineEmergent]/
     370                                        LineSv[StopCalc.ipStopLin2[i]].SumLine[LineSave.lgLineEmergent] > StopCalc.stpint[i] )
    371371                                {
    372372                                        lgDone = true;
  • trunk/source/lines.h

    r2012 r2266  
    113113        char chALab[5];
    114114
    115         /** >>chng 06 mar 09, make intrinsic and emergent one array */
    116         /** integrated intensity of the line, [0] is intrinsic, [1] emergent */
    117         double sumlin[2];
     115        /** integrated intensity of the line,
     116         * [0] is intrinsic,
     117         * [1] emergent
     118         * [2] is intrinsic,
     119         * [3] emergent
     120         */
     121        double SumLine[4];
    118122
    119123        /** the emissivity, per unit vol, for current conditions, */
  • trunk/source/lines_service.cpp

    r2130 r2266  
    470470                /* not first pass, sum lines only
    471471                 * total emission from vol */
    472                 LineSv[LineSave.nsum].sumlin[0] += xInten*radius.dVeff;
     472                LineSv[LineSave.nsum].SumLine[0] += xInten*radius.dVeff;
    473473                /* local emissivity in line */
    474474                LineSv[LineSave.nsum].emslin[0] = xInten;
     
    481481                         * it would be wrong to predict their transferred intensity */
    482482                        LineSv[LineSave.nsum].emslin[1] = LineSv[LineSave.nsum].emslin[0];
    483                         LineSv[LineSave.nsum].sumlin[1] = LineSv[LineSave.nsum].sumlin[0];
     483                        LineSv[LineSave.nsum].SumLine[1] = LineSv[LineSave.nsum].SumLine[0];
    484484                }
    485485        }
     
    489489                /* first call to stuff lines in array, confirm that label is one of
    490490                 * the four correct ones */
    491                 /* >>chng 04 apr 24, last two had been != so this test never really happened; PvH */
    492491                ASSERT( (chInfo == 'c') || (chInfo == 'h') || (chInfo == 'i') || (chInfo == 'r' ) );
    493492
     
    602601                LineSv[LineSave.nsum].emslin[0] = xInten;
    603602                /* integrated intensity or luminosity, the emissivity times the volume */
    604                 LineSv[LineSave.nsum].sumlin[0] += xInten*radius.dVeff;
     603                LineSv[LineSave.nsum].SumLine[0] += xInten*radius.dVeff;
    605604
    606605                /* add line to outward beam
     
    625624                                xInten*rt.fracin , xInten*(1.-rt.fracin) , ipnt );
    626625                        LineSv[LineSave.nsum].emslin[1] = saveemis;
    627                         LineSv[LineSave.nsum].sumlin[1] += saveemis*radius.dVeff;
     626                        LineSv[LineSave.nsum].SumLine[1] += saveemis*radius.dVeff;
    628627                }
    629628        }
     
    638637                LineSv[LineSave.nsum].chSumTyp = (char)chInfo;
    639638                /* number of lines ok, set parameters for first pass */
    640                 LineSv[LineSave.nsum].sumlin[0] = 0.;
     639                LineSv[LineSave.nsum].wavelength = wavelength;
    641640                LineSv[LineSave.nsum].emslin[0] = 0.;
    642                 LineSv[LineSave.nsum].wavelength = wavelength;
    643641                LineSv[LineSave.nsum].emslin[1] = 0.;
    644                 LineSv[LineSave.nsum].sumlin[1] = 0.;
     642                LineSv[LineSave.nsum].SumLine[0] = 0.;
     643                LineSv[LineSave.nsum].SumLine[1] = 0.;
    645644                LineSv[LineSave.nsum].chComment = chComment;
    646645
     
    13221321                if( LineSv[i].chSumTyp == chInfo )
    13231322                {
    1324                         totlin_v += LineSv[i].sumlin[0];
     1323                        totlin_v += LineSv[i].SumLine[0];
    13251324                }
    13261325        }
  • trunk/source/mole_h2_io.cpp

    r2130 r2266  
    21202120                        ASSERT( LineSave.ipNormWavL >= 0 );
    21212121                        /* get the normalization line */
    2122                         if( LineSv[LineSave.ipNormWavL].sumlin[LineSave.lgLineEmergent] > SMALLFLOAT )
    2123                                 renorm = LineSave.ScaleNormLine/LineSv[LineSave.ipNormWavL].sumlin[LineSave.lgLineEmergent];
     2122                        if( LineSv[LineSave.ipNormWavL].SumLine[LineSave.lgLineEmergent] > SMALLFLOAT )
     2123                                renorm = LineSave.ScaleNormLine/LineSv[LineSave.ipNormWavL].SumLine[LineSave.lgLineEmergent];
    21242124                        else
    21252125                                renorm = 1.;
     
    22732273        ASSERT( LineSave.ipNormWavL >= 0 );
    22742274        /* does the normalization line have a positive intensity*/
    2275         if( LineSv[LineSave.ipNormWavL].sumlin[LineSave.lgLineEmergent] > 0. )
     2275        if( LineSv[LineSave.ipNormWavL].SumLine[LineSave.lgLineEmergent] > 0. )
    22762276        {
    22772277                *relint = H2_SaveLine[iElecHi][iVibHi][iRotHi][iElecLo][iVibLo][iRotLo]/
    2278                         LineSv[LineSave.ipNormWavL].sumlin[LineSave.lgLineEmergent] * LineSave.ScaleNormLine;
     2278                        LineSv[LineSave.ipNormWavL].SumLine[LineSave.lgLineEmergent] * LineSave.ScaleNormLine;
    22792279        }
    22802280        else
  • trunk/source/opacity_addtotal.cpp

    r1822 r2266  
    512512                  iso.ConOpacRatio[ipH_LIKE][ipHELIUM][ipH1s] );
    513513        }
     514
    514515        {
    515516                /* following should be set true to print strongest ots contributors */
    516                 /*@-redef@*/
    517517                enum {DEBUG_LOC=false};
    518                 /*@+redef@*/
    519518                if( DEBUG_LOC && (nzone>=378)/**/ )
    520519                {
  • trunk/source/optimize_func.cpp

    r1771 r2266  
    144144                }
    145145
    146                 if( (snorm = LineSv[LineSave.ipNormWavL].sumlin[LineSave.lgLineEmergent]) == 0. )
     146                if( (snorm = LineSv[LineSave.ipNormWavL].SumLine[LineSave.lgLineEmergent]) == 0. )
    147147                {
    148148                        fprintf( ioQQQ, "\n\n PROBLEM Normalization line has zero intensity.  What has gone wrong?\n" );
     
    204204                                /* and find corresponding model value by straight search */
    205205                                nfound += 1;
    206                                 scld = (double)LineSv[ipobs[i]].sumlin[LineSave.lgLineEmergent]/(double)snorm*LineSave.ScaleNormLine;
     206                                scld = (double)LineSv[ipobs[i]].SumLine[LineSave.lgLineEmergent]/(double)snorm*LineSave.ScaleNormLine;
    207207                                chi1 = chi2_func(scld,(double)optimize.xLineInt_Obs[i],(double)optimize.xLineInt_error[i]);
    208208                                cat = 0;
     
    300300                {
    301301                        nfound += 1;
    302                         if( LineSv[LineSave.ipNormWavL].sumlin[LineSave.lgLineEmergent] > 0.f )
    303                         {
    304                                 predin = log10(LineSv[LineSave.ipNormWavL].sumlin[LineSave.lgLineEmergent]) + radius.Conv2PrtInten;
     302                        if( LineSv[LineSave.ipNormWavL].SumLine[LineSave.lgLineEmergent] > 0.f )
     303                        {
     304                                predin = log10(LineSv[LineSave.ipNormWavL].SumLine[LineSave.lgLineEmergent]) + radius.Conv2PrtInten;
    305305                                help = pow(10.,predin-(double)optimize.optint);
    306306                                chi1 = chi2_func(help,1.,(double)optimize.optier);
  • trunk/source/optimize_phymir.cpp

    r2217 r2266  
    237237
    238238        if( lgFinish )
    239         {
    240239                return;
    241         }
    242         /*       maximum no. of iterations exceeded?  */
     240
     241        /* maximum no. of iterations exceeded?  */
    243242        if( optimize.nOptimiz >= optimize.nIterOptim )
    244243        {
  • trunk/source/parse_coronal.cpp

    r1771 r2266  
    2323        DEBUG_ENTRY( "ParseCoronal()" );
    2424
     25        /* use coronal command to establish initial conditions in a cooling
     26         * time-varying cloud */
    2527        if( nMatch( "INIT" , chCard ) && nMatch( "TIME" , chCard ) )
    2628        {
  • trunk/source/parse_print.cpp

    r2217 r2266  
    264264
    265265                        prt.lgFntSet = true;
    266                         if( a <= 0. )
     266                        if( a <= 0. || nMatch(" LOG",chCARD_CAPS) )
    267267                        {
    268268                                prt.TooFaint = (realnum)pow(10.,a);
     
    558558        }
    559559
    560         else if( nMatch("EVER",chCARD_CAPS) )
    561         {
    562                 /* print every nth zone */
     560        else if( nMatch("ZONE",chCARD_CAPS) || nMatch("EVER",chCARD_CAPS) )
     561        {
     562                /* print every nth zone - command was originally print every but
     563                 * is being changed to print zone */
    563564                i = 5;
    564565                num1 = (long int)FFmtRead(chCARD_CAPS,&i,INPUT_LINE_LENGTH,&lgEOL);
  • trunk/source/parse_punch.cpp

    r2256 r2266  
    15861586        else if( nMatch("LINE",chCard) && !nMatch("XSPE",chCard) && !nMatch("NEAR",chCard))
    15871587        {
    1588                 /* punch line emissivity -
     1588                /* punch line options -
    15891589                 * this is not punch xspec lines and not linear option
    15901590                 * check for keyword UNITS on line, then scan wavelength or energy units,
     
    16081608                        strcpy( punch.chPunch[punch.npunch], "LINS" );
    16091609                        sprintf( chHeader,
    1610                                 "#Emission line structure:");
     1610                                "#Emission line emissivity:");
    16111611                        /* read in the list of lines to examine */
    16121612                        punch_line(punch.ipPnunit[punch.npunch],"READ",false, chTemp);
  • trunk/source/path.h

    r1920 r2266  
    4444 * NB - note that the backslash "\" always needs to be typed twice, as shown below: */
    4545
    46 // #define CLOUDY_DATA_PATH "c:\\projects\\cloudy\\data;c:\\users\\gary\\data"
     46// #define CLOUDY_DATA_PATH "c:\\projects\\cloudy\\trunk\\data;c:\\users\\gary\\data"
    4747
    4848/* The // makes the above line of code a comment
  • trunk/source/pressure_total.cpp

    r2171 r2266  
    959959        pressure.PresTotlCurr = TotalPressure_v;
    960960
    961 #       if 0
    962         /* this is special case where we are working on first zone, at
    963          * illuminated face of the cloud.  Here we want to remember the
    964          * initial pressure in case constant pressure is needed */
    965         /* >>chng 05 jan 10, chng from nzone==1 to nzone<=1 so pressure not changed
    966          * during search phase */
    967         /*>>chng 06 jun 20, add test on first iteration, or we are holding
    968          * density constant - flag dense.lgDenseInitConstant false if
    969          * constant pressure reset is used - default is true, after first iteration
    970          * initial density is kept constant, when set false with reset option on
    971          * constant pressure density on first iteration is allowed to change to keep
    972          * pressure constant */
    973         if( nzone <= 1 && (iteration==1 || dense.lgDenseInitConstant) )
    974         {
    975                 double PresTotlInitSave;
    976                 double PresRamInitSave;
    977                 /* this is first zone, lock onto pressure */
    978                 if( conv.nTotalIoniz )
    979                 {
    980                         PresTotlInitSave = pressure.PresTotlInit;
    981                         PresRamInitSave = pressure.PresRamInit;
    982                 }
    983                 else
    984                 {
    985                         PresTotlInitSave = 0.;
    986                         PresRamInitSave = 0.;
    987                 }
    988                 pressure.PresTotlInit = pressure.PresTotlCurr;
    989                 pressure.PresRamInit = pressure.PresRamCurr;
    990                 if( trace.lgTrace )
    991                 {
    992                         fprintf( ioQQQ,
    993                           "     PresTotCurrent 1st zn reset PresTotlInit to PresTotlCurr=%.3e "
    994                           "PresRamInit to PresRamCurr=%.3e old tot=%.3e old ram %.3e hden=%.3e\n",
    995                           pressure.PresTotlInit,
    996                           pressure.PresRamInit,
    997                           PresTotlInitSave,PresRamInitSave,
    998                           dense.gas_phase[ipHYDROGEN] );
    999                 }
    1000         }
    1001 #       endif
    1002961        return;
    1003962}
  • trunk/source/prt_comment.cpp

    r2217 r2266  
    29862986
    29872987        /* this is now the linear vol, rel to inner radius */
    2988         VolComputed = LineSv[i].sumlin[0] /  1e-10;
    2989 
    2990         /* >>chng 02 apr 22, do not zero this element out, so can be used to get vol */
    2991         /* set stored number to zero so it does not appear on the emission line list
    2992         LineSv[i].sumlin[LineSave.lgLineEmergent] = 0.; */
     2988        VolComputed = LineSv[i].SumLine[0] /  1e-10;
    29932989
    29942990        /* spherical or plane parallel case? */
     
    31543150        for( i=0; i < LineSave.nsum; i++ )
    31553151        {
    3156                 if( LineSv[i].chSumTyp == chInfo && LineSv[i].sumlin[0]/total > RATIO )
     3152                if( LineSv[i].chSumTyp == chInfo && LineSv[i].SumLine[0]/total > RATIO )
    31573153                {
    31583154                        fprintf( ioQQQ, " %4.4s ", LineSv[i].chALab );
    31593155                        prt_wl( ioQQQ, LineSv[i].wavelength );
    3160                         fprintf( ioQQQ, " %7.3f %c\n", LineSv[i].sumlin[0]/total, chInfo );
     3156                        fprintf( ioQQQ, " %7.3f %c\n", LineSv[i].SumLine[0]/total, chInfo );
    31613157                }
    31623158        }
     
    31693165        for( i=0; i < LineSave.nsum; i++ )
    31703166        {
    3171                 if( LineSv[i].chSumTyp == chInfo && LineSv[i].sumlin[0]/total > RATIO )
     3167                if( LineSv[i].chSumTyp == chInfo && LineSv[i].SumLine[0]/total > RATIO )
    31723168                {
    31733169                        fprintf( ioQQQ, " %4.4s ", LineSv[i].chALab );
    31743170                        prt_wl( ioQQQ, LineSv[i].wavelength );
    3175                         fprintf( ioQQQ, " %7.3f %c\n", LineSv[i].sumlin[0]/total, chInfo );
     3171                        fprintf( ioQQQ, " %7.3f %c\n", LineSv[i].SumLine[0]/total, chInfo );
    31763172                }
    31773173        }
     
    31833179        for( i=0; i < LineSave.nsum; i++ )
    31843180        {
    3185                 if( LineSv[i].chSumTyp == chInfo && LineSv[i].sumlin[0]/total > RATIO )
     3181                if( LineSv[i].chSumTyp == chInfo && LineSv[i].SumLine[0]/total > RATIO )
    31863182                {
    31873183                        fprintf( ioQQQ, " %4.4s ", LineSv[i].chALab );
    31883184                        prt_wl( ioQQQ, LineSv[i].wavelength );
    3189                         fprintf( ioQQQ, " %7.3f %c\n", LineSv[i].sumlin[0]/total, chInfo );
     3185                        fprintf( ioQQQ, " %7.3f %c\n", LineSv[i].SumLine[0]/total, chInfo );
    31903186                }
    31913187        }
  • trunk/source/prt_final.cpp

    r2217 r2266  
    357357                                        if( fabs(LineSv[i].wavelength-wlh[j] ) <= errorwave )
    358358                                        {
    359                                                 LineSv[i].sumlin[0] = 0.;
    360                                                 LineSv[i].sumlin[1] = 0.;
     359                                                LineSv[i].SumLine[0] = 0.;
     360                                                LineSv[i].SumLine[1] = 0.;
    361361                                                break;
    362362                                        }
     
    388388                                        if( fabs(LineSv[i].wavelength-wlhe[j] ) <= errorwave )
    389389                                        {
    390                                                 LineSv[i].sumlin[0] = 0.;
    391                                                 LineSv[i].sumlin[1] = 0.;
     390                                                LineSv[i].SumLine[0] = 0.;
     391                                                LineSv[i].SumLine[1] = 0.;
    392392                                                break;
    393393                                        }
     
    706706
    707707                /* this is the intensity of the line spectrum will be normalized to */
    708                 snorm = LineSv[LineSave.ipNormWavL].sumlin[ipEmType];
     708                snorm = LineSv[LineSave.ipNormWavL].SumLine[ipEmType];
    709709
    710710                /* check that this line has positive intensity */
     
    723723                         * a realnum - this is not actually a problem since the number will
    724724                         * overflow the format and hence be unreadable */
    725                         double scale = LineSv[i].sumlin[ipEmType]/snorm*LineSave.ScaleNormLine;
     725                        double scale = LineSv[i].SumLine[ipEmType]/snorm*LineSave.ScaleNormLine;
    726726                        /* this will become a realnum, so limit dynamic range */
    727727                        scale = MIN2(BIGFLOAT , scale );
     
    731731                        scaled[i] = (realnum)scale;
    732732
    733                         if( LineSv[i].sumlin[ipEmType] > 0. )
    734                         {
    735                                 xLog_line_lumin[i] = log10(LineSv[i].sumlin[ipEmType]) + radius.Conv2PrtInten;
     733                        if( LineSv[i].SumLine[ipEmType] > 0. )
     734                        {
     735                                xLog_line_lumin[i] = log10(LineSv[i].SumLine[ipEmType]) + radius.Conv2PrtInten;
    736736                        }
    737737                        else
     
    815815                                        if( prt.lgPrtLineLog )
    816816                                        {
    817                                                 xLog_line_lumin[iprnt] = log10(LineSv[i].sumlin[ipEmType]) + radius.Conv2PrtInten;
     817                                                xLog_line_lumin[iprnt] = log10(LineSv[i].SumLine[ipEmType]) + radius.Conv2PrtInten;
    818818                                        }
    819819                                        else
    820820                                        {
    821                                                 xLog_line_lumin[iprnt] = LineSv[i].sumlin[ipEmType] * pow(10.,radius.Conv2PrtInten);
     821                                                xLog_line_lumin[iprnt] = LineSv[i].SumLine[ipEmType] * pow(10.,radius.Conv2PrtInten);
    822822                                        }
    823823                                        sclsav[iprnt] = scaled[i];
     
    10691069        for( i=0; i < LineSave.nsum; i++ )
    10701070        {
    1071                 a = (double)LineSv[i].sumlin[LineSave.lgLineEmergent]/(double)thermal.totcol;
     1071                a = (double)LineSv[i].SumLine[LineSave.lgLineEmergent]/(double)thermal.totcol;
    10721072                if( (a >= 0.05) && LineSv[i].chSumTyp == 'c' )
    10731073                {
     
    10991099        for( i=0; i < LineSave.nsum; i++ )
    11001100        {
    1101                 a = (double)LineSv[i].sumlin[LineSave.lgLineEmergent]/(double)thermal.power;
     1101                a = (double)LineSv[i].SumLine[LineSave.lgLineEmergent]/(double)thermal.power;
    11021102                if( (a >= 0.05) && LineSv[i].chSumTyp == 'h' )
    11031103                {
  • trunk/source/prt_lines.cpp

    r1857 r2266  
    203203         * remember that memory not allocated until ipass >= 0 */
    204204        if( LineSave.ipass > 0 )
    205                 LineSv[LineSave.nsum].sumlin[LineSave.lgLineEmergent] = 0.;
     205                LineSv[LineSave.nsum].SumLine[LineSave.lgLineEmergent] = 0.;
    206206        /* optional sum of certain emission lines, set with "print sum" */
    207207        linadd(sum/radius.dVeff,0,"Stoy",'i' ,
  • trunk/source/prt_lines_continuum.cpp

    r1906 r2266  
    7979        if( LineSave.ipass > 0 )
    8080        {
    81                 LineSv[LineSave.nsum].sumlin[0] = 0.;
    82                 LineSv[LineSave.nsum].sumlin[1] = 0.;
     81                LineSv[LineSave.nsum].SumLine[0] = 0.;
     82                LineSv[LineSave.nsum].SumLine[1] = 0.;
    8383        }
    8484
     
    9898        if( LineSave.ipass > 0 )
    9999        {
    100                 LineSv[LineSave.nsum].sumlin[0] = 0.;
    101                 LineSv[LineSave.nsum].sumlin[1] = 0.;
     100                LineSv[LineSave.nsum].SumLine[0] = 0.;
     101                LineSv[LineSave.nsum].SumLine[1] = 0.;
    102102        }
    103103
     
    117117        if( LineSave.ipass > 0 )
    118118        {
    119                 LineSv[LineSave.nsum].sumlin[0] = 0.;
    120                 LineSv[LineSave.nsum].sumlin[1] = 0.;
     119                LineSv[LineSave.nsum].SumLine[0] = 0.;
     120                LineSv[LineSave.nsum].SumLine[1] = 0.;
    121121        }
    122122
     
    152152        if( LineSave.ipass > 0 )
    153153        {
    154                 LineSv[LineSave.nsum].sumlin[0] = 0.;
    155                 LineSv[LineSave.nsum].sumlin[1] = 0.;
     154                LineSv[LineSave.nsum].SumLine[0] = 0.;
     155                LineSv[LineSave.nsum].SumLine[1] = 0.;
    156156        }
    157157
     
    186186        if( LineSave.ipass > 0 )
    187187        {
    188                 LineSv[LineSave.nsum].sumlin[0] = 0.;
    189                 LineSv[LineSave.nsum].sumlin[1] = 0.;
     188                LineSv[LineSave.nsum].SumLine[0] = 0.;
     189                LineSv[LineSave.nsum].SumLine[1] = 0.;
    190190        }
    191191
     
    235235        if( LineSave.ipass > 0 )
    236236        {
    237                 LineSv[LineSave.nsum-1].sumlin[1] = LineSv[LineSave.nsum-1].sumlin[0];
     237                LineSv[LineSave.nsum-1].SumLine[1] = LineSv[LineSave.nsum-1].SumLine[0];
    238238        }
    239239
     
    244244        if( LineSave.ipass > 0 )
    245245        {
    246                 LineSv[LineSave.nsum-1].sumlin[1] = LineSv[LineSave.nsum-1].sumlin[0];
     246                LineSv[LineSave.nsum-1].SumLine[1] = LineSv[LineSave.nsum-1].SumLine[0];
    247247        }
    248248
     
    332332                if( LineSave.ipass > 0 )
    333333                {
    334                         LineSv[LineSave.nsum].sumlin[0] = 0.;
    335                         LineSv[LineSave.nsum].sumlin[1] = 0.;
     334                        LineSv[LineSave.nsum].SumLine[0] = 0.;
     335                        LineSv[LineSave.nsum].SumLine[1] = 0.;
    336336                }
    337337
     
    465465                if( LineSave.ipass > 0 )
    466466                {
    467                         LineSv[LineSave.nsum].sumlin[0] = 0.;
    468                         LineSv[LineSave.nsum].sumlin[1] = 0.;
     467                        LineSv[LineSave.nsum].SumLine[0] = 0.;
     468                        LineSv[LineSave.nsum].SumLine[1] = 0.;
    469469                }
    470470
     
    485485                if( LineSave.ipass > 0 )
    486486                {
    487                         LineSv[LineSave.nsum].sumlin[0] = 0.;
    488                         LineSv[LineSave.nsum].sumlin[1] = 0.;
    489                 }
    490 
    491                 /* the nsum-1 -- emslin and nsum -- sumlin is not a bug, look above - they do
     487                        LineSv[LineSave.nsum].SumLine[0] = 0.;
     488                        LineSv[LineSave.nsum].SumLine[1] = 0.;
     489                }
     490
     491                /* the nsum-1 -- emslin and nsum -- SumLine is not a bug, look above - they do
    492492                 * different things to different saves */
    493493                Cont_nInu = rfield.flux[ipPredCont[i]]*renorm*radius.r1r0sq +
     
    519519                if( LineSave.ipass > 0 )
    520520                {
    521                         LineSv[LineSave.nsum].sumlin[0] = 0.;
    522                         LineSv[LineSave.nsum].sumlin[1] = 0.;
     521                        LineSv[LineSave.nsum].SumLine[0] = 0.;
     522                        LineSv[LineSave.nsum].SumLine[1] = 0.;
    523523                }
    524524
     
    535535                if( LineSave.ipass > 0 )
    536536                {
    537                         LineSv[LineSave.nsum].sumlin[0] = 0.;
    538                         LineSv[LineSave.nsum].sumlin[1] = 0.;
     537                        LineSv[LineSave.nsum].SumLine[0] = 0.;
     538                        LineSv[LineSave.nsum].SumLine[1] = 0.;
    539539                }
    540540
  • trunk/source/prt_lines_hydro.cpp

    r2133 r2266  
    180180                        caseb = rfield.qhtot*4.75e-13;
    181181                }
    182                 LineSv[LineSave.nsum].sumlin[LineSave.lgLineEmergent] = 0.;
     182                LineSv[LineSave.nsum].SumLine[LineSave.lgLineEmergent] = 0.;
    183183        }
    184184        else
     
    194194        {
    195195                caseb = rfield.qhtot*Transitions[ipH_LIKE][ipHYDROGEN][ipH2p][ipH1s].EnergyErg;
    196                 LineSv[LineSave.nsum].sumlin[LineSave.lgLineEmergent] = 0.;
     196                LineSv[LineSave.nsum].SumLine[LineSave.lgLineEmergent] = 0.;
    197197        }
    198198        else
  • trunk/source/punch_do.cpp

    r2141 r2266  
    21632163                                        {
    21642164                                                if( LineSv[j].wavelength > 0. &&
    2165                                                         LineSv[j].sumlin[LineSave.lgLineEmergent] > 0. )
     2165                                                        LineSv[j].SumLine[LineSave.lgLineEmergent] > 0. )
    21662166                                                {
    21672167                                                        /* line energy, in units set with units option */
     
    21752175                                                        /* intrinsic intensity */
    21762176                                                        fprintf( punch.ipPnunit[ipPun], "\t%8.3f",
    2177                                                                 log10(SDIV(LineSv[j].sumlin[0]) ) + radius.Conv2PrtInten );
     2177                                                                log10(SDIV(LineSv[j].SumLine[0]) ) + radius.Conv2PrtInten );
    21782178                                                        /* emergent line intensity, r recombination  */
    21792179                                                        fprintf( punch.ipPnunit[ipPun], "\t%8.3f",
    2180                                                                 log10(SDIV(LineSv[j].sumlin[1]) ) + radius.Conv2PrtInten );
     2180                                                                log10(SDIV(LineSv[j].SumLine[1]) ) + radius.Conv2PrtInten );
    21812181                                                        /* type of line, i for info, etc */
    21822182                                                        fprintf( punch.ipPnunit[ipPun], " \t%c\n",
     
    32443244        for( i=0; i < LineSave.nsum; i++ )
    32453245        {
    3246                 if( LineSv[i].sumlin[LineSave.lgLineEmergent] > 0. )
     3246                if( LineSv[i].SumLine[LineSave.lgLineEmergent] > 0. )
    32473247                {
    32483248                        PunResults1Line(ioPUN,(char*)LineSv[i].chALab,LineSv[i].wavelength,
    3249                           LineSv[i].sumlin[LineSave.lgLineEmergent], "Line ");
     3249                          LineSv[i].SumLine[LineSave.lgLineEmergent], "Line ");
    32503250                }
    32513251        }
     
    36953695        for( i=0; i < LineSave.nsum; i++ )
    36963696        {
    3697                 if( LineSv[i].sumlin[LineSave.lgLineEmergent] > 0. )
     3697                if( LineSv[i].SumLine[LineSave.lgLineEmergent] > 0. )
    36983698                {
    36993699                        PunResults1Line(ioPUN,(char*)LineSv[i].chALab,LineSv[i].wavelength,
    3700                           LineSv[i].sumlin[LineSave.lgLineEmergent],"Line ");
     3700                          LineSv[i].SumLine[LineSave.lgLineEmergent],"Line ");
    37013701                }
    37023702        }
  • trunk/source/rt_line_all.cpp

    r2129 r2266  
    347347                }
    348348        }
    349         /*5986 fprintf(ioQQQ,"DEBUG he rt_all\t%li\t%li\t%.4e\t%.4e\n",
    350                 iteration, nzone,
    351                                 Transitions[1][1][10][5].Emis->TauIn,
    352                                 Transitions[1][1][10][5].Emis->Pesc);*/
     349        /*fprintf(ioQQQ,"DEBUG He Lya dest is %.2e\n",
     350                Transitions[ipH_LIKE][ipHELIUM][ipH2p][0].Emis->Pdest );*/
    353351
    354352        /* is continuum pumping of H Lyman lines included?  yes, but turned off
  • trunk/source/rt_line_one_tau_reset.cpp

    r1854 r2266  
    8282        t->Emis->FracInwd = MIN2(1.f,1.5f-t->Emis->Pesc);
    8383
    84         /* this is destruction probability
    85          * >>chng 96 sep 4, was not here, needed to add since now taking
    86          * mean of old and new dest prob */
     84        /*  destruction probability */
    8785        t->Emis->Pdest = 0.;
    8886        t->Emis->Pelec_esc = 0.;
  • trunk/source/rt_ots.cpp

    r2133 r2266  
    10801080        if( chFlag == 'l' || chFlag == 'b' )
    10811081        {
     1082                fprintf( ioQQQ, "DEBUG density He %.2e He+2 %.2e O+2 %.2e\n",
     1083                        dense.gas_phase[ipHELIUM] , dense.xIonDense[ipHELIUM][2],
     1084                        dense.xIonDense[ipOXYGEN][2] );
    10821085                fprintf( ioQQQ, "     DEBUG OTSLIN array, anu, otslin, opac, OTS*opac Lab nLine limit:%.2e zone:%.2f IonConv?%c\n",
    10831086                        weak,fnzone,TorF(conv.lgConvIoniz) );
  • trunk/source/service.cpp

    r2217 r2266  
    151151        DEBUG_ENTRY( "MyAssert()" );
    152152
    153         fprintf(ioQQQ," PROBLEM DISASTER An assert has been thrown, this is bad.\n");
     153        fprintf(ioQQQ,"\n\n\n PROBLEM DISASTER\n An assert has been thrown, this is bad.\n");
    154154        fprintf(ioQQQ," It happened in the file %s at line number %i\n", file, line );
    155155        fprintf(ioQQQ," This is iteration %li, nzone %li, fzone %.2f, lgSearch=%c.\n",
  • trunk/source/zone_startend.cpp

    r1732 r2266  
    205205                                rfield.flux_isotropic[i];
    206206
    207                         /* actually do the corrections
    208                         rfield.flux[i] *= opac.tmn[i]; */
    209 
    210207                        /* >>chng 03 nov 08, update SummedCon here since flux changed */
    211208                        rfield.SummedCon[i] = rfield.flux[i] + rfield.SummedDif[i];
Note: See TracChangeset for help on using the changeset viewer.