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