Skip to content

Commit

Permalink
only replace ground state with verner for non matoms
Browse files Browse the repository at this point in the history
  • Loading branch information
jhmatthews committed Aug 11, 2015
1 parent ca3808d commit 4419dc2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ int nions; /*The actual number of ions read from the datafile */
int nlevels; /*These are the actual number of levels which were read in */
#define NLTE_LEVELS 270 /* Maximum number of levels to treat explicitly */
int nlte_levels; /* Actual number of levels to treat explicityly */
#define NLEVELS_MACRO 150 /* Maximum number of macro atom levels. (SS, June 04) */
#define NLEVELS_MACRO 200 /* Maximum number of macro atom levels. (SS, June 04) */
int nlevels_macro; /* Actual number of macro atom levels. (SS, June 04) */
#define NLINES 200000 /* Maximum number of lines to be read */
int nlines; /* Actual number of lines that were read in */
Expand Down
15 changes: 13 additions & 2 deletions source/get_atomicdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -1399,6 +1399,15 @@ for the ionstate.
ion[config[m].nion].phot_info = 1; /* Mark this ion as using TOPBASE photo */
ion[config[m].nion].ntop_first = ntop_phot;
}

/* JM 1508 -- next line sees if the topbase level just read in is the ground state -
if it is, the ion structure element ntop_ground is set to that topbase level number
note that m is the lower level here */
if (m == config[ion[config[n].nion].first_nlte_level].ilv)
{
ion[config[n].nion].ntop_ground = ntop_phot;
}

ion[config[m].nion].ntop++;

// Finish up this section by storing the photionization data properly
Expand Down Expand Up @@ -1591,8 +1600,10 @@ for the ionstate.
nphot_total++;
}

else if (ion[nion].phot_info == 1) /*We already have a topbase cross section, but the VFKY
data is superior for the ground state, so we replace that data with the current data*/
else if (ion[nion].phot_info == 1 && ion[nion].macro_info != 1)
/* We already have a topbase cross section, but the VFKY
data is superior for the ground state, so we replace that data with the current data*/
/* JM 1508 -- don't do this with macro-atoms for the moment */
{
phot_top[ion[nion].ntop_ground].nlev = ion[nion].firstlevel; // ground state
phot_top[ion[nion].ntop_ground].nion = nion;
Expand Down

0 comments on commit 4419dc2

Please sign in to comment.