Changeset 2127

Show
Ignore:
Timestamp:
06/25/08 11:17:40 (2 months ago)
Author:
rporter
Message:

/trunk/source - a bunch of relatively minor changes, essentially all refactoring and comments. One change to command parser. "atom XX-like error generation" now accepts "PESSimistic" option, which chooses the worst of two sets of data in the Monte Carlo calculation.

Location:
trunk/source
Files:
25 modified

Legend:

Unmodified
Added
Removed
  • trunk/source/abundances.cpp

    r1771 r2127  
    269269 
    270270                /* print warning if temperature set below default but C > O */ 
    271                 if( dense.gas_phase[ipCARBON]/SDIV( dense.gas_phase[ipOXYGEN]) >= 1. ) 
     271                if( dense.lgElmtOn[ipOXYGEN] && dense.gas_phase[ipCARBON]/SDIV( dense.gas_phase[ipOXYGEN]) >= 1. ) 
    272272                { 
    273273                        fprintf( ioQQQ, "\n >>> \n" 
  • trunk/source/assert_results.cpp

    r2012 r2127  
    19431943 
    19441944                        int iCase = 1; 
     1945                        if( strcmp( "Ca A", chAssertLineLabel[i] ) == 0 ) 
     1946                                iCase = 0; 
     1947                        else if( strcmp( "Ca B", chAssertLineLabel[i] ) == 0 ) 
     1948                                iCase = 1; 
     1949                        else if( strcmp( "+Col", chAssertLineLabel[i] ) == 0 ) 
     1950                                iCase = 1; 
     1951                        else 
     1952                                TotalInsanity(); 
     1953 
    19451954                        RelError[i] = 0.; 
    19461955                        long nHighestPrinted = StatesElem[nISOCaseB][nelemCaseB][iso.numPrintLevels[nISOCaseB][nelemCaseB]-1].n; 
  • trunk/source/cont_createmesh.cpp

    r2120 r2127  
    462462         *  
    463463         * rfield.fine_opac_nelem is the most massive (hence sharpest line) 
    464          * we will worry about.  By default this is irion but can be changed 
     464         * we will worry about.  By default this is iron but can be changed 
    465465         * with SET FINE CONTINUUM command  
    466466         *  
  • trunk/source/cont_createpointers.cpp

    r1926 r2127  
    632632        for( ipISO=ipH_LIKE; ipISO<NISO; ++ipISO ) 
    633633        { 
    634                 /* do remaining part of the he iso sequence */ 
     634                /* do remaining part of the iso sequences */ 
    635635                for( nelem=2; nelem < LIMELM; nelem++ ) 
    636636                { 
     
    639639                                /* generate label for this ion */ 
    640640                                sprintf( chLab, "%2s%2ld",elementnames.chElementSym[nelem], nelem+1-ipISO ); 
    641                                 /* Lya itself is the only transition below n=3 - we explicitly do not 
    642                                  * want to generate pointers for 2s-1s or 2p-2s */ 
    643                                 /* array index for continuum edges for levels in He-like ions  */ 
     641                                /* array index for continuum edges */ 
    644642                                iso.ipIsoLevNIonCon[ipISO][nelem][0] =  
    645643                                        ipContEnergy(iso.xIsoLevNIonRyd[ipISO][nelem][0],chLab); 
     
    647645                                for( ipHi=1; ipHi < iso.numLevels_max[ipISO][nelem]; ipHi++ ) 
    648646                                { 
    649                                         /* array index for continuum edges for levels in He-like ions  */ 
     647                                        /* array index for continuum edges */ 
    650648                                        iso.ipIsoLevNIonCon[ipISO][nelem][ipHi] = ipContEnergy(iso.xIsoLevNIonRyd[ipISO][nelem][ipHi],chLab); 
    651649 
    652                                         /* define all he-like line pointers */ 
     650                                        /* define all line pointers */ 
    653651                                        for( ipLo=0; ipLo < ipHi; ipLo++ ) 
    654652                                        { 
  • trunk/source/conv_init_solution.cpp

    r2119 r2127  
    2020#include "pressure.h" 
    2121#include "conv.h" 
     22#include "hmi.h" 
    2223 
    2324/* derivative of net cooling wrt temperature to check on sign oscillations */ 
     
    383384                        TeFirst = MAX2( 4000. , thermal.ConstTemp ); 
    384385                        /* true allow ionization stage trimming, false blocks it */ 
     386 
     387                        /* override this if molecule deliberately disabled */ 
     388                        if( hmi.lgNoH2Mole ) 
     389                                TeFirst = thermal.ConstTemp; 
    385390                } 
    386391                else if( thermal.lgTeHigh ) 
  • trunk/source/grid_do.cpp

    r1894 r2127  
    310310 
    311311                fprintf( ioQQQ, "\n %s\n", chLine ); 
    312                 fprintf( ioQQQ, " Initial increment is%6.3f, the limits are%10.2e to %10.2e\n",  
     312                fprintf( ioQQQ, " Initial increment is %6.3f, the limits are%10.2e to %10.2e\n",  
    313313                  optimize.vincr[i], optimize.varang[i][0], optimize.varang[i][1] ); 
    314314        } 
  • trunk/source/helike_cs.cpp

    r1960 r2127  
    225225        } 
    226226 
    227         /* set 15% errors on all collision rates. */ 
    228         iso_put_error(ipHE_LIKE, nelem, ipHi, ipLo, IPCOLLIS, 0.15f ); 
    229  
    230227        ASSERT( cs >= 0.f ); 
    231228 
     
    451448                        /* >>refer      He      cs      Pengelly, R.M., & Seaton, M.J., 1964, MNRAS, 127, 165 */ 
    452449                        /* statistical weights included */ 
    453                         cs = (realnum)CS_l_mixing_PS64( ipHE_LIKE, nelem, ipLo, ipHi, Collider); 
     450                        cs = (realnum)CS_l_mixing_PS64(  
     451                                nelem, 
     452                                StatesElem[ipHE_LIKE][nelem][ipLo].lifetime, 
     453                                nelem+1.-ipHE_LIKE, 
     454                                StatesElem[ipHE_LIKE][nelem][ipLo].n, 
     455                                StatesElem[ipHE_LIKE][nelem][ipLo].l, 
     456                                StatesElem[ipHE_LIKE][nelem][ipHi].g, 
     457                                Collider); 
    454458                } 
    455459                else 
     
    589593        ASSERT( cs >= 0.f ); 
    590594 
    591         /*iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPCOLLIS,-1);*/ 
    592  
    593595        return(cs); 
    594596 
     
    797799                        /* >>refer      He      cs      Pengelly, R.M., & Seaton, M.J., 1964, MNRAS, 127, 165 */ 
    798800                        /* statistical weights included */ 
    799                         cs = (realnum)CS_l_mixing_PS64( ipHE_LIKE, nelem, ipLo, ipHi, Collider); 
     801                        cs = (realnum)CS_l_mixing_PS64(  
     802                                nelem, 
     803                                StatesElem[ipHE_LIKE][nelem][ipLo].lifetime, 
     804                                nelem+1.-ipHE_LIKE, 
     805                                StatesElem[ipHE_LIKE][nelem][ipLo].n, 
     806                                StatesElem[ipHE_LIKE][nelem][ipLo].l, 
     807                                StatesElem[ipHE_LIKE][nelem][ipHi].g, 
     808                                Collider); 
    800809                } 
    801810                else 
     
    857866 
    858867        ASSERT( cs >= 0.f ); 
    859  
    860         /*iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPCOLLIS,-1);*/ 
    861868 
    862869        return(cs); 
     
    903910        coll_str += qg32(    1.0,    10.0, S62_Therm_ave_coll_str); 
    904911        ASSERT( coll_str > 0. ); 
    905  
    906         /*iso_put_error(ipISO,nelem,ipHi,ipLo,ipCollis,-1);*/ 
    907912 
    908913        return coll_str; 
     
    10241029/*CS_l_mixing_PS64 - find rate for l-mixing collisions by protons, for neutrals */ 
    10251030double CS_l_mixing_PS64( 
    1026         long ipISO, 
    1027         long nelem /* the chemical element, 1 for He */, 
    1028         long ipLo /* lower level, 0 for ground */, 
    1029         long ipHi /* upper level, 0 for ground */, 
     1031        long nelem, /* the chemical element, 1 for He */ 
     1032        double tau, /* the radiative lifetime of the initial level.     */ 
     1033        double target_charge, 
     1034        long n, 
     1035        long l, 
     1036        double gHi, 
    10301037        long Collider) 
    10311038{ 
     
    10371044                bestfactor,     factorpart, 
    10381045                reduced_mass, reduced_mass_2_emass, 
    1039                 rate,  tau; 
     1046                rate; 
    10401047        const double ChargIncoming = ColliderCharge[Collider]; 
    10411048 
    10421049        DEBUG_ENTRY( "CS_l_mixing_PS64()" ); 
    10431050 
    1044         ASSERT( ipHi > ipLo ); 
    10451051        /* In this routine, two different cutoff radii are calculated, and as per PS64, 
    10461052         * the least of these is selected.  We take the least positive result.  */ 
     
    10511057        /* this mass always appears relative to the electron mass, so define it that way */ 
    10521058        reduced_mass_2_emass = reduced_mass / ELECTRON_MASS; 
    1053  
    1054         /* This is the lifetime of ipLo.        */ 
    1055         tau = StatesElem[ipISO][nelem][ipLo].lifetime; 
    1056  
    1057         if( ipISO == ipH_LIKE && Transitions[ipISO][nelem][ipLo][ipH1s].ipCont > 0 ) 
    1058         { 
    1059                 tau = (1./tau) + Transitions[ipISO][nelem][ipLo][ipH1s].Emis->Aul; 
    1060                 tau = 1./tau; 
    1061         } 
    10621059 
    10631060        /* equation 46 of PS64 */ 
     
    10741071 
    10751072        /* this is equation 44 of PS64 */ 
    1076         Dnl = POW2( ChargIncoming / (double)(nelem + 1. - ipISO)) * 6. * POW2( (double)StatesElem[ipISO][nelem][ipLo].n ) * 
    1077                 ( POW2((double)StatesElem[ipISO][nelem][ipLo].n) -  
    1078                 POW2((double)StatesElem[ipISO][nelem][ipLo].l) - StatesElem[ipISO][nelem][ipLo].l - 1); 
     1073        Dnl = POW2( ChargIncoming / target_charge) * 6. * POW2( (double)n) * 
     1074                ( POW2((double)n) - POW2((double)l) - l - 1); 
    10791075 
    10801076        ASSERT( Dnl > 0. ); 
     
    11101106        /* this is the TOTAL rate from nl to nl+/-1. So assume we can 
    11111107         * divide by two to get the rate nl to either nl+1 or nl-1. */ 
    1112         if( StatesElem[ipISO][nelem][ipLo].l > 0 ) 
     1108        if( l > 0 ) 
    11131109                rate /=2; 
    11141110 
     
    11171113         * for electron colliders and is off by reduced_mass_2_emass^-1.5 */ 
    11181114        cs = rate / ( COLL_CONST * pow(reduced_mass_2_emass, -1.5) ) * 
    1119                 phycon.sqrte * StatesElem[ipISO][nelem][ipHi].g; 
     1115                phycon.sqrte * gHi; 
    11201116 
    11211117        ASSERT( cs > 0. ); 
    1122  
    1123         /*iso_put_error(ipISO,nelem,ipHi,ipLo,ipCollis,-1);*/ 
    11241118 
    11251119        return cs; 
  • trunk/source/helike_cs.h

    r1732 r2127  
    7676 
    7777/**CS_l_mixing_PS64 Collision treatment based on Pengelly and Seaton 1964 
    78 \param ipISO 
    79 \param nelem the chemical element, 1 for He 
    80 \param ipLo lower level, 0 for ground 
    81 \param ipHi upper level, 0 for ground 
     78\param nelem, the chemical element, 1 for He 
     79\param tau, 
     80\param target_charge, 
     81\param n, 
     82\param l, 
     83\param gHi, 
    8284\param Collider 
    8385*/ 
    8486double CS_l_mixing_PS64( 
    85         long int ipISO, 
    8687        long int nelem, 
    87         long int ipLo , 
    88         long int ipHi , 
    89         long int Collider ); 
     88        double tau, 
     89        double target_charge, 
     90        long int n, 
     91        long int l, 
     92        double gHi, 
     93        long int Collider); 
    9094 
    9195/**CS_l_mixing_VF01 Collision treatment based on Vrinceanu and Flannery 2001 
  • trunk/source/helike_einsta.cpp

    r1997 r2127  
    253253                        fixit(); // adding the 2-photon decay 2^3S - 1^1S may be important in early universe 
    254254                        A = ForbiddenHe[ipHi - 1]; 
    255                         iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.1f); 
     255                        iso_put_error(ipHE_LIKE,nelem,ipHe2s3S ,ipHe1s1S,IPRAD, 0.01f, 0.20f); 
     256                        iso_put_error(ipHE_LIKE,nelem,ipHe2s1S ,ipHe1s1S,IPRAD, 0.01f, 0.05f); 
     257                        iso_put_error(ipHE_LIKE,nelem,ipHe2p3P0,ipHe1s1S,IPRAD, 0.00f, 0.00f); 
     258                        iso_put_error(ipHE_LIKE,nelem,ipHe2p3P1,ipHe1s1S,IPRAD, 0.01f, 0.05f); 
     259                        iso_put_error(ipHE_LIKE,nelem,ipHe2p3P2,ipHe1s1S,IPRAD, 0.01f, 0.01f); 
    256260                } 
    257261                else 
     
    293297                                TotalInsanity(); 
    294298                        } 
    295                         iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.1f); 
    296                 } 
    297                 /*      For now just just put 1% error for forbidden lines. */ 
    298                 iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,.01f); 
     299                        iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.1f,0.1f); 
     300                } 
     301 
    299302                return A; 
    300303        } 
     
    313316                A = 8.0E-3 * exp(9.283/sqrt((double)N_(ipLo))) * pow((double)nelem,9.091) / 
    314317                        pow((double)N_(ipHi),2.877); 
    315                 iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.1f); 
     318                iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.1f,0.1f); 
    316319        } 
    317320 
     
    328331                        A *= (2.*(ipLo-3)+1.0)/3.0; 
    329332                } 
    330                 iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.1f); 
     333                iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.1f,0.1f); 
    331334        } 
    332335 
     
    344347                        /* 20% error is based on difference between Savukov, Labzowsky, and Johnson (2005) 
    345348                         * and Lach and Pachucki (2001) for the helium transition. */ 
    346                         iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.2f); 
     349                        iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.2f,0.2f); 
    347350                } 
    348351                else 
     
    351354                         * the above values to 10% or better. */ 
    352355                        A= 7.22E-9*pow((double)nelem, 9.33); 
    353                         iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.3f); 
     356                        iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.3f,0.3f); 
    354357                } 
    355358        } 
     
    361364                { 
    362365                        A = 1.549; 
    363                         iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.1f); 
     366                        iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.1f,0.1f); 
    364367                } 
    365368                else 
     
    369372                         * >>refercon   astro-ph 0205163        */ 
    370373                        A= 0.1834*pow((double)nelem, 6.5735); 
    371                         iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.1f); 
     374                        iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.1f,0.1f); 
    372375                } 
    373376        } 
     
    383386                 * See discussion "Energy order within 2 3P" near the top of helike.c */ 
    384387                A = 5.78E-12; 
    385                 iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.1f); 
     388                iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.1f,0.1f); 
    386389 
    387390        } 
     
    396399                 * See discussion "Energy order within 2 3P" near the top of helike.c */ 
    397400                A = 3.61E-15; 
    398                 iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.1f); 
     401                iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.1f,0.1f); 
    399402        } 
    400403 
     
    403406                /* Current transition is not supported. */ 
    404407                A = iso.SmallA; 
    405                 iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.1f); 
    406         } 
    407  
    408         /* For now just put 1% error for forbidden lines. */ 
    409         iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,.01f); 
     408                iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.1f,0.1f); 
     409        } 
    410410 
    411411        ASSERT( A > 0.); 
     
    488488                                Aul = TransProbs[nelem][ipHi][ipLo]; 
    489489 
    490                                 iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.0005f); 
     490                                iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.0001f,0.002f); 
    491491                        } 
    492492 
     
    502502                                                Aul = (1.59208e10) / pow(Eff_nupper,3.0); 
    503503                                        ASSERT( Aul > 0.); 
    504                                         iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.005f); 
     504                                        iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.0002f,0.002f); 
    505505                                } 
    506506 
     
    511511                                        Aul = H_Einstein_A(nHi ,lHi , nLo , lLo , nelem); 
    512512                                        ASSERT( Aul > 0.); 
    513  
    514                                         if( lHi + lLo >= 7 ) 
    515                                         { 
    516                                                 iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.001f); 
    517                                         } 
    518                                         else 
    519                                         { 
    520                                                 iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.01f); 
    521                                         } 
     513                                        iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.006f,0.04f); 
    522514                                } 
    523515                                /* These fits come from extrapolations of Drake's oscillator strengths 
     
    616608 
    617609                                        ASSERT( Aul > 0. ); 
    618                                         iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.01f); 
     610                                        iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.0002f,0.002f); 
    619611                                } 
    620612                                else 
     
    633625 
    634626                                        ASSERT( Aul > 0. ); 
    635                                         iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.03f); 
     627                                        iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.01f,0.07f); 
    636628                                } 
    637629                        } 
     
    652644 
    653645                                Aul = TransProbs[nelem][ipHi][ipLo]; 
    654                                 iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.1f); 
     646                                iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.1f,0.1f); 
    655647                        } 
    656648 
     
    784776 
    785777                                } 
    786                                 iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.1f); 
     778                                iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.1f,0.1f); 
    787779                        } 
    788  
    789                         /* for now just give ions some a 5% error across the board */ 
    790                         iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.05f); 
    791780                } 
    792781        } 
     
    1005994                        /* Neither upper nor lower is resolved...Aul's are easy.        */ 
    1006995                        Aul = HydroEinstA( N_(ipLo), N_(ipHi) )*z4; 
    1007                         iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.001f); 
     996                        iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.001f,0.001f); 
    1008997 
    1009998                        ASSERT( Aul > 0.); 
     
    10341023                                iso.CachedAs[ipISO][nelem][ N_(ipHi)-iso.n_HighestResolved_max[ipISO][nelem]-1 ][ ipLo ][1] = 0.f; 
    10351024 
    1036                         iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.01f); 
     1025                        iso_put_error(ipHE_LIKE,nelem,ipHi,ipLo,IPRAD,0.01f,0.01f); 
    10371026                        ASSERT( Aul > 0.); 
    10381027                } 
  • trunk/source/helike_recom.cpp

    r1960 r2127  
    44/*cross_section - calculates the photoionization cross_section for a given level and photon energy*/ 
    55/*radrecomb - calculates radiative recombination coefficients. */ 
    6 /*RecomInt - Integral in milne relation.  Called by qg32.       */ 
    76/*He_cross_section returns cross section (cm^-2),  
    87 * given EgammaRyd, the photon energy in Ryd, 
     
    3130STATIC double X1Int( double u ); 
    3231STATIC double X2Int( double u ); 
    33  
    34 STATIC double cross_section(double EgammaRyd); 
    35  
    36 static double RecomInt(double EE); 
     32STATIC double cross_section(double EgammaRyd, long nelem, long ipLev); 
    3733 
    3834#if 0 
     
    4642#endif 
    4743 
    48 static double kTRyd,EthRyd,Xn_S59;  
    49 static long int ipLev,globalZ; 
     44static double EthRyd,Xn_S59;  
    5045 
    5146/* Here are several structures containing fits to cross-sections calculated in the following: */ 
     
    15121507 
    15131508        /* These corrections ensure helium cross-sections agree with the highly accurate  
    1514          * values given by Hummer and Storey (1998).  The index is [ipLev - 1]  */ 
     1509         * values given by Hummer and Storey (1998).  The index is [ipLevel - 1]        */ 
    15151510        /* >>refer He   PCS     Hummer, D.G., & Storey, P.J. 1998, MNRAS 297, 1073      */   
    15161511        double PreferredThres[NUM_PREF_TCS] = { 
     
    15271522                13.54,26.58,55.71,-1.00,-1.00,-1.00,-1.00,-1.00,-1.00,58.07}; 
    15281523 
    1529         globalZ = nelem; 
    1530  
    1531         ipLev = ipLevel; 
    1532  
    1533         EthRyd = iso.xIsoLevNIonRyd[ipHE_LIKE][nelem][ipLev]; 
     1524        EthRyd = iso.xIsoLevNIonRyd[ipHE_LIKE][nelem][ipLevel]; 
    15341525 
    15351526        /* make sure this routine not called within collapsed high levels */ 
     
    15371528 
    15381529        /* this is a resolved level */ 
    1539         cs = (1.e-18)*cross_section( EgammaRyd ); 
     1530        cs = (1.e-18)*cross_section( EgammaRyd, nelem, ipLevel ); 
    15401531 
    15411532        /* Scale to preferred threshold values */ 
     
    15461537                if( ipCurrentLevel!=ipLevel ) 
    15471538                { 
    1548                         ThreshCS = cross_section( EthRyd ); 
     1539                        ThreshCS = cross_section( EthRyd, nelem, ipLevel ); 
    15491540        &