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 | // |
---|
15 | // Former revisions: |
---|
16 | // ----------------------- |
---|
17 | // Deleted $Id since document_changes does not work for C and C++ (15.03.2019, forkel) |
---|
18 | // |
---|
19 | // added edit_Initialize (Sept.2018, forkel) |
---|
20 | // |
---|
21 | // added global_subtolower (forkel) |
---|
22 | // initial version (Nov. 2016, ketelsen) |
---|
23 | |
---|
24 | #include <iostream> |
---|
25 | |
---|
26 | #include <string> |
---|
27 | #include <list> |
---|
28 | #include <vector> |
---|
29 | |
---|
30 | #include "program_line.h" |
---|
31 | |
---|
32 | class fortran_file { |
---|
33 | |
---|
34 | string name; |
---|
35 | |
---|
36 | public: |
---|
37 | vector<program_line> pline; |
---|
38 | |
---|
39 | void set_name(string s) {name=s;return;}; |
---|
40 | string get_name() {return name;}; |
---|
41 | void add_line(program_line &s) {pline.push_back(s);return;}; |
---|
42 | void add_line(string s) {program_line p; p.set_line(s); pline.push_back(p);return;}; |
---|
43 | |
---|
44 | void read () ; |
---|
45 | void edit_fortran () ; |
---|
46 | void copy_to_subroutine_vector (vector<fortran_file> &subvec, fortran_file & header_var) ; |
---|
47 | void edit_Jac_SP () ; |
---|
48 | void edit_KppDecomp () ; |
---|
49 | void edit_KppSolve () ; |
---|
50 | void edit_Fun () ; |
---|
51 | void edit_WAXPY () ; |
---|
52 | void edit_FunTemplate () ; |
---|
53 | void edit_JacTemplate () ; |
---|
54 | void edit_FUNC () ; |
---|
55 | void edit_Update_RCONST (vector <Vvar> &var_list) ; |
---|
56 | void edit_Initialize (vector <Vvar> &var_list) ; |
---|
57 | void edit_inc (fortran_file & header_var) ; |
---|
58 | void create_species_list(vector <string> &species_list); |
---|
59 | void vector_variable_list(vector <Vvar> &var_list); |
---|
60 | void print () ; |
---|
61 | void write_file (ofstream & out); |
---|
62 | void copy_to_MZ_KPP (fortran_file & ka); |
---|
63 | void global_substitute(string &line, string old_s, string new_s); |
---|
64 | void global_subtolower(string &line); |
---|
65 | |
---|
66 | // Routines for FORTRAN vector Mode |
---|
67 | void edit_inc_vec (vector<string> &gvl); |
---|
68 | void global_variables2vector (vector<string> &gvl); |
---|
69 | |
---|
70 | }; |
---|
71 | |
---|
72 | #endif |
---|