function u_new = u_step(x_node, u, z)
% 
% U_STEP(x_node, u, z): update the running sum of residuals
% 
% X_NODE: current X variable (hyperplane parameters) at the node evaluated
%   [spaceDim+1, 1]
% 
% U: the current running sum of the residual, from the current node to each edge
%   [spaceDim+1, N(i)]
% 
% Z: the z variables
%   [spaceDim+1, N(i)]
% 
% U_NEW: updated running sum of residuals

m = length(x_node);
spaceDim = m-1;
[p, N_i] = size(u);
[r, t] = size(z);

assert(spaceDim > 0);
assert(p == m);
assert(r == m);
assert(t == N_i);

x_rep = repmat(x_node, [1, N_i]);
u_new = u + (x_rep - z);

return;





end