crusde_api.h

Go to the documentation of this file.
00001 /*************************************************************************** 00002 * File: ./crusde_api.h 00003 * Author: Ronni Grapenthin, NORVULK & HU-BERLIN 00004 * Created: 20.02.2007 00005 * Licence: GPLv2 00006 * 00007 * ######################################################################### 00008 * 00009 * CrusDe, simulation framework for crustal deformation studies 00010 * Copyright (C) 2007 Ronni Grapenthin 00011 * 00012 * This program is free software; you can redistribute it and/or 00013 * modify it under the terms of the GNU General Public License 00014 * as published by the Free Software Foundation; version 2 00015 * of the License. 00016 * 00017 * This program is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU General Public License 00023 * along with this program; if not, write to the Free Software 00024 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 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 /* mimic boolean */ 00035 #define true 1 /* mimic boolean true */ 00036 #define false 0 /* mimic boolean false */ 00037 // 00038 #ifdef __cplusplus 00039 extern "C" { 00040 #endif 00041 00042 typedef enum{ 00043 LOAD_PLUGIN = 0, 00044 KERNEL_PLUGIN = 1, 00045 GREEN_PLUGIN = 2, 00046 DATAOUT_PLUGIN = 3, 00047 POSTPROCESS_PLUGIN = 4, 00048 LOADHISTORY_PLUGIN = 5 00049 }PluginCategory; 00050 00051 typedef enum{ 00052 X_FIELD = 0, 00053 Y_FIELD = 1, 00054 Z_FIELD = 2, 00055 ADD_FIELD = 3 00056 }FieldName; 00057 00058 00059 void crusde_register_param(double* param, const char* param_name, PluginCategory); 00060 /*register parameter with CrusDe*/ 00061 void crusde_register_output_field(int* position, FieldName); 00062 /*register output field with CrusDe*/ 00063 int crusde_get_size_x(); /*length of the region of interest*/ 00064 int crusde_get_size_y(); /*width of the region of interest*/ 00065 int crusde_get_size_t(); /*total number of time steps*/ 00066 int crusde_get_gridsize(); /*side length of a grid cell*/ 00067 int crusde_get_min_x(); /*westernmost coordinate of ROI*/ 00068 int crusde_get_min_y(); /*southernmost coordinate of ROI*/ 00069 int crusde_get_dimensions(); /*total number of output fields*/ 00070 int crusde_get_displacement_dimensions(); /*total number of spatial output fields (x,y,z)*/ 00071 int crusde_model_time(); /*current time step*/ 00072 int crusde_stepsize(); /*time increment with each model step*/ 00073 int crusde_get_x_index(); /*index of x-displacement values in result array*/ 00074 int crusde_get_y_index(); /*index of y-displacement values in result array*/ 00075 int crusde_get_z_index(); /*index of z-displacement values in result array*/ 00076 00077 const char* crusde_get_observation_file(); /*filename of points to be observed (unused)*/ 00078 const char* crusde_get_load_file(); /*file that contains load definition*/ 00079 const char* crusde_get_out_file(); /*filename for result output*/ 00080 00081 int crusde_get_green_at(double** res, int x, int y); 00082 /*green's function coefficients at x,y*/ 00083 double crusde_get_load_at(int x, int y, int t);/*load at x,y,t*/ 00084 double crusde_constrain_load_height(double h, int x, int y, int z); 00085 /*constrain load h at x,y,t*/ 00086 00087 void crusde_set_result(double**); /*return pointer to model results*/ 00088 double** crusde_get_result(); /*pointer to model results*/ 00089 void crusde_set_quadrant(int); /*get / set quadrant in coordinate system ...*/ 00090 int crusde_get_quadrant(); /*... in which green's function is calculated*/ 00091 00092 void crusde_exit(int exitcode); /*have CrusDe terminate gracefully*/ 00093 00094 boolean crusde_load_history_exists(); /*a load history was defined, returns {true|false}*/ 00095 00096 /*functions to request pointers to the run time function of other plugins of the same category*/ 00097 green_exec_function crusde_request_green_plugin(char* plugin); 00098 load_exec_function crusde_request_load_plugin(char* plugin); 00099 run_function crusde_request_kernel_plugin(char* plugin); 00100 run_function crusde_request_postprocessor_plugin(char* plugin); 00101 loadhistory_exec_function crusde_request_loadhistory_plugin(char* plugin); 00102 00103 00104 /*void crusde_print_green_params(); 00105 void crusde_print_load_params(); 00106 void crusde_print_kernel_params(); 00107 */ 00108 00109 /*double* crusde_get_green_array(); 00110 double* crusde_get_load_array(); 00111 */ 00112 00113 #ifdef __cplusplus 00114 } 00115 #endif 00116 00117 #endif // _green_api_h

Generated on Sun Jul 29 08:17:23 2007 for CrusDe by doxygen 1.3.8