64 fprintf(
ioQQQ,
" iter_end_check called, zone %li.\n" ,
nzone);
75 fprintf(
ioQQQ,
" iter_end_check returns, doing nothing since zone 0.\n" );
83 if(
trace.nTrConvg==0 )
104 conv.lgBadStop =
false;
111 thermal.lgTemperatureConstant =
true;
121 (strcmp(
dense.chDenseLaw ,
"CPRE") == 0) &&
132 fprintf(
ioQQQ,
"\n STOP since P(rad)/P(gas)=%7.3f >1.0\n",
135 fprintf(
ioQQQ,
" Line contributors to radiation pressure follows:\n" );
139 conv.lgBadStop =
true;
140 strncpy(
StopCalc.chReasonStop,
"of radiation pressure.",
sizeof(
StopCalc.chReasonStop) );
148 strncpy(
StopCalc.chReasonStop,
"volume too large for this cpu.",
sizeof(
StopCalc.chReasonStop) );
152 else if( !
wind.lgVelPos &&
wind.lgBallistic() )
156 strncpy(
StopCalc.chReasonStop,
"wind veloc too small.",
sizeof(
StopCalc.chReasonStop) );
163 strncpy(
StopCalc.chReasonStop,
"wind V too small.",
sizeof(
StopCalc.chReasonStop) );
171 strncpy(
StopCalc.chReasonStop,
"nTotalIonizStop reached.",
sizeof(
StopCalc.chReasonStop) );
178 strncpy(
StopCalc.chReasonStop,
"21 cm optical depth.",
sizeof(
StopCalc.chReasonStop) );
185 strncpy(
StopCalc.chReasonStop,
"A_V reached.",
sizeof(
StopCalc.chReasonStop) );
192 strncpy(
StopCalc.chReasonStop,
"A_V reached.",
sizeof(
StopCalc.chReasonStop) );
200 strncpy(
StopCalc.chReasonStop,
"mass reached.",
sizeof(
StopCalc.chReasonStop) );
210 strncpy(
StopCalc.chReasonStop,
"sonic point reached.",
sizeof(
StopCalc.chReasonStop) );
213 else if(
dense.EdenTrue==0 )
216 conv.lgBadStop =
true;
218 strncpy(
StopCalc.chReasonStop,
"zero electron density.",
sizeof(
StopCalc.chReasonStop) );
221 else if(
radius.lgdR2Small )
224 conv.lgBadStop =
true;
225 strncpy(
StopCalc.chReasonStop,
"DR small rel to thick.",
sizeof(
StopCalc.chReasonStop) );
231 strncpy(
StopCalc.chReasonStop,
"lowest EDEN reached.",
sizeof(
StopCalc.chReasonStop) );
237 strncpy(
StopCalc.chReasonStop,
"low electron fraction.",
sizeof(
StopCalc.chReasonStop) );
247 strncpy(
StopCalc.chReasonStop,
"freeze out fraction.",
sizeof(
StopCalc.chReasonStop) );
254 strncpy(
StopCalc.chReasonStop,
"large H_2/H fraction.",
sizeof(
StopCalc.chReasonStop) );
261 strncpy(
StopCalc.chReasonStop,
"low H_+/H fraction.",
sizeof(
StopCalc.chReasonStop) );
264 else if(
radius.lgDrMinUsed )
267 conv.lgBadStop =
true;
269 strncpy(
StopCalc.chReasonStop,
"DRAD small- set DRMIN.",
sizeof(
StopCalc.chReasonStop) );
275 strncpy(
StopCalc.chReasonStop,
"outer radius reached.",
sizeof(
StopCalc.chReasonStop) );
282 strncpy(
StopCalc.chReasonStop,
"optical depth reached.",
sizeof(
StopCalc.chReasonStop) );
285 else if(
StopCalc.lgStopSpeciesColumn &&
290 sprintf(
StopCalc.chReasonStop,
"%s column dens reached.",
StopCalc.chSpeciesColumn );
298 strncpy(
StopCalc.chReasonStop,
"H column dens reached.",
sizeof(
StopCalc.chReasonStop) );
304 strncpy(
StopCalc.chReasonStop,
"H+ column dens reached.",
sizeof(
StopCalc.chReasonStop) );
311 strncpy(
StopCalc.chReasonStop,
"H2 column dens reached.",
sizeof(
StopCalc.chReasonStop) );
318 strncpy(
StopCalc.chReasonStop,
"H2+H0 column dens reached.",
sizeof(
StopCalc.chReasonStop) );
325 strncpy(
StopCalc.chReasonStop,
"N(H0)/Tspin column dens reached.",
sizeof(
StopCalc.chReasonStop) );
332 strncpy(
StopCalc.chReasonStop,
"CO column dens reached.",
sizeof(
StopCalc.chReasonStop) );
338 strncpy(
StopCalc.chReasonStop,
"H0 column dens reached.",
sizeof(
StopCalc.chReasonStop) );
344 strncpy(
StopCalc.chReasonStop,
"highest Te reached.",
sizeof(
StopCalc.chReasonStop) );
350 strncpy(
StopCalc.chReasonStop,
"lowest Te reached.",
sizeof(
StopCalc.chReasonStop) );
357 strncpy(
StopCalc.chReasonStop,
"NZONE reached.",
sizeof(
StopCalc.chReasonStop) );
378 sprintf(
StopCalc.chReasonStop,
"line %s %s reached",
379 StopCalc.chStopLabel1[i] , chString );
384 for(
size_t k=0; k <
StopCalc.ContIndex.size(); ++k )
388 double nFnu_model =
LineSv[ind].SumLine[0]*pow(10.,
radius.Conv2PrtInten);
389 if( nFnu_model >=
StopCalc.ContNFnu[k].get(
"erg/s/cm2") )
394 sprintf(
StopCalc.chReasonStop,
"flux %s %s reached",
395 LineSv[ind].chALab, chTemp );
400 else if(
radius.drNext <= 0. )
405 fprintf(
ioQQQ,
" drNext=%10.2e STOP\n",
radius.drNext );
408 conv.lgBadStop =
true;
409 strncpy(
StopCalc.chReasonStop,
"internal error - DRAD.",
sizeof(
StopCalc.chReasonStop) );
417 conv.lgBadStop =
true;
419 strncpy(
StopCalc.chReasonStop,
"calculation aborted.",
sizeof(
StopCalc.chReasonStop) );
462 hcmap.lgMapBeingDone =
true;
473 strncpy(
StopCalc.chReasonStop,
"MAP command used-stop.",
sizeof(
StopCalc.chReasonStop) );
484 fprintf(
ioQQQ,
" iter_end_check returns after map.\n" );
486 return( lgEndFun_v );
489 if( lgEndFun_v &&
prt.lgOnlyZone )
502 fprintf(
ioQQQ,
" iter_end_check bottom return.\n" );
504 return( lgEndFun_v );
520 " This is a print out of the cooling array for zone number %3ld\n",
524 " The total heating was HTOT=%10.2e erg/s/cm3, the total cooling was CTOT=%10.2e, and the temperature was%10.3eK.\n",
528 " All coolants greater than%6.2f%% of the total will be printed.\n",
533 for( i=0; i <
thermal.ncltot; i++ )
536 if( fabs(ratio) >
EPS )
543 if( fabs(ratio) >
EPS )
NORETURN void TotalInsanity(void)
sys_float SDIV(sys_float x)
#define DEBUG_ENTRY(funcname)
static t_PredCont & Inst()
void coolpr(FILE *io, const char *chLabel, realnum lambda, double ratio, const char *chJOB)
UNUSED const realnum BIGFLOAT
void map_do(FILE *io, const char *chType)
t_mole_global mole_global
molezone * findspecieslocal(const char buf[])
ChemAtomList unresolved_atom_list
static realnum * wavelength
void sprt_wl(char *chString, realnum wl)
void PrtLinePres(FILE *ioPRESSURE)
TransitionList HFLines("HFLines", &AnonStates)
void TempChange(double TempNew, bool lgForceUpdate)