1 | #ifndef mecca |
---|
2 | #define mecca 1 |
---|
3 | // |
---|
4 | // ############################################################################ |
---|
5 | // |
---|
6 | // create_mz_kpp_module |
---|
7 | // |
---|
8 | // create scalar 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 | // Deleted $Id since document_changes does not work for C and C++ (15.03.2019, forkel) |
---|
21 | // |
---|
22 | // Added create_set_cs (22.02.2019, forkel) |
---|
23 | // |
---|
24 | // Removed create_fill_routine (18.09.2018, ketelsen) |
---|
25 | // |
---|
26 | // initial version (Nov. 2016, ketelsen) |
---|
27 | // |
---|
28 | |
---|
29 | #include <iostream> |
---|
30 | #include <fstream> |
---|
31 | |
---|
32 | #include <string> |
---|
33 | #include <list> |
---|
34 | #include <vector> |
---|
35 | |
---|
36 | #include "fortran_file.h" |
---|
37 | #include "expand_decomp.h" |
---|
38 | |
---|
39 | // Class to create module which contains code generated by kpp. |
---|
40 | |
---|
41 | class create_kpp_module { |
---|
42 | |
---|
43 | vector <fortran_file> kpp_files; |
---|
44 | vector <fortran_file> kpp_subroutines; |
---|
45 | vector <fortran_file> kpp_includes; |
---|
46 | vector <fortran_file> e5_subroutines; |
---|
47 | fortran_file mz_kpp; |
---|
48 | fortran_file e5_kpp; |
---|
49 | fortran_file header_variables; |
---|
50 | string prefix; |
---|
51 | string module_name; |
---|
52 | vector<string> global_variable_list; |
---|
53 | vector<string> species_list; |
---|
54 | vector<string> interface_ignore; |
---|
55 | vector<Vvar> Vvar_list; |
---|
56 | |
---|
57 | |
---|
58 | void create_fortran_files_and_read(); |
---|
59 | void copy_files_to_subroutines(); |
---|
60 | void add_solver_to_subroutine_list(); |
---|
61 | void generate_module_header(); |
---|
62 | void write_module_file(); |
---|
63 | |
---|
64 | void create_kpp_integrate(); |
---|
65 | void create_set_cs(); |
---|
66 | |
---|
67 | public: |
---|
68 | |
---|
69 | void do_work (string s) ; |
---|
70 | |
---|
71 | create_kpp_module () { |
---|
72 | global_variable_list.push_back("C"); |
---|
73 | global_variable_list.push_back("VAR"); |
---|
74 | global_variable_list.push_back("FIX"); |
---|
75 | global_variable_list.push_back("A"); |
---|
76 | global_variable_list.push_back("RCONST"); |
---|
77 | } |
---|
78 | }; |
---|
79 | |
---|
80 | #endif |
---|