24 bool lgForceLog=
false, lgForceLinear=
false;
37 for(
long i=0; i<
NISO; ++i )
39 for( nelem=0; nelem<
LIMELM; ++nelem )
52 for(
long i=1; i <
LIMELM; i++ )
58 fprintf(
ioQQQ,
" Hit EOF while reading element list; use END to end list.\n" );
70 while( j <
LIMELM && !lgHIT )
85 fprintf(
ioQQQ,
" Sorry, but I did not recognize element name on this line.\n" );
86 fprintf(
ioQQQ,
" Here is the list of names I recognize.\n" );
87 fprintf(
ioQQQ,
" " );
89 for( k=2; k <=
LIMELM; k++ )
101 if( p.
strcmp(
"END") == 0 )
108 fprintf(
ioQQQ,
" Too many elements were entered.\n" );
109 fprintf(
ioQQQ,
" I only know about%3d elements.\n",
111 fprintf(
ioQQQ,
" Sorry.\n" );
120 bool lgElementSet =
false;
131 else if( p.
nMatch(
"LINE") )
132 lgForceLinear =
true;
141 fprintf(
ioQQQ,
" There must be a number on this line.\n" );
142 fprintf(
ioQQQ,
" Sorry.\n" );
151 " ParseElement did not find an element on the following line:\n" );
156 if( (lgForceLog || param <= 0.) && !lgForceLinear )
159 param = pow(10.,param);
165 else if( p.
nMatch(
"ABUN") )
172 fprintf(
ioQQQ,
" There must be a number on this line.\n" );
173 fprintf(
ioQQQ,
" Sorry.\n" );
182 " ParseElement did not find an element on the following line:\n" );
190 param = pow(10.,param);
197 " Please check the abundance of this element. It seems high to me.\n" );
202 else if( p.
nMatch(
" OFF") )
213 fprintf(
ioQQQ,
" There must be an abundances on the ELEMENT OFF LIMIT command.\n" );
214 fprintf(
ioQQQ,
" Sorry.\n" );
224 " ParseElement did not find an element on the following line:\n" );
244 fprintf(
ioQQQ,
" It is not possible to turn hydrogen off.\n" );
245 fprintf(
ioQQQ,
" Sorry.\n" );
252 else if( p.
nMatch(
"IONI") )
254 bool lgLogSet =
false;
262 " ParseElement did not find an element on the following line:\n" );
268 fprintf(
ioQQQ,
"Sorry, you cannot set the ionization of %s since it has been turned off.\n" ,
294 for(
long i=ion; i<nelem+2; ++i )
300 for(
long i=0; i<ion; ++i )
314 fprintf(
ioQQQ,
" element ionization command has all zero ionization fractions. This is not possible.\n Sorry\n");
318 for(
long i=low; i<=ihi; ++i )
322 fprintf(
ioQQQ,
" element abundance command has zero abundance between positive values. This is not possible.\n Sorry\n");
329 for(
long i=low; i<=ihi; ++i )
336 else if( p.
nMatch(
" ON ") )
342 " ParseElement did not find an element on the following line:\n" );
356 else if( p.
nMatch(
"TABL") )
362 " ParseElement did not find an element on the following line:\n" );
382 fprintf(
ioQQQ,
" cannot change abundance of hydrogen.\n" );
383 fprintf(
ioQQQ,
" Sorry.\n" );
394 fprintf(
ioQQQ,
" no pairs entered - cannot interpolate\n" );
411 if( p.
strcmp(
"END") == 0 )
435 fprintf(
ioQQQ,
"ParseElement: TABLE ELEMENT TABLE radii "
436 "must be in increasing order\n" );
444 fprintf(
ioQQQ,
"ParseElement: ELEMENT command - there must be "
445 "a keyword on this line.\n" );
446 fprintf(
ioQQQ,
" The keys I know about are TABLE, SCALE, _OFF, "
447 "_ON_, IONIZATION, and ABUNDANCE.\n" );
448 fprintf(
ioQQQ,
" Sorry.\n" );
462 else if( p.
nMatch(
"ABUN") )
#define DEBUG_ENTRY(funcname)
long int GetElem(void) const
bool nMatch(const char *chKey) const
int strcmp(const char *s2)
int PrintLine(FILE *fp) const
t_elementnames elementnames
t_iso_sp iso_sp[NISO][LIMELM]
void ParseElement(Parser &p)
realnum ScaleElement[LIMELM]
realnum AbTabRad[LIMTABD][LIMELM]
realnum AbTabFac[LIMTABD][LIMELM]
realnum SetIoniz[LIMELM][LIMELM+1]
long int IonHigh[LIMELM+1]
char chElementNameShort[LIMELM][CHARS_ELEMENT_NAME_SHORT]
char chElementName[LIMELM][CHARS_ELEMENT_NAME]
realnum vparm[LIMEXT][LIMPAR]
char chVarFmt[LIMPAR][FILENAME_PATH_LENGTH_2]