30 const char *section =
"Semchem_module";
36 printf(
"\nNumber of aqueous species must be higher then 1.");
43 printf(
"\nTeplota musi byt kladna!");
54 printf(
"\nTeplota pro zadani dGf musi byt kladna!");
61 printf(
"\nEpsilon musi byt kladne!");
65 pString = strcpy(buffer,
OptGetStr(section,
"Error_norm_type",
"Absolute"));
66 if ( pString == NULL )
68 printf(
"\nChybi typ normy!");
88 printf(
"\nTyp normy neni platny!");
93 pString = strcpy(buffer,
OptGetStr(section,
"Scaling",
"No"));
94 if ( pString == NULL )
96 printf(
"\nChybi definice skalovani!");
111 printf(
"\nSkalovani matice neni platne!");
118 printf(
"\nAfi musi byt nezaporne!");
125 printf(
"\nb musi byt kladne!");
132 printf(
"\nPocet casovych kroku musi byt kladny!");
138 i =
OptGetInt(section,
"Number_of_further_species",
"0");
141 printf(
"\nPocet dalsich latek nesmi byt zaporny!");
154 printf(
"\nPocet kroku pomale kinetiky musi byt kladny!");
165 char nazev[30], *pom_buf;
166 const char *separators =
" ,\t";
172 printf (
"Malo pameti!\n");
186 pom_buf = strtok( buffer, separators );
187 if ( strcmp( buffer,
"<NeplatnyNazev>" ) == 0 )
193 if ( pom_buf == NULL )
195 printf(
"\nChybi dGf %d. latky ve fazi!", j+1);
200 pom_buf = strtok( NULL, separators );
202 if ( pom_buf != NULL )
204 printf(
"\nPrilis mnoho dGf pro latky ve fazi!");
209 pom_buf = strtok( buffer, separators );
210 if ( strcmp( buffer,
"<NeplatnyNazev>" ) == 0 )
220 if ( pom_buf == NULL )
222 printf(
"\nChybi dHf %d. latky ve fazi!", j+1);
226 pom_buf = strtok( NULL, separators );
228 if ( pom_buf != NULL )
230 printf(
"\nPrilis mnoho dHf pro latky ve fazi!");
235 pom_buf = strtok( buffer, separators );
236 if ( strcmp( buffer,
"<NeplatnyNazev>" ) == 0 )
242 if ( pom_buf == NULL )
244 printf(
"\nChybi molarni hmotnost %d. latky ve fazi!", j+1);
247 P_lat[j].
M = atof(pom_buf);
248 pom_buf = strtok( NULL, separators );
250 if ( pom_buf != NULL )
252 printf(
"\nPrilis mnoho molarnich hmotnosti pro latky ve fazi!");
257 pom_buf = strtok( buffer, separators );
258 if ( strcmp( buffer,
"<NeplatnyNazev>" ) == 0 )
264 if ( pom_buf == NULL )
266 printf(
"\nChybi naboj %d. latky ve fazi!", j+1);
269 P_lat[j].
Q = atoi(pom_buf);
270 pom_buf = strtok( NULL, separators );
272 if ( pom_buf != NULL )
274 printf(
"\nPrilis mnoho naboju pro latky ve fazi!");
289 char nazev[30], *pom_buf;
290 const char* separators =
" ,\t";
299 pom_buf = strtok( buffer, separators );
300 if ( strcmp( buffer,
"<NeplatnyNazev>" ) == 0 )
311 if ( pom_buf == NULL )
317 pom_buf = strtok( NULL, separators );
319 if ( pom_buf != NULL )
321 printf(
"\nPrilis mnoho nazvu dalsich latek!");
327 pom_buf = strtok( buffer, separators );
328 if ( strcmp( buffer,
"<NeplatnyNazev>" ) == 0 )
334 if ( pom_buf == NULL )
340 pom_buf = strtok( NULL, separators );
342 if ( pom_buf != NULL )
344 printf(
"\nPrilis mnoho dGf pro dalsi latky!");
349 pom_buf = strtok( buffer, separators );
350 if ( strcmp( buffer,
"<NeplatnyNazev>" ) == 0 )
360 if ( pom_buf == NULL )
366 pom_buf = strtok( NULL, separators );
368 if ( pom_buf != NULL )
370 printf(
"\nPrilis mnoho dHf pro dalsi latky!");
375 pom_buf = strtok( buffer, separators );
376 if ( strcmp( buffer,
"<NeplatnyNazev>" ) == 0 )
382 if ( pom_buf == NULL )
387 P_lat[j].
M = atof(pom_buf);
388 pom_buf = strtok( NULL, separators );
390 if ( pom_buf != NULL )
392 printf(
"\nPrilis mnoho molarnich hmotnosti pro dalsi latky!");
397 pom_buf = strtok( buffer, separators );
398 if ( strcmp( buffer,
"<NeplatnyNazev>" ) == 0 )
404 if ( pom_buf == NULL )
410 pom_buf = strtok( NULL, separators );
412 if ( pom_buf != NULL )
414 printf(
"\nPrilis mnoho aktivit pro dalsi latky!");
424 char nazev[30], *pom_buf;
425 const char* separators =
" ,\t";
427 double max_poloc_rozp;
433 strcpy(buffer,
OptGetStr(
nazev,
"Reaction_type",
"<NeplatnyNazev>"));
printf(
"probehlo zjisteni typu reakce %d: %s\n",i, buffer);
434 if ( strcmp( buffer,
"<NeplatnyNazev>" ) == 0 )
break;
439 printf(
"\nNeni definovana zadna reakce!");
446 printf (
"Malo pameti!\n");
453 max_poloc_rozp = 0.0;
460 pom_buf = strtok( buffer, separators );
462 if ( strcmp( pom_buf,
"Radioactive_decay" ) == 0 )
P_che[i].
typ_reakce = 4;
463 if ( strcmp( pom_buf,
"radioactive_decay" ) == 0 )
P_che[i].
typ_reakce = 4;
469 if ( strcmp( pom_buf,
"Slow_kinetics" ) == 0 )
P_che[i].
typ_reakce = 3;
470 if ( strcmp( pom_buf,
"slow_kinetics" ) == 0 )
P_che[i].
typ_reakce = 3;
480 printf(
"\nThe type of reaction nr. %d is not valid!", i);
502 pom_buf = strtok( buffer, separators );
505 if ( pom_buf == NULL )
507 printf(
"\nChybi %d. stechometricky koeficient v %d. rovnici!", j+1, i+1);
512 pom_buf = strtok( NULL, separators );
514 if ( pom_buf != NULL )
516 printf(
"\nV %d. rovnici je prilis mnoho stechiometrickych koeficientu!", i+1);
526 printf(
"\nKineticka konstanta v %d. rovnici neni kladna!", i+1);
531 pom_buf = strtok( buffer, separators );
536 if( pom_buf == NULL )
538 printf(
"\nChybi %d. mocnina pro kinetiku %d. rovnice!", j+1, i+1);
543 pom_buf = strtok( NULL, separators );
546 if ( pom_buf != NULL )
548 printf(
"\nV %d. rovnici je prilis mnoho exponentu pro kinetiku!", i+1);
569 P_che[i+1] = pom_che;