00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef INFLOW_IS_INCLUDED
00022 # define INFLOW_IS_INCLUDED
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #include <stdio.h>
00039 #include <glib.h>
00040 #include <sed/sed_sedflux.h>
00041
00042 #include <sed/datadir_path.h>
00043 #if !defined( DATADIR )
00044 # define DATADIR "/usr/local/share"
00045 #endif
00046 #define INFLOW_TEST_PARAM_FILE DATADIR "/ew/inflow_param.kvf"
00047 #define INFLOW_TEST_BATHY_FILE DATADIR "/ew/inflow_bathy.csv"
00048 #define INFLOW_TEST_FLOOD_FILE DATADIR "/ew/inflow_flood.kvf"
00049
00050 typedef enum
00051 {
00052 INFLOW_ERROR_BAD_PARAMETER
00053 }
00054 Inflow_error;
00055
00056 #define INFLOW_ERROR inflow_error_quark()
00057
00058 typedef struct
00059 {
00060 double x;
00061 double dx;
00062 double erode_depth;
00063 double *phe;
00064 }
00065 Inflow_phe_query_st;
00066
00067 typedef void (*Inflow_query_func) ( Inflow_phe_query_st* data , gpointer user_data );
00068
00069 typedef struct
00070 {
00071 double e_a;
00072 double e_b;
00073 double sua;
00074 double sub;
00075 double c_drag;
00076 double tan_phi;
00077 double mu_water;
00078 double rho_river_water;
00079 double rho_sea_water;
00080 double channel_width;
00081 double channel_len;
00082 double dep_start;
00083
00084 Inflow_query_func get_phe;
00085 gpointer get_phe_data;
00086 }
00087 Inflow_const_st;
00088
00089 gboolean inflow( double day , double x[] , double slopeX[] ,
00090 double wX[] , int nNodes , double dx ,
00091 double xDep , double riverWidth , double u0 ,
00092 double h0 , double dc , double *gzF ,
00093 double *grainDia , double *lambda , double *rhoSed ,
00094 double *rhoGrain , int nGrains , double rho0 ,
00095 double rhoF0 , Inflow_const_st* c, double **deposit ,
00096 double** eroded , FILE *fpout );
00097 Sed_hydro inflow_flood_from_cell( Sed_cell c , double area );
00098 gboolean sed_inflow( Sed_cube p ,
00099 Sed_hydro f ,
00100 gint i_start ,
00101 double dx ,
00102 Inflow_const_st* c );
00103
00104 #endif