40 index = (
long int *)
CALLOC((
size_t)
thermal.ncltot,
sizeof(
long int));
70 cset = cool_total*
save.WeakHeatCool;
75 for( i=0; i < ip; i++ )
108 if( !
conv.lgConvTemp )
110 fprintf( io,
"#>>>> Temperature not converged.\n" );
112 else if( !
conv.lgConvEden )
114 fprintf( io,
"#>>>> Electron density not converged.\n" );
116 else if( !
conv.lgConvIoniz() )
118 fprintf( io,
"#>>>> Ionization not converged.\n" );
120 else if( !
conv.lgConvPres )
122 fprintf( io,
"#>>>> Pressure not converged.\n" );
125 if( strcmp(chJob,
"EACH") == 0 )
128 fprintf( io,
"%.5e\t%.4e\t%.4e",
132 double debug_ctot = 0.;
134 for(
int i=0 ; i <=
LIMELM ; i++)
136 fprintf( io,
"\t%.4e",
thermal.elementcool[i] );
137 debug_ctot +=
thermal.elementcool[i];
158 fprintf( io,
"\t%.4e",
MAX2(0.,
gv.GasCoolColl) );
159 debug_ctot +=
MAX2(0.,
gv.GasCoolColl);
161 fprintf( io,
"\t%.4e",
MAX2(0.,-
hmi.HeatH2Dexc_used) );
162 debug_ctot +=
MAX2(0.,-
hmi.HeatH2Dexc_used);
164 fprintf( io,
"\t%.4e",
thermal.char_tran_cool );
165 debug_ctot +=
thermal.char_tran_cool;
167 fprintf( io,
"\t%.4e",
hmi.hmicol );
168 debug_ctot +=
hmi.hmicol;
170 fprintf( io,
"\t%.4e",
CoolHeavy.h2line );
176 fprintf( io,
"\t%.4e",
CoolHeavy.H2PlsCool );
182 fprintf( io,
"\t%.4e",
CoolHeavy.heavfb );
185 fprintf( io,
"\t%.4e",
CoolHeavy.eebrm );
188 fprintf( io,
"\t%.4e",
CoolHeavy.tccool );
191 fprintf( io,
"\t%.4e",
CoolHeavy.cextxx );
194 fprintf( io,
"\t%.4e",
CoolHeavy.expans );
197 fprintf( io,
"\t%.4e",
CoolHeavy.cyntrn );
200 fprintf( io,
"\t%.4e",
CoolHeavy.colmet );
203 fprintf( io,
"\t%.4e",
thermal.dima );
205 fprintf( io,
" \n" );
206 if( fabs( (debug_ctot - cool_total)/cool_total ) > 1e-10 )
208 fprintf(
ioQQQ ,
"PROBLEM with the SAVE EACH COOLING output\n" );
209 fprintf(
ioQQQ ,
"PROBLEM One or more coolants have been lost, the sum of the reported cooling is %.4e\n", debug_ctot );
210 fprintf(
ioQQQ ,
"PROBLEM The total cooling is %.4ee\n", cool_total );
211 fprintf(
ioQQQ ,
"PROBLEM The difference is %.4e\n", cool_total - debug_ctot );
215 else if( strcmp(chJob,
"COOL") == 0 )
220 fprintf( io,
"%.5e\t%.4e\t%.4e\t%.4e",
232 for( is=0; is < ip; is++ )
234 if(is > 4 && (
thermal.cooling[index[is]] < cset &&
thermal.heatnt[index[is]] < cset))
236 fprintf( io,
"\t%s %.1f\t%.7f",
239 sign(csav[index[is]],sgnsav[index[is]]) );
241 fprintf( io,
" \n" );
void spsort(realnum x[], long int n, long int iperm[], int kflag, int *ier)
NORETURN void TotalInsanity(void)
sys_float SDIV(sys_float x)
#define DEBUG_ENTRY(funcname)
void CoolSave(FILE *io, char chJob[])