63 sum = sum+fabs(
mole.
c[i][j]);
74 ASSERT( cartot_mol >= 0. && oxytot_mol >= 0.);
82 for(ion=0; ion < nelem+2; ++ion)
88 for(ion2=0; ion2< nelem+2; ++ion2)
104 if(
COmole[i]->n_nuclei > 1) {
313 fprintf(
ioQQQ,
" COMOLE matrix\n " );
320 fprintf(
ioQQQ,
" \n" );
325 fprintf(
ioQQQ,
" " );
330 fprintf(
ioQQQ,
"\n" );
334 fprintf(
ioQQQ,
" COMOLE matrix\n " );
340 fprintf(
ioQQQ,
" \n" );
345 fprintf(
ioQQQ,
" " );
351 fprintf(
ioQQQ,
"\n" );
354 fprintf(
ioQQQ,
" COMOLE b\n " );
363 " COMOLE H2 den:%10.3e, H2,3+=%10.2e%10.2e Carb sum=%10.3e Oxy sum=%10.3e\n",
404 fprintf(
ioQQQ,
" CO_solve getrf_wrapper error\n" );
412 fprintf(
ioQQQ,
" CO_solve: dgetrs finds singular or ill-conditioned matrix\n" );
426 for( j=61; j < 62; j++ )
429 printf(
"ZONE\t%.5e\tSPECIES_1\t%s\tSPECIES_2\t%s\tDEST_RATE\t%.3e\tbvec\t%.3e\n",
474 co_denominator = 1e10;
487 if(
mole.
b[i] /
SDIV(co_denominator) > -1e-5 )
505 static long int nzFail=-2;
506 long int nzFail2 = (long)
fnzone*100;
509 fprintf(
ioQQQ,
" PROBLEM ");
511 " CO_solve neg pop for species %li %s, value is %.2e rel value is %.2e zone %.2f Te %.4e Search?%c\n",
522 if( nzFail2 !=nzFail )
536 else if(
mole.
b[i] == 0. )
546 fprintf(
ioQQQ,
" PROBLEM ");
548 " CO_solve zero pop for species %li %s, value is %.2e zone %li\n",
569 fprintf(
ioQQQ,
" CO network negative population occurred, Te=%.4e, calling ConvFail. ",
572 fprintf(
ioQQQ,
"\n" );
594 fprintf(
ioQQQ,
"\t%f\n", renorm);
596 fprintf(
ioQQQ,
"renormco\t%.2f\t%f",
fnzone, renorm);
608 fprintf(
ioQQQ,
" COMOLE matrix inversion error, MERROR=%5ld zone=%5ld\n",
609 (
long)merror,
nzone );
611 fprintf(
ioQQQ,
" Product matrix\n " );
617 fprintf(
ioQQQ,
" \n" );
622 fprintf(
ioQQQ,
" " );
629 fprintf(
ioQQQ,
"\n" );
634 fprintf(
ioQQQ,
" COMOLE matrix\n " );
639 fprintf(
ioQQQ,
" \n" );
644 fprintf(
ioQQQ,
" " );
647 fprintf(
ioQQQ,
"%9.1e",
650 fprintf(
ioQQQ,
"\n" );
654 fprintf(
ioQQQ,
" Mole dens:" );
660 fprintf(
ioQQQ,
" \n" );
667 fprintf(
ioQQQ,
" Product matrix\n " );
673 fprintf(
ioQQQ,
" \n" );
678 fprintf(
ioQQQ,
" " );
684 fprintf(
ioQQQ,
"\n" );
690 fprintf(
ioQQQ,
" COMOLE matrix\n " );
695 fprintf(
ioQQQ,
" \n" );
700 fprintf(
ioQQQ,
" " );
706 fprintf(
ioQQQ,
"\n" );
710 fprintf(
ioQQQ,
" Mole dens:" );
716 fprintf(
ioQQQ,
" \n" );
769 if(
COmole[i]->n_nuclei <= 1)
780 fprintf(
ioQQQ,
"PROBLEM DISASTER mole_co_solve has found "
781 "a CO-network molecule with an insane abundance.\n");
782 fprintf(
ioQQQ,
"Species number %li with abundance %.2e\n",
791 "PROBLEM COmole limit trip call %li Seatch? %c nMole %li "
792 "n(mole) %.2e n(gas) %.2e)\n",
874 # define EPS_MOLE 0.1