CCL Home Page
Up Directory CCL reader
/*
The permission is granted to use the software as is and redistribute it in
its original and complete form. If you find this program useful and publish
results obtained by it, please cite the program as:
Michael Whitbeck, Desert Research Institute, 1991, "REACT - Program to solve
kinetic equations for chemical systems". Version 1.00, this code is
available from the authors or from Dr. Whitbeck.
*/

#include "rxn.h"
extern void setfiles();
main(argc,argv) int argc; char **argv;
{
int i, num;
char line[4000];

setfiles(argv[1]);
if ((Swrite = fopen(Species,"r"))==NULL) {
  printf("ERROR ON OPEN\n");
  exit (0);
}
fscanf(Swrite,"%d%d\n", &NR,&NS);
SPECIES = fgets(line,3999,Swrite);
fclose(Swrite);
line[strlen(line)-1] = '\0';
printf("%d reacions involving %d species\n%s\n",NR,NS,SPECIES);
Y = (double *)malloc((NS+1)*sizeof(double));
if ((Ywrite = fopen(results,"r"))==NULL) {
  printf("ERROR ON OPEN\n");
  exit (0);
}
while ((num = fread(Y,sizeof(double),NS+1,Ywrite)) >0 )  {
  for (i = 0; i<=NS; i++)printf("%15.4e ",Y[i]);
  printf("\n");
}
fclose(Ywrite);
}
Modified: Tue May 14 16:00:00 1991 GMT
Page accessed 4996 times since Sat Apr 17 21:58:36 1999 GMT