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