28 bool lgStopZone =
true;
57 if( a <= 10. && !p.
nMatch(
"LINE") )
67 if( tread <
phycon.TEMP_LIMIT_LOW )
70 " Temperatures below %.2e K not allowed. Reset to lowest value."
71 " I am doing this myself.\n" ,
74 tread =
phycon.TEMP_LIMIT_LOW*1.01;
76 else if( tread >
phycon.TEMP_LIMIT_HIGH )
79 " Temperatures is above %.2e K not allowed. Reset to highest value."
80 " I am doing this myself.\n" ,
83 tread =
phycon.TEMP_LIMIT_HIGH*0.99;
120 fprintf(
ioQQQ,
" First number on STOP 21CM OPTICAL DEPTH command must be 21\n" );
139 else if( p.
nMatch(
"OPTI") )
145 p.
NoNumb(
"optical depth");
158 fprintf(
ioQQQ,
" optical depth too big\n" );
182 else if( p.
nMatch(
"BALM") )
189 fprintf(
ioQQQ,
" There must be a second number, the energy in Ryd. Sorry.\n" );
205 fprintf(
ioQQQ,
" The energy must be in the range %10.2e to %10.2e. It was %10.2e. Sorry.\n",
214 strcpy(
optimize.chVarFmt[
optimize.nparm],
"STOP OPTICAL DEPTH = %f LOG AT %f RYD" );
226 else if( p.
nMatch(
" AV ") )
232 p.
NoNumb(
"optical depth in V");
259 p.
NoNumb(
"molecular depletion");
272 else if( p.
nMatch(
"VELO") )
278 p.
NoNumb(
"flow velocity");
285 else if( p.
nMatch(
"MASS") )
324 const double convl = p.
nMatch(
"PARS") ? log10(
PARSEC ) : 0.;
325 bool lgStopRadius = p.
nMatch(
"RADI") ? true : false ;
326 const char* what = lgStopRadius ?
"radius" :
"thickness";
332 a = log10(a) + convl;
336 fprintf(
ioQQQ,
"The %s is negative and linear is set - this is impossible.\n", what);
346 fprintf(
ioQQQ,
"DISASTER %s too large\n", what );
350 radius.StopRadius[0] = pow(10.,a);
352 radius.StopThickness[0] = pow(10.,a);
371 a = log10(a) + convl;
375 fprintf(
ioQQQ,
"The %s is negative and linear is set -"
376 " this is impossible.\n", what);
386 fprintf(
ioQQQ,
"DISASTER %s too large\n", what );
390 radius.StopRadius[j] = pow(10.,a);
392 radius.StopThickness[j] = pow(10.,a);
418 else if( p.
nMatch(
"ZONE") )
435 long int nZoneMax =
geometry.nend[0];
455 fprintf(
ioQQQ,
"CAUTION - it will take a lot of memory to save"
456 " results for %li zones. Is this many zones really necessary?\n",
474 if( flux <= 0. || p.
nMatch(
" LOG") )
475 flux = pow(10.,flux);
478 StopCalc.ContIndex.push_back( ind );
483 else if( p.
nMatch(
"EFRA") )
489 p.
NoNumb(
"electron fraction");
503 else if( p.
nMatch(
"MFRA") )
509 p.
NoNumb(
"hydrogen molecular fraction");
523 else if( p.
nMatch(
"PFRA") )
529 p.
NoNumb(
"ionized hydrogen fraction");
542 else if( p.
nMatch(
"COLU") )
548 p.
NoNumb(
"column density");
557 if( !p.
GetQuote( chLabel ,
false ) )
561 StopCalc.lgStopSpeciesColumn =
true;
565 else if( p.
nMatch(
"EFFE") )
575 strcpy(
optimize.chVarFmt[
optimize.nparm],
"STOP EFFECTIVE COLUMN DENSITY %f LOG" );
585 else if( p.
nMatch(
"IONI") )
590 fprintf(
ioQQQ,
" column too big\n" );
600 strcpy(
optimize.chVarFmt[
optimize.nparm],
"STOP IONIZED COLUMN DENSITY %f LOG" );
611 else if( p.
nMatch(
"NEUT") )
619 strcpy(
optimize.chVarFmt[
optimize.nparm],
"STOP NEUTRAL COLUMN DENSITY %f LOG");
632 else if( p.
nMatch(
" H2 ") )
640 fprintf(
ioQQQ,
" Something is wrong with the order of the numbers on this line.\n" );
641 fprintf(
ioQQQ,
" The first number I encounter should be the 2 in H2.\n Sorry.\n" );
651 strcpy(
optimize.chVarFmt[
optimize.nparm],
"STOP H2 COLUMN DENSITY %f LOG");
661 else if( p.
nMatch(
"ATOM") )
668 strcpy(
optimize.chVarFmt[
optimize.nparm],
"STOP ATOMIC COLUMN DENSITY %f LOG");
678 else if( p.
nMatch(
"H/TS") )
686 strcpy(
optimize.chVarFmt[
optimize.nparm],
"STOP H/TSPIN COLUMN DENSITY %f LOG");
696 else if( p.
nMatch(
" CO ") )
705 strcpy(
optimize.chVarFmt[
optimize.nparm],
"STOP CO COLUMN DENSITY %f LOG");
721 fprintf(
ioQQQ,
" column too big\n" );
743 else if( p.
nMatch(
"EDEN") )
749 p.
NoNumb(
"electron density");
765 else if( p.
nMatch(
"LINE") )
791 fprintf(
ioQQQ,
" There MUST be a relative intensity entered "
792 "for first line in STOP LINE command. Sorry.\n" );
825 else if( p.
nMatch(
"NTOTALIO" ) )
831 p.
NoNumb(
"number of calls to conv_base");
842 fprintf(
ioQQQ,
" I did not recognize a keyword on this STOP line, line image follows;\n" );
844 fprintf(
ioQQQ,
"Sorry.\n");
#define DEBUG_ENTRY(funcname)
bool nMatch(const char *chKey) const
const char * StandardEnergyUnit(void) const
string StandardFluxUnit(void) const
NORETURN void NoNumb(const char *chDesc) const
int GetQuote(char *chLabel, bool lgABORT)
int PrintLine(FILE *fp) const
static t_PredCont & Inst()
long add(double energy, const char *unit="Ryd")
void ParseStop(Parser &p)
UNUSED const double EVRYD
UNUSED const double PARSEC