[GRASS-SVN] r59631 - grass-addons/grass7/raster/r.damflood
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Apr 7 15:01:14 PDT 2014
Author: wenzeslaus
Date: 2014-04-07 15:01:13 -0700 (Mon, 07 Apr 2014)
New Revision: 59631
Modified:
grass-addons/grass7/raster/r.damflood/SWE.c
grass-addons/grass7/raster/r.damflood/SWE.h
grass-addons/grass7/raster/r.damflood/main.c
Log:
r.damflood: fix error implicit declaration of function velocita_breccia which is invalid in C99 (-Wimplicit-function-declaration) by moving definition to a proper place
Modified: grass-addons/grass7/raster/r.damflood/SWE.c
===================================================================
--- grass-addons/grass7/raster/r.damflood/SWE.c 2014-04-07 20:54:35 UTC (rev 59630)
+++ grass-addons/grass7/raster/r.damflood/SWE.c 2014-04-07 22:01:13 UTC (rev 59631)
@@ -24,6 +24,22 @@
#define g 9.81
+float velocita_breccia(int i,double h)
+{
+ //double h;
+ //int i;
+ //float g=9.81;
+ float v;
+
+ if(i==1){
+ v=0.93*sqrt(h);
+ }else if (i==2){
+ v=0.4*sqrt(2*g*h);
+ }
+ return v;
+}
+
+
void shallow_water(double **m_h1,double **m_u1, double **m_v1, float **m_z,float **m_DAMBREAK,float **m_m, int **m_lake, double **m_h2, double **m_u2, double **m_v2, int row, int col, int nrows, int ncols,float timestep, float res_ew, float res_ns, int method, int num_cell, int num_break, double t){
/*FUNCTION VARIABLES*/
Modified: grass-addons/grass7/raster/r.damflood/SWE.h
===================================================================
--- grass-addons/grass7/raster/r.damflood/SWE.h 2014-04-07 20:54:35 UTC (rev 59630)
+++ grass-addons/grass7/raster/r.damflood/SWE.h 2014-04-07 22:01:13 UTC (rev 59631)
@@ -1,3 +1,6 @@
+
+float velocita_breccia(int i,double h);
+
/*Funzione per risolvere le shallow water equations
originariamente sviluppata per r.damflood (GRASS command)
nel caso generico dare una matrice con 2 raster di 0 **m_DAMBREAK & **m_lake
Modified: grass-addons/grass7/raster/r.damflood/main.c
===================================================================
--- grass-addons/grass7/raster/r.damflood/main.c 2014-04-07 20:54:35 UTC (rev 59630)
+++ grass-addons/grass7/raster/r.damflood/main.c 2014-04-07 22:01:13 UTC (rev 59631)
@@ -153,22 +153,6 @@
}
-
-float velocita_breccia(int i,double h)
-{
- //double h;
- //int i;
- //float g=9.81;
- float v;
-
- if(i==1){
- v=0.93*sqrt(h);
- }else if (i==2){
- v=0.4*sqrt(2*g*h);
- }
- return v;
-}
-
//*********************************************************************************************
/* main program */
int main(int argc, char *argv[]){
More information about the grass-commit
mailing list