/Users/huttone/Devel/sedflux-new/sedflux/trunk/ew/sedflux/my_processes.h

Go to the documentation of this file.
00001 #if !defined( MY_PROCESSES_H )
00002 #define MY_PROCESSES_H
00003 
00004 #include <glib.h>
00005 #include <utils/utils.h>
00006 #include <sed/sed_sedflux.h>
00007 #include "sedflux.h"
00008 
00009 /* All of the initialize functions for my processes
00010 */
00011 gboolean         init_avulsion    ( Sed_process , Eh_symbol_table , GError** );
00012 gboolean         init_bbl         ( Sed_process , Eh_symbol_table , GError** );
00013 gboolean         init_bedload     ( Sed_process , Eh_symbol_table , GError** );
00014 gboolean         init_bioturbation( Sed_process , Eh_symbol_table , GError** );
00015 gboolean         init_compaction  ( Sed_process , Eh_symbol_table , GError** );
00016 gboolean         init_constants   ( Sed_process , Eh_symbol_table , GError** );
00017 gboolean         init_cpr         ( Sed_process , Eh_symbol_table , GError** );
00018 gboolean         init_data_dump   ( Sed_process , Eh_symbol_table , GError** );
00019 gboolean         init_debris_flow ( Sed_process , Eh_symbol_table , GError** );
00020 gboolean         init_diffusion   ( Sed_process , Eh_symbol_table , GError** );
00021 gboolean         init_erosion     ( Sed_process , Eh_symbol_table , GError** );
00022 gboolean         init_failure     ( Sed_process , Eh_symbol_table , GError** );
00023 gboolean         init_flow        ( Sed_process , Eh_symbol_table , GError** );
00024 gboolean         init_isostasy    ( Sed_process , Eh_symbol_table , GError** );
00025 gboolean         init_met_station ( Sed_process , Eh_symbol_table , GError** );
00026 gboolean         init_new_process ( Sed_process , Eh_symbol_table , GError** );
00027 gboolean         init_plume       ( Sed_process , Eh_symbol_table , GError** );
00028 gboolean         init_plume_hypo  ( Sed_process , Eh_symbol_table , GError** );
00029 gboolean         init_inflow      ( Sed_process , Eh_symbol_table , GError** );
00030 gboolean         init_quake       ( Sed_process , Eh_symbol_table , GError** );
00031 gboolean         init_sea_level   ( Sed_process , Eh_symbol_table , GError** );
00032 gboolean         init_squall      ( Sed_process , Eh_symbol_table , GError** );
00033 gboolean         init_storm       ( Sed_process , Eh_symbol_table , GError** );
00034 gboolean         init_subsidence  ( Sed_process , Eh_symbol_table , GError** );
00035 gboolean         init_tide        ( Sed_process , Eh_symbol_table , GError** );
00036 gboolean         init_river       ( Sed_process , Eh_symbol_table , GError** );
00037 gboolean         init_xshore      ( Sed_process , Eh_symbol_table , GError** );
00038 
00039 /* All of the run functions for my processes
00040 */
00041 Sed_process_info run_avulsion     ( Sed_process , Sed_cube );
00042 Sed_process_info run_bbl          ( Sed_process , Sed_cube );
00043 Sed_process_info run_bedload      ( Sed_process , Sed_cube );
00044 Sed_process_info run_bioturbation ( Sed_process , Sed_cube );
00045 Sed_process_info run_compaction   ( Sed_process , Sed_cube );
00046 Sed_process_info run_constants    ( Sed_process , Sed_cube );
00047 Sed_process_info run_cpr          ( Sed_process , Sed_cube );
00048 Sed_process_info run_data_dump    ( Sed_process , Sed_cube );
00049 Sed_process_info run_debris_flow  ( Sed_process , Sed_cube );
00050 Sed_process_info run_diffusion    ( Sed_process , Sed_cube );
00051 Sed_process_info run_erosion      ( Sed_process , Sed_cube );
00052 Sed_process_info run_failure      ( Sed_process , Sed_cube );
00053 Sed_process_info run_flow         ( Sed_process , Sed_cube );
00054 Sed_process_info run_isostasy     ( Sed_process , Sed_cube );
00055 Sed_process_info run_met_station  ( Sed_process , Sed_cube );
00056 Sed_process_info run_new_process  ( Sed_process , Sed_cube );
00057 Sed_process_info run_plume        ( Sed_process , Sed_cube );
00058 Sed_process_info run_plume_hypo   ( Sed_process , Sed_cube );
00059 Sed_process_info run_plume_hyper_inflow( Sed_process , Sed_cube );
00060 Sed_process_info run_plume_hyper_sakura( Sed_process , Sed_cube );
00061 Sed_process_info run_inflow       ( Sed_process , Sed_cube );
00062 Sed_process_info run_sakura       ( Sed_process , Sed_cube );
00063 Sed_process_info run_quake        ( Sed_process , Sed_cube );
00064 Sed_process_info run_river        ( Sed_process , Sed_cube );
00065 Sed_process_info run_sea_level    ( Sed_process , Sed_cube );
00066 Sed_process_info run_squall       ( Sed_process , Sed_cube );
00067 Sed_process_info run_slump        ( Sed_process , Sed_cube );
00068 Sed_process_info run_storm        ( Sed_process , Sed_cube );
00069 Sed_process_info run_subsidence   ( Sed_process , Sed_cube );
00070 Sed_process_info run_tide         ( Sed_process , Sed_cube );
00071 Sed_process_info run_xshore       ( Sed_process , Sed_cube );
00072 
00073 Sed_proc_destroy destroy_avulsion;
00074 Sed_proc_destroy destroy_bbl;
00075 Sed_proc_destroy destroy_bedload;
00076 Sed_proc_destroy destroy_bioturbation;
00077 Sed_proc_destroy destroy_compaction;
00078 Sed_proc_destroy destroy_cpr;
00079 Sed_proc_destroy destroy_constants;
00080 Sed_proc_destroy destroy_data_dump;
00081 Sed_proc_destroy destroy_debris_flow;
00082 Sed_proc_destroy destroy_diffusion;
00083 Sed_proc_destroy destroy_erosion;
00084 Sed_proc_destroy destroy_failure;
00085 Sed_proc_destroy destroy_flow;
00086 Sed_proc_destroy destroy_inflow;
00087 Sed_proc_destroy destroy_isostasy;
00088 Sed_proc_destroy destroy_met_station;
00089 Sed_proc_destroy destroy_new_process;
00090 Sed_proc_destroy destroy_plume;
00091 Sed_proc_destroy destroy_plume_hypo;
00092 Sed_proc_destroy destroy_quake;
00093 Sed_proc_destroy destroy_river;
00094 Sed_proc_destroy destroy_sea_level;
00095 Sed_proc_destroy destroy_squall;
00096 Sed_proc_destroy destroy_storm;
00097 Sed_proc_destroy destroy_subsidence;
00098 Sed_proc_destroy destroy_tide;
00099 Sed_proc_destroy destroy_xshore;
00100 
00101 #define BBL_PROCESS_NAME_S    "bbl"
00102 
00103 typedef struct
00104 {
00105    int          algorithm;
00106    gchar*       src_file;
00107    Eh_sequence* src_seq;
00108    double       last_year;
00109 }
00110 Bbl_t;
00111 
00112 typedef struct
00113 {
00114    double bed_load_dump_length;
00115    double bedload_ratio;
00116    double f_retained;
00117    gchar* river_name;
00118 }
00119 Bedload_dump_t;
00120 
00121 typedef struct
00122 {
00123    Eh_input_val k;
00124    Eh_input_val depth;
00125 }
00126 Bioturbation_t;
00127 
00128 typedef struct
00129 {
00130    Eh_file_list* file_list;
00131    gchar*        output_dir;
00132 }
00133 Cpr_t;
00134 
00135 typedef struct
00136 {
00137    double  vertical_resolution;
00138    double  horizontal_resolution;
00139    double  y_lim_min, y_lim_max;
00140    double  x_lim_min, x_lim_max;
00141    gchar*  output_dir;
00142    GArray* property;
00143    int     count;
00144 }
00145 Data_dump_t;
00146 
00147 typedef struct
00148 {
00149    double   yield_strength;
00150    double   viscosity;
00151    double   numerical_viscosity;
00152    double   dt;
00153    double   max_time;
00154    Sed_cube failure;
00155 }
00156 Debris_flow_t;
00157 
00158 #define EROSION_PROCESS_NAME_S      "erosion"
00159 
00160 typedef struct
00161 {
00162    gint   method;
00163    double k_max;
00164    double stream_reach;
00165    double stream_relief;
00166    double slope;
00167 }
00168 Erosion_t;
00169 
00170 #include <failure.h>
00171 
00172 GQuark failure_profile_data_quark( void );
00173 #define FAILURE_PROFILE_DATA failure_profile_data_quark()
00174 
00175 typedef struct
00176 {
00177    double       decider_clay_fraction;
00178    double       consolidation;
00179    double       cohesion;
00180    double       friction_angle;
00181    double       gravity;
00182    double       density_sea_water;
00183    Sed_process  turbidity_current;
00184    Sed_process  debris_flow;
00185    Sed_process  slump;
00186    Sed_process  flow;
00187    Fail_profile* fail_prof;
00188 }
00189 Failure_proc_t;
00190 
00191 typedef struct
00192 {
00193    double      relaxation_time; /* relaxation time of the Earth's crust (years) */
00194    double      eet;
00195    double      youngs_modulus;
00196    double      last_time; /* the last time (in years) that the Earth was subsided */
00197    guint       len;
00198    double      last_half_load;
00199    Eh_dbl_grid last_dw_iso;
00200    Eh_dbl_grid last_load;
00201 }
00202 Isostasy_t;
00203 
00204 typedef struct
00205 {
00206    FILE*           fp;
00207    gchar*          parameter_str;
00208    Sed_measurement parameter;
00209    gboolean        from_river_mouth;
00210    GArray*         pos;
00211    gchar*          filename;
00212    Sed_tripod      met_fp;
00213 }
00214 Met_station_t;
00215 
00216 typedef struct
00217 {
00218    double   last_time;
00219    double   mean_quake;
00220    double   var_quake;
00221    long     rand_seed;
00222    GRand*   rand;
00223 }
00224 Quake_t;
00225 
00226 typedef struct
00227 {
00228    Sed_hydro_file   fp_river;
00229    char*            filename;
00230    Sed_hydro_file_type type;
00231    gboolean         buffer_is_on;
00232    int              location;
00233    double           total_mass;
00234    double           total_mass_from_river;
00235    Sed_riv          this_river;
00236    char*            river_name;
00237 }
00238 River_t;
00239 
00240 typedef struct
00241 {
00242    Eh_input_val std_dev;
00243    Eh_input_val min_angle;
00244    Eh_input_val max_angle;
00245    Eh_input_val f_remain;
00246    gboolean     branching_is_on;
00247    GRand*       rand;
00248    guint32      rand_seed;
00249    gboolean     reset_angle;
00250    gint         hinge_i;
00251    gint         hinge_j;
00252    char*        river_name;
00253 }
00254 Avulsion_t;
00255 
00256 typedef struct
00257 {
00258    Eh_input_val gravity;
00259    Eh_input_val rho_sea_h2o;
00260    Eh_input_val rho_h2o;
00261    Eh_input_val salinity;
00262    Eh_input_val rho_quartz;
00263    Eh_input_val rho_mantle;
00264 }
00265 Constants_t;
00266 
00267 typedef struct
00268 {
00269    Eh_input_val k_max;
00270    Eh_input_val k_long_max;
00271    Eh_input_val k_cross_max;
00272    double       skin_depth;
00273 }
00274 Diffusion_t;
00275 
00276 #define FLOW_PROCESS_NAME_S        "FLOW"
00277 
00278 #define FLOW_ALGORITHM_EXPONENTIAL (1)
00279 #define FLOW_ALGORITHM_TERZAGHI    (2)
00280 #define FLOW_ALGORITHM_DARCY       (3)
00281 
00282 #define FLOW_KEY_METHOD            "method"
00283 
00284 typedef struct
00285 {
00286    gint    method;
00287    double  last_time; // the last time (in years) that excess porewater pressure was calculated
00288    guint   len;
00289    double* old_load;
00290 }
00291 Flow_t;
00292 
00293 typedef struct
00294 {
00295    double param;
00296 }
00297 New_process_t;
00298 
00299 #define PLUME_PROCESS_NAME_S      "plume"
00300 
00301 typedef struct
00302 {
00303    Sed_process plume_proc_hyper;
00304    Sed_process plume_proc_hypo;
00305 
00306    gchar*      hyper_name;
00307    gchar*      hypo_name;
00308 }
00309 Plume_t;
00310 
00311 GQuark plume_hydro_data_quark( void );
00312 #define PLUME_HYDRO_DATA plume_hydro_data_quark()
00313 
00314 #define PLUME_HYPO_PROCESS_NAME_S "HYPOPYCNAL PLUME"
00315 
00316 #include "plume_types.h"
00317 #include "plumeinput.h"
00318 
00319 typedef struct
00320 {
00321    Eh_input_val  current_velocity;
00322    double        ocean_concentration;
00323    double        plume_width;
00324    int           ndx;
00325    int           ndy;
00326 
00327    int           deposit_size;
00328    Sed_cell**    deposit;
00329    Sed_cell**    last_deposit;
00330    double**      plume_deposit;
00331    Plume_river   last_river_data;
00332    Plume_data*   plume_data;
00333 
00334    Sed_cell_grid deposit_grid;
00335    Sed_cell_grid last_deposit_grid;
00336 }
00337 Plume_hypo_t;
00338 
00339 typedef struct
00340 {
00341    gboolean initialized;
00342    double   time_fraction;
00343    double   squall_duration;
00344    double   dt;
00345 }
00346 Squall_t;
00347 
00348 typedef struct
00349 {
00350    double   sua;
00351    double   sub;
00352    double   E_a;
00353    double   E_b;
00354    double   C_d;
00355    double   tan_phi;
00356    double   mu;
00357    double   rhoSW;
00358    double   channel_width;
00359    double   channel_length;
00360 
00361    Sed_cube failure;
00362 
00363 //   guint    n_x;
00364 //   guint    n_y;
00365 //   double** deposit;
00366 }
00367 Inflow_t;
00368 
00369 typedef struct
00370 {
00371    gboolean     initialized;
00372    double       last_time;
00373    int          sediment_type;
00374    Eh_input_val xshore_current;
00375 }
00376 Xshore_t;
00377 
00378 typedef struct
00379 {
00380    gchar*    filename;
00381    double    start_year;
00382    double**  sea_level;
00383    gint      len;
00384 }
00385 Sea_level_t;
00386 
00387 typedef struct
00388 {
00389    gboolean initialized;
00390    Sed_cube failure;
00391 }
00392 Slump_t;
00393 
00394 typedef struct
00395 {
00396    double       last_k;
00397    double       last_time;
00398    double       alpha;
00399    double       beta;
00400    double       fraction;   
00401    gboolean     average_non_events;
00402    GRand*       rand;
00403    Eh_input_val wave_height;
00404    guint32      rand_seed;
00405 }
00406 Storm_t;
00407 
00408 typedef struct
00409 {
00410    gchar*       filename;
00411    double       last_year;
00412    GArray*      tectonic_curve;
00413    Eh_sequence* subsidence_seq;
00414 }
00415 Subsidence_t;
00416 
00417 typedef struct
00418 {
00419    double tidal_range;
00420    double tidal_period;
00421 }
00422 Tide_t;
00423 
00424 #endif /* MY_PROCESSES_H */

Generated on Fri Jan 4 18:04:15 2008 for sedflux by  doxygen 1.5.2