[GRASS-SVN] r40537 - grass/trunk/lib/gpde
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 18 14:39:54 EST 2010
Author: huhabla
Date: 2010-01-18 14:39:53 -0500 (Mon, 18 Jan 2010)
New Revision: 40537
Modified:
grass/trunk/lib/gpde/N_gwflow.c
Log:
Water budget for 3d groundwater flow implemented.
Modified: grass/trunk/lib/gpde/N_gwflow.c
===================================================================
--- grass/trunk/lib/gpde/N_gwflow.c 2010-01-18 19:37:18 UTC (rev 40536)
+++ grass/trunk/lib/gpde/N_gwflow.c 2010-01-18 19:39:53 UTC (rev 40537)
@@ -385,7 +385,7 @@
for (y = 0; y < rows; y++) {
G_percent(y, rows - 1, 10);
for (x = 0; x < cols; x++) {
- stat = (int)N_get_array_3d_d_value(data->status, x, y);
+ stat = (int)N_get_array_3d_d_value(data->status, x, y, z);
val = 0.0;
@@ -394,7 +394,7 @@
/* Compute the flow parameter */
dstar = N_callback_gwflow_3d(data, geom, x, y, z);
/* Compute the gradient in each direction pointing from the center */
- hc = N_get_array_3d_d_value(data->phead, x, y);
+ hc = N_get_array_3d_d_value(data->phead, x, y, z);
if((int)N_get_array_3d_d_value(data->status, x + 1, y, z ) != N_CELL_INACTIVE) {
h = N_get_array_3d_d_value(data->phead, x + 1, y, z );
@@ -408,8 +408,8 @@
h = N_get_array_3d_d_value(data->phead, x , y + 1, z);
val += dstar->S * (hc - h);
}
- if((int)N_get_array_3d_d_value(data->status, x , y - 1) != N_CELL_INACTIVE) {
- h = N_get_array_3d_d_value(data->phead, x , y - 1);
+ if((int)N_get_array_3d_d_value(data->status, x , y - 1, z) != N_CELL_INACTIVE) {
+ h = N_get_array_3d_d_value(data->phead, x , y - 1, z);
val += dstar->N * (hc - h);
}
if((int)N_get_array_3d_d_value(data->status, x , y, z + 1) != N_CELL_INACTIVE) {
More information about the grass-commit
mailing list