14 ostringstream& chHeader)
31 " Save average hit EOF while reading list; use END to end list.\n" );
43 else if( p.
nMatch(
"COLU" ))
48 else if( p.
nMatch(
"IONI" ))
55 fprintf(
ioQQQ,
"PROBLEM one of the jobs TEMPerature, COLUmn density, or IONIzation, must appear.\n");
65 fprintf(
ioQQQ,
"save average did not see an element on this line, sorry\n");
76 p.
NoNumb(
"ionization stage" );
100 fprintf(
ioQQQ ,
"DEBUG save_average %li species read in.\n",
105 for( i=0; i<
nLine ; ++i )
116 sncatf(chHeader,
"#averages");
117 for(
size_t i=0; i<
nLine ; ++i )
119 sncatf(chHeader,
"\t %s %s %i %i",
140 strcpy( chWeight ,
"RADIUS");
142 strcpy( chWeight ,
"VOLUME");
153 fprintf(
ioQQQ,
" save average temperature could not identify the species.\n" );
173 fprintf(
ioQQQ,
" save average ionization fraction could not identify the species.\n" );
185 fprintf(
ioQQQ,
" save average column density fraction could not identify the species.\n" );
bool nMatch(const char *chKey) const
void parse_save_average(Parser &p, long int ipPun, ostringstream &chHeader)
vector< string > chAverageType[LIMPUN]
vector< int > nAverageIonList[LIMPUN]
bool hasCommand(const char *s2)
NORETURN void TotalInsanity(void)
size_t sncatf(char *buf, size_t bufSize, const char *fmt,...)
int cdIonFrac(const char *chLabel, long int IonStage, double *fracin, const char *chWeight, bool lgDensity)
int cdTemp(const char *chLabel, long int IonStage, double *TeMean, const char *chWeight)
t_elementnames elementnames
void SaveAverageFree(long i)
vector< int > nAverage2ndPar[LIMPUN]
NORETURN void NoNumb(const char *chDesc) const
long int GetElem(void) const
char chElementNameShort[LIMELM][CHARS_ELEMENT_NAME_SHORT]
double PrtLogLin(double value)
SaveParams params[LIMPUN]
int cdColm(const char *chLabel, long int ion, double *theocl)
long nAverageList[LIMPUN]
#define DEBUG_ENTRY(funcname)
int fprintf(const Output &stream, const char *format,...)
vector< string > chSaveSpecies[LIMPUN]
void save_average(long int ipPun)
int PrintLine(FILE *fp) const