49 static bool lgCO_Init_called=
false;
61 if( lgCO_Init_called )
67 lgCO_Init_called =
true;
75 element_list[nelem] = NULL;
259 else if(sp->
nElec == 1)
308 element->
ipCl = ipion;
309 element->
ipZ = priority;
310 ASSERT ((
size_t)strlen(label) <
sizeof(element->
chName));
314 p->
p = (
void *) element;
315 element_list[ipion] = element;
325 char mylab[7], thisel[3], *s;
326 long int i, n, nnuc, nelem, nel;
341 mol->
nElem[nelem] = 0;
346 s = strchr(mol->
label,
' ');
368 strncpy(mylab,label,7);
374 s = strpbrk(mylab,
"*");
382 s = strpbrk(mylab,
"+-");
396 s = strstr(mylab,
"grn");
411 while (mylab[i] !=
'\0' && mylab[i] !=
' ' && mylab[i] !=
'*')
415 thisel[nel++] = mylab[i++];
416 if(islower(mylab[i]))
418 thisel[nel++] = mylab[i++];
425 fprintf(stderr,
"Did not recognize element at %s in \"%s \"[%ld]\n",mylab+i,label,i);
431 if(el->
ipZ != 0 && (maxel == NULL || el->
ipZ > maxel->
ipZ))
436 if(isdigit(mylab[i]))
440 n = 10*n+(
long int)(mylab[i]-
'0');
442 }
while (isdigit(mylab[i]));
488 return !((
struct molecule *) dat->
p)->active;
567 for(i=0;i<rate->
nrates;i++)
597 int ipthis, i, n, nt;
598 double ratev, ratevi;
612 for(i=0;i<rate->
nrates && ipthis == -1;i++)
621 for(i=0;i<rate->
nrates;i++)
644 fprintf(stderr,
"=>");
648 fprintf(stderr,
"\n");
664 if(rate->
fun != NULL) {
665 rate->
rk = rate->
a*rate->
fun(rate);
672 int ipthis, i, n, nt;
673 double ratev, ratevi;
699 for(i=0;i<rate->
nrates;i++)
703 ratev += ipthis*ratevi;
712 int ipthis, i, n, nt;
713 double ratev, ratevi;
736 for(i=0;i<rate->
nrates;i++)
740 ratev += ipthis*ratevi;
750 int n, nt, i, ipthis;
763 sprintf (s,
"#Depth");
768 fprintf (punit,
"%.5e",depth);
775 for(i=0;i<rate->
nrates;i++)
793 sprintf(s,
"\t%s",rate->
label);
799 for(i=0;i<rate->
nrates;i++)
803 fprintf(punit,
"\t%.3e",ratevi);
822 static long int num_comole_calc_MALLOC=-1;
838 fprintf(
ioQQQ,
"DISASTER - the number of species in the CO network has increased. This is not allowed.\n");
839 fprintf(
ioQQQ,
"This could happen if an element was initially turned off or grains not included, then the element or grains was included. There are not allowed.\n");
840 fprintf(
ioQQQ,
"Sorry.\n");