Show
Ignore:
Timestamp:
05/10/08 09:03:02 (2 months ago)
Author:
peter
Message:

Merging all changes from mainline upto r2033, except r1902.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/c08_branch/source/iso.h

    r1916 r2034  
    3535 * atom xx-like levels large command */ 
    3636/* Hydrogen and helium atoms will have precompiled recombination coefficients up to these maximum n.    */ 
    37 #define RREC_MAXN( A_ )                ( A_ == ipH_LIKE ? 40 : 40 ) 
    38  
    39 /** Ions of the sequences will go up to this n.       */ 
    40 #define LIKE_RREC_MAXN( A_ )            ( A_ == ipH_LIKE ? 20 : 20 ) 
     37#define RREC_MAXN      40 
     38 
     39/** Ions of the sequences will go up to this n, h-like He will get same as iso roots. */ 
     40#define LIKE_RREC_MAXN( A_ )            ( A_ == ipHELIUM ? 40 : 20 ) 
    4141 
    4242#define N_ISO_TE_RECOMB         41 
     
    4646#define SumUpToThisN    1000 
    4747/** the magic number for the table of recombination coefficients, YYMMDD */ 
    48 #define RECOMBMAGIC             (51213) 
    49  
    50 /** iso_collide - calculation collision data for ipISO, nelem   
     48#define RECOMBMAGIC             (80405) 
     49 
     50/**iso_cascade - calculate cascade probabilities, branching ratios, and associated errors 
     51\param ipISO 
     52\param nelem 
     53*/ 
     54void iso_cascade( long ipISO, long nelem ); 
     55 
     56/**iso_collapsed_bnl_print - print departure coefficients for collapsed levels  
     57\param ipISO 
     58\param nelem 
     59*/ 
     60void iso_collapsed_bnl_print( long ipISO, long nelem ); 
     61 
     62/**iso_collapsed_bnl_set - set departure coefficients for collapsed levels  
     63\param ipISO 
     64\param nelem 
     65*/ 
     66void iso_collapsed_bnl_set( long ipISO, long nelem ); 
     67 
     68/**iso_collapsed_Aul_update - update decays from collapsed levels  
     69\param ipISO 
     70\param nelem 
     71*/ 
     72void iso_collapsed_Aul_update( long ipISO, long nelem ); 
     73 
     74/**iso_collapsed_lifetimes_update - update lifetimes of collapsed levels  
     75\param ipISO 
     76\param nelem 
     77*/ 
     78void iso_collapsed_lifetimes_update( long ipISO, long nelem ); 
     79 
     80/** iso_collide - calculate collision data for ipISO, nelem   
    5181\param ipISO 
    5282\param nelem 
     
    5484void iso_collide( long ipISO, long nelem ); 
    5585 
    56 /** iso_collisional_ionization - calculation collisional ionization rate for ipISO, nelem   
     86/** iso_collisional_ionization - calculate collisional ionization rate for ipISO, nelem   
    5787\param ipISO 
    5888\param nelem 
     
    88118*/ 
    89119void iso_error_generation( long ipISO, long nelem ); 
     120 
     121/**iso_get_total_num_levels - get total number of levels with the given number of resolved and collapsed 
     122\param ipISO 
     123\param nmaxResolved 
     124\param numCollapsed 
     125*/ 
     126long iso_get_total_num_levels( long ipISO, long nmaxResolved, long numCollapsed ); 
    90127 
    91128/**iso_ionize_recombine evaluate state specific creation and destruction processes  
     
    129166*/ 
    130167void iso_radiative_recomb( long ipISO, long nelem ); 
     168 
     169 
     170/**iso_radiative_recomb_effective - get effective recomb rate coefficients into each level (including indirect) 
     171\param ipISO 
     172\param nelem 
     173*/ 
     174void iso_radiative_recomb_effective( long ipISO, long nelem ); 
    131175 
    132176/**iso_recomb_check - called by SanityCheck to confirm that recombination coef are ok, 
     
    139183double iso_recomb_check( long ipISO, long nelem, long level, double temperature ); 
    140184 
     185/** iso_recomb_auxiliary_free - free up some auxiliary space associated with iso recombination tables. 
     186*/ 
     187void iso_recomb_auxiliary_free( void ); 
     188 
     189/** iso_recomb_malloc - malloc space needed for iso recombination tables. 
     190*/ 
     191void iso_recomb_malloc( void ); 
     192 
    141193/** iso_recomb_setup - read in or compile iso recombination tables. 
    142194\param ipISO 
     
    189241        multi_arr<long,5> QuantumNumbers2Index; 
    190242 
    191         /** number of lyman lines to include only as opacity sources, in each iso seq, 
     243        /** number of Lyman lines to include only as opacity sources, in each iso seq, 
    192244         * all now set to 100 in zero.c */ 
    193245        long int nLyman[NISO], 
     
    199251        multi_arr<long int,3> ipIsoLevNIonCon; 
    200252 
    201         /** >>chng 01 dec 23, from float to double */ 
    202253        /** ionization potential of level N in Ryd */ 
    203254        multi_arr<double,3> xIsoLevNIonRyd; 
     
    230281        bool lgInd2nu_On; 
    231282 
    232         /** This variable is set to true if the model is full size in the sense that all levels below 
     283        /** true if the model is full size in the sense that all levels below 
    233284         * continuum are considered.    */ 
    234285        bool lgLevelsLowered[NISO][LIMELM]; 
     
    238289        bool lgLevelsEverLowered[NISO][LIMELM]; 
    239290 
    240         /** this is the number of collapsed levels along the iso seq atoms - this has 
    241          * no meaning for H-like (all are collapsed above n=2) */ 
     291        /** the number of collapsed levels, these lie on top of resolved levels */ 
    242292        long int nCollapsed_max[NISO][LIMELM]; 
    243293        long int nCollapsed_local[NISO][LIMELM]; 
    244294 
    245         /** 
    246         * iso.numLevels_max[ipISO][nelem] is the number of levels in iso atoms,  
    247         * including both resolved levels for lower n in He-like, and collapsed levels 
    248         * n ranges from 0 to n = iso.numLevels_max[ipISO]-1 
    249         * iso.numLevels_max[ipISO] is set on the fly with atom xx-like levels command  
    250         * it is initialized in zero.c 
    251         */ 
    252         /** the total number of levels in each atom in the iso sequences */ 
    253         /** Max is the maximum number of levels ever to be used in this core load.  
    254          * local is the number of levels corresponding to local conditions, which,  
    255          * of course, must be less than or equal to the max. */ 
    256         /* malloc is the number malloc'd in the coreload, can't go over that later. */ 
     295        /** total number of collapsed and resolve levels,  
     296         * iso.numLevels_max[ipISO] is derived from total resolved and collapsed levels  
     297         * it is the maximum number of levels ever to be used in this core load. */ 
    257298        long int numLevels_max[NISO][LIMELM]; 
     299 
     300        /** total number of levels with continuum pressure lowering included  
     301         * this varies from zone to zone, and from model to model, but cannot 
     302         * exceed numLevels_max  */ 
    258303        long int numLevels_local[NISO][LIMELM]; 
     304 
     305        /** number of levels malloc'd in the core load, can't go over that later  
     306         * in later sims can lower number of levels but not raise them  */ 
    259307        long int numLevels_malloc[NISO][LIMELM]; 
    260308 
    261         /** this is the quantum number n of the highest resolved level, only 
    262          * used for helium */ 
    263         /** the array index of the highest resolved level is numLevels-1 - nCollapsed */ 
     309        /** principal quantum number n of the highest resolved level */ 
    264310        long int n_HighestResolved_max[NISO][LIMELM]; 
     311        /** the local (pressure lowered) version of the above */ 
    265312        long int n_HighestResolved_local[NISO][LIMELM]; 
    266313 
    267         /** the total number of levels to print in each atom in the iso sequences */ 
     314        /** total number of levels to print */ 
    268315        long int numPrintLevels[NISO][LIMELM]; 
    269316 
    270         /** the statistical weights of the ions for each species, 
    271          * used for Milne relation and recombination */ 
     317        /** statistical weight of the ground state of the parent ions for each  
     318         * species, used for Milne relation and recombination */ 
    272319        realnum stat_ion[NISO]; 
    273320 
     
    334381        multi_arr<double,3> PopLTE; 
    335382 
    336         /** collisional ionization rate coefficient from each level */ 
     383        /** collisional ionization rate coefficient from each level (cm3 s-1) */ 
    337384        multi_arr<double,3> ColIoniz; 
    338385 
     
    503550        multi_arr<double,3> RadEffec, SigmaRadEffec; 
    504551 
     552        multi_arr<realnum,5> CachedAs; 
     553        /* the departure coefficients of collapsed levels */ 
     554        multi_arr<double,5> bnl_effective; 
     555 
    505556} iso; 
    506557