瀏覽代碼

Water budget for 3d groundwater flow implemented.

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@40537 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert 15 年之前
父節點
當前提交
0a5852995c
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      lib/gpde/N_gwflow.c

+ 4 - 4
lib/gpde/N_gwflow.c

@@ -385,7 +385,7 @@ N_gwflow_3d_calc_water_budget(N_gwflow_data3d * data, N_geom_data * geom, N_arra
         for (y = 0; y < rows; y++) {
         for (y = 0; y < rows; y++) {
             G_percent(y, rows - 1, 10);
             G_percent(y, rows - 1, 10);
             for (x = 0; x < cols; x++) {
             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;
                 val = 0.0;
 
 
@@ -394,7 +394,7 @@ N_gwflow_3d_calc_water_budget(N_gwflow_data3d * data, N_geom_data * geom, N_arra
                     /* Compute the flow parameter */
                     /* Compute the flow parameter */
                     dstar = N_callback_gwflow_3d(data, geom, x, y, z);
                     dstar = N_callback_gwflow_3d(data, geom, x, y, z);
                     /* Compute the gradient in each direction pointing from the center */
                     /* 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) {
                     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 );
                         h = N_get_array_3d_d_value(data->phead,  x + 1, y, z );
@@ -408,8 +408,8 @@ N_gwflow_3d_calc_water_budget(N_gwflow_data3d * data, N_geom_data * geom, N_arra
                         h = N_get_array_3d_d_value(data->phead,  x    , y + 1, z);
                         h = N_get_array_3d_d_value(data->phead,  x    , y + 1, z);
                         val += dstar->S * (hc - h);
                         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);
                         val += dstar->N * (hc - h);
                     }
                     }
                     if((int)N_get_array_3d_d_value(data->status, x    , y, z + 1) != N_CELL_INACTIVE) {
                     if((int)N_get_array_3d_d_value(data->status, x    , y, z + 1) != N_CELL_INACTIVE) {