[2696] | 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 | #include <iostream> |
---|
| 15 | #include <fstream> |
---|
| 16 | |
---|
| 17 | #include <string> |
---|
| 18 | #include <list> |
---|
| 19 | #include <vector> |
---|
| 20 | |
---|
| 21 | #include "fortran_file.h" |
---|
| 22 | #include "expand_decomp.h" |
---|
| 23 | |
---|
| 24 | // Class to create module which contains code generated by kpp. |
---|
| 25 | |
---|
| 26 | class create_kpp_module { |
---|
| 27 | |
---|
| 28 | vector <fortran_file> kpp_files; |
---|
| 29 | vector <fortran_file> kpp_subroutines; |
---|
| 30 | vector <fortran_file> kpp_includes; |
---|
| 31 | vector <fortran_file> e5_subroutines; |
---|
| 32 | fortran_file mz_kpp; |
---|
| 33 | fortran_file e5_kpp; |
---|
| 34 | fortran_file header_variables; |
---|
| 35 | string prefix; |
---|
| 36 | string module_name; |
---|
| 37 | vector<string> global_variable_list; |
---|
| 38 | vector<string> species_list; |
---|
| 39 | vector<string> interface_ignore; |
---|
| 40 | vector<Vvar> Vvar_list; |
---|
| 41 | |
---|
| 42 | |
---|
| 43 | void create_fortran_files_and_read(); |
---|
| 44 | void copy_files_to_subroutines(); |
---|
| 45 | void add_solver_to_subroutine_list(); |
---|
| 46 | void generate_module_header(); |
---|
| 47 | void write_module_file(); |
---|
| 48 | |
---|
| 49 | void create_kpp_integrate(); |
---|
| 50 | void create_fill_routine(vector<fortran_file> &e5_list, Vvar &var ); |
---|
| 51 | public: |
---|
| 52 | |
---|
| 53 | void do_work (string s) ; |
---|
| 54 | |
---|
| 55 | create_kpp_module () { |
---|
| 56 | global_variable_list.push_back("C"); |
---|
| 57 | global_variable_list.push_back("VAR"); |
---|
| 58 | global_variable_list.push_back("FIX"); |
---|
| 59 | global_variable_list.push_back("A"); |
---|
| 60 | global_variable_list.push_back("RCONST"); |
---|
| 61 | } |
---|
| 62 | }; |
---|
| 63 | |
---|
| 64 | #endif |
---|