1 | #ifndef FFILE |
---|
2 | #define FFILE 1 |
---|
3 | |
---|
4 | // ############################################################################ |
---|
5 | // |
---|
6 | // create mz_kpp_module |
---|
7 | // |
---|
8 | // create code from .f90 sources created by KPP to be used in MESSy |
---|
9 | // |
---|
10 | // COPYRIGHT Klaus Ketelsen and MPI-CH April 2007 |
---|
11 | // |
---|
12 | // ############################################################################ |
---|
13 | // |
---|
14 | //Current revisions: |
---|
15 | //------------------ |
---|
16 | / |
---|
17 | / |
---|
18 | //Former revisions: |
---|
19 | //----------------- |
---|
20 | // Nov 2016: Intial version of KP4 adapted to PALM (Klaus Ketelsen) |
---|
21 | // forkel Sept.2018: added edit_Initialize |
---|
22 | // forkel : added global_subtolower |
---|
23 | // |
---|
24 | / Intial version of KP4 |
---|
25 | |
---|
26 | |
---|
27 | #include <iostream> |
---|
28 | |
---|
29 | #include <string> |
---|
30 | #include <list> |
---|
31 | #include <vector> |
---|
32 | |
---|
33 | #include "program_line.h" |
---|
34 | |
---|
35 | class fortran_file { |
---|
36 | |
---|
37 | string name; |
---|
38 | |
---|
39 | public: |
---|
40 | vector<program_line> pline; |
---|
41 | |
---|
42 | void set_name(string s) {name=s;return;}; |
---|
43 | string get_name() {return name;}; |
---|
44 | void add_line(program_line &s) {pline.push_back(s);return;}; |
---|
45 | void add_line(string s) {program_line p; p.set_line(s); pline.push_back(p);return;}; |
---|
46 | |
---|
47 | void read () ; |
---|
48 | void edit_fortran () ; |
---|
49 | void copy_to_subroutine_vector (vector<fortran_file> &subvec, fortran_file & header_var) ; |
---|
50 | void edit_Jac_SP () ; |
---|
51 | void edit_KppDecomp () ; |
---|
52 | void edit_KppSolve () ; |
---|
53 | void edit_Fun () ; |
---|
54 | void edit_WAXPY () ; |
---|
55 | void edit_FunTemplate () ; |
---|
56 | void edit_JacTemplate () ; |
---|
57 | void edit_FUNC () ; |
---|
58 | void edit_Update_RCONST (vector <Vvar> &var_list) ; |
---|
59 | void edit_Initialize (vector <Vvar> &var_list) ; |
---|
60 | void edit_inc (fortran_file & header_var) ; |
---|
61 | void create_species_list(vector <string> &species_list); |
---|
62 | void vector_variable_list(vector <Vvar> &var_list); |
---|
63 | void print () ; |
---|
64 | void write_file (ofstream & out); |
---|
65 | void copy_to_MZ_KPP (fortran_file & ka); |
---|
66 | void global_substitute(string &line, string old_s, string new_s); |
---|
67 | void global_subtolower(string &line); |
---|
68 | |
---|
69 | // Routines for FORTRAN vector Mode |
---|
70 | void edit_inc_vec (vector<string> &gvl); |
---|
71 | void global_variables2vector (vector<string> &gvl); |
---|
72 | |
---|
73 | }; |
---|
74 | |
---|
75 | #endif |
---|