00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _green_api_h
00029 #define _green_api_h
00030
00031 #include "constants.h"
00032 #include "config.h"
00033
00034 #define boolean int
00035 #define true 1
00036 #define false 0
00037
00038 #define NOT_TIME_DEPENDENT false
00039 #define TIME_DEPENDENT true
00040
00041
00042 #ifdef __cplusplus
00043 extern "C" {
00044 #endif
00045
00046 typedef enum{
00047 LOAD_PLUGIN = 0,
00048 KERNEL_PLUGIN = 1,
00049 GREEN_PLUGIN = 2,
00050 DATAOUT_PLUGIN = 3,
00051 POSTPROCESS_PLUGIN = 4,
00052 LOADHISTORY_PLUGIN = 5,
00053 CRUSTALDECAY_PLUGIN = 6
00054 }PluginCategory;
00055
00056 typedef enum{
00057 X_FIELD = 0,
00058 Y_FIELD = 1,
00059 Z_FIELD = 2,
00060 ADD_FIELD = 3
00061 }FieldName;
00062
00063
00064 double* crusde_register_param_double(const char* param_name, PluginCategory);
00065
00066 char** crusde_register_param_string(const char* param_name, PluginCategory);
00067
00068 void crusde_register_output_field(int* position, FieldName);
00069
00070 int crusde_get_size_x();
00071 int crusde_get_size_y();
00072 int crusde_get_size_t();
00073 int crusde_get_gridsize();
00074 int crusde_get_min_x();
00075 int crusde_get_min_y();
00076 int crusde_get_dimensions();
00077 int crusde_get_displacement_dimensions();
00078 unsigned long int crusde_model_time();
00079 unsigned long int crusde_get_timesteps();
00080 int crusde_model_step();
00081 int crusde_stepsize();
00082 int crusde_get_x_index();
00083 int crusde_get_y_index();
00084 int crusde_get_z_index();
00085
00086 const char* crusde_get_observation_file();
00087 const char* crusde_get_out_file();
00088
00089 int crusde_get_green_at(double** res, int x, int y);
00090
00091 double crusde_get_load_at(int x, int y);
00092 double crusde_get_load_history_at(int t);
00093 double crusde_get_crustal_decay_at(int t);
00094
00095 void crusde_set_result(double**);
00096 double** crusde_get_result();
00097 void crusde_set_quadrant(int);
00098 int crusde_get_quadrant();
00099
00100 void crusde_exit(int exitcode);
00101
00102 int crusde_get_current_load_component();
00103 void crusde_set_current_load_component(int);
00104 int crusde_get_number_of_loads();
00105
00106 void crusde_set_operator_space(int, int);
00107 void crusde_get_operator_space(int*, int*);
00108
00109 boolean crusde_crustal_decay_given();
00110 boolean crusde_load_history_given();
00111
00112
00113
00114 green_exec_function crusde_request_green_plugin(char* plugin);
00115 load_exec_function crusde_request_load_plugin(char* plugin);
00116 run_function crusde_request_kernel_plugin(char* plugin);
00117 run_function crusde_request_postprocessor_plugin(char* plugin);
00118 loadhistory_exec_function crusde_request_loadhistory_plugin(char* plugin);
00119 crustaldecay_exec_function crusde_request_crustaldecay_plugin(char* plugin);
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131 #ifdef __cplusplus
00132 }
00133 #endif
00134
00135 #endif // _green_api_h