[GRASS-SVN] r41642 - in grass/trunk: lib/gpde raster/r.gwflow

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Apr 1 05:55:17 EDT 2010


Author: huhabla
Date: 2010-04-01 05:55:16 -0400 (Thu, 01 Apr 2010)
New Revision: 41642

Modified:
   grass/trunk/lib/gpde/N_gwflow.c
   grass/trunk/raster/r.gwflow/main.c
Log:
Use cell array in r.gwflow to store the boundary conditions

Modified: grass/trunk/lib/gpde/N_gwflow.c
===================================================================
--- grass/trunk/lib/gpde/N_gwflow.c	2010-03-31 20:25:48 UTC (rev 41641)
+++ grass/trunk/lib/gpde/N_gwflow.c	2010-04-01 09:55:16 UTC (rev 41642)
@@ -154,7 +154,7 @@
 
     data->phead = N_alloc_array_2d(cols, rows, 1, DCELL_TYPE);
     data->phead_start = N_alloc_array_2d(cols, rows, 1, DCELL_TYPE);
-    data->status = N_alloc_array_2d(cols, rows, 1, DCELL_TYPE);
+    data->status = N_alloc_array_2d(cols, rows, 1, CELL_TYPE);
     data->hc_x = N_alloc_array_2d(cols, rows, 1, DCELL_TYPE);
     data->hc_y = N_alloc_array_2d(cols, rows, 1, DCELL_TYPE);
     data->q = N_alloc_array_2d(cols, rows, 1, DCELL_TYPE);
@@ -672,7 +672,7 @@
     for (y = 0; y < rows; y++) {
 	G_percent(y, rows - 1, 10);
 	for (x = 0; x < cols; x++) {
-	    stat = (int)N_get_array_2d_d_value(data->status, x, y);
+	    stat = N_get_array_2d_c_value(data->status, x, y);
 
             val = 0.0;
 

Modified: grass/trunk/raster/r.gwflow/main.c
===================================================================
--- grass/trunk/raster/r.gwflow/main.c	2010-03-31 20:25:48 UTC (rev 41641)
+++ grass/trunk/raster/r.gwflow/main.c	2010-04-01 09:55:16 UTC (rev 41642)
@@ -333,7 +333,7 @@
     /* Set the inactive values to zero, to assure a no flow boundary */
     for (y = 0; y < geom->rows; y++) {
 	for (x = 0; x < geom->cols; x++) {
-	    stat = (int)N_get_array_2d_d_value(data->status, x, y);
+	    stat = N_get_array_2d_c_value(data->status, x, y);
 	    if (stat == N_CELL_INACTIVE) {	/*only inactive cells */
 		N_put_array_2d_d_value(data->hc_x, x, y, 0);
 		N_put_array_2d_d_value(data->hc_y, x, y, 0);
@@ -478,7 +478,7 @@
     for (y = 0; y < rows; y++) {
 	G_percent(y, rows - 1, 10);
 	for (x = 0; x < cols; x++) {
-	    stat = (int)N_get_array_2d_d_value(status, x, y);
+	    stat = N_get_array_2d_c_value(status, x, y);
 	    if (stat == N_CELL_ACTIVE) {	/*only active cells */
 		d1 = result[count];
 		val = (DCELL) d1;



More information about the grass-commit mailing list