Rename function 'restrict' and 'prolong'.
[colorize.git] / lib / multigrid.c
index 0d130f6..7e9e193 100644 (file)
@@ -1135,7 +1135,7 @@ static double residual(int level, darray_t *value, const darray_t *mark, const d
  * Note that the flow vectors must be scaled xy already (if x and y is shrinked
  * before z)!
  */
-static int restrict(const darray_t *value, darray_t *nvalue, const darray_t *flow)
+static int restrict_array(const darray_t *value, darray_t *nvalue, const darray_t *flow)
 {
        int ks, wd, hd, kd;
        darray_t *temp = NULL;
@@ -1195,7 +1195,7 @@ error:
  * substracted from the value. So the changes in the next level's value are
  * prolonged to the value.
  */
-static int prolong(darray_t *value, const darray_t *nvalue, const darray_t *flow)
+static int prolong_array(darray_t *value, const darray_t *nvalue, const darray_t *flow)
 {
        int ws, hs, ks, wd, hd, kd;
        int i, pixles;
@@ -1406,9 +1406,9 @@ int solve_mg(int nlevel, int iters, int ncycle, darray_t **values, darray_t **ma
                                curr_residual += residual(level, values[level], marks[level], init, nb_list[level]);
 #endif
                        if (level < scalexyz)
-                               rc = restrict(values[level], values[level+1], flows[level]);
+                               rc = restrict_array(values[level], values[level+1], flows[level]);
                        else
-                               rc = restrict(values[level], values[level+1], NULL);
+                               rc = restrict_array(values[level], values[level+1], NULL);
                        if (rc < 0)
                                goto error;
                }
@@ -1420,9 +1420,9 @@ int solve_mg(int nlevel, int iters, int ncycle, darray_t **values, darray_t **ma
                /* go up */
                for (level = nlevel-2; level >= 0; level--) {
                        if (level < scalexyz)
-                               rc = prolong(values[level], values[level+1], flows[level]);
+                               rc = prolong_array(values[level], values[level+1], flows[level]);
                        else
-                               rc = prolong(values[level], values[level+1], NULL);
+                               rc = prolong_array(values[level], values[level+1], NULL);
                        if (rc < 0)
                                goto error;
                        for (i = 0; i < iters; i++)