source: palm/trunk/UTIL/chemistry/gasphase_preproc/kpp/src/scan.h @ 3635

Last change on this file since 3635 was 2696, checked in by kanani, 7 years ago

Merge of branch palm4u into trunk

File size: 3.1 KB
Line 
1/******************************************************************************
2
3  KPP - The Kinetic PreProcessor
4        Builds simulation code for chemical kinetic systems
5
6  Copyright (C) 1995-1996 Valeriu Damian and Adrian Sandu
7  Copyright (C) 1997-2005 Adrian Sandu
8
9  KPP is free software; you can redistribute it and/or modify it under the
10  terms of the GNU General Public License as published by the Free Software
11  Foundation (http://www.gnu.org/copyleft/gpl.html); either version 2 of the
12  License, or (at your option) any later version.
13
14  KPP is distributed in the hope that it will be useful, but WITHOUT ANY
15  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
17  details.
18
19  You should have received a copy of the GNU General Public License along
20  with this program; if not, consult http://www.gnu.org/copyleft/gpl.html or
21  write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22  Boston, MA  02111-1307,  USA.
23
24  Adrian Sandu
25  Computer Science Department
26  Virginia Polytechnic Institute and State University
27  Blacksburg, VA 24060
28  E-mail: sandu@cs.vt.edu
29
30******************************************************************************/
31
32
33
34#ifndef _SCAN_H_
35#define _SCAN_H_
36
37#include <stdio.h>
38#include "gdef.h"
39
40/*  mz_rs_20050518+ value increased */
41#define MAX_INLINE 10000
42/* #define MAX_INLINE 4000 */
43/*  mz_rs_20050518- */
44         
45enum eq_state { LHS, RHS, RAT };
46enum sptypes { DUMMY_SPC, VAR_SPC, RAD_SPC, FIX_SPC };
47enum atomcheck { NO_CHECK, DO_CHECK, CANCEL_CHECK };
48enum codetype { APPEND, REPLACE };
49
50typedef struct {
51                 int key;
52                 int type;
53                 char * kname;
54               } INLINE_KEY;
55
56extern int eqState;
57extern int isPhoto;
58extern int crt_line_no;
59extern char *crt_filename;
60extern int crtLine;
61extern char crtFile[];
62extern char crtToken[];
63extern char nextToken[];
64extern int crtTokType;
65extern int nextTokType;
66extern int nError;
67extern int nWarning;
68extern int crt_section;
69
70int Parser( char * filename ); 
71void ScanError( char *fmt, ...  );
72void ParserError( char *fmt, ...  );
73void ScanWarning( char *fmt, ...  );
74void ParserWarning( char *fmt, ...  );
75void Error( char *fmt, ...  );
76void Warning( char *fmt, ...  );
77void Message( char *fmt, ...  );
78void FatalError( int status, char *fmt, ... );
79
80void DeclareAtom( char *atname );
81void SetAtomType( char *atname, int type );
82void AddAtom( char *atname, char *nr );
83void DeclareSpecies( int type, char* spname );
84void SetSpcType( int type, char *spname );
85void AssignInitialValue( char *spname , char *spval ); 
86void StoreEquationRate( char *rate, char *label );
87void CheckEquation(); 
88void ProcessTerm( int side, char *sign, char *coef, char *spname  );
89void AddLumpSpecies( char *spname );
90void CheckLump( char *spname );
91void AddLookAt( char *spname );
92void AddMonitor( char *spname );
93void AddTransport( char *spname );
94
95void WriteAtoms();
96void WriteSpecies();
97void WriteMatrices();
98void WriteOptions();
99
100char * AppendString( char * s1, char * s2, int * len, int addlen );
101void AddInlineCode( char * context, char * code );
102
103#endif
Note: See TracBrowser for help on using the repository browser.