Suppose we place a grid in xt-plane with points $(x_j,t_n)$ and mesh width $h= \Delta x$ and time step $k =\Delta t$ and $x_j=jh$ and $t_n = nk$ and call $U_j^n$ to be the approximation to some $u(x_j,t_n)$ at the discrete points. Also, notice that
$$ x_{j+1/2} = x_j + h/2 = (j+1/2)h $$
Im confused in this notion:
define ${\bf piecewise \; constant}$ functon $U_k(x,t)$ for all $x,t$ from the discrete values $U_j^n$. Assign this function the value $U_j^n$ in the $(j,n)$ grid cell:
$$ U_k(x,t) = U_j^n \; \; \; \; \text{for all } \; \; (x,t) \in [x_{j-1/2},x_{j+1/2}) \times [t_n, t_{n+1}) $$
what does this function represent? I cant understant really the difference between $U_k$ and $U_j^n$
This definition is introduced in the derivation of Godunov type finite-volume methods. Its meaning is summarized in the picture below:
We have the grid nodes with abscissas $x_i$. We define finite volumes around each node, which are the cells $\mathcal{C}_i = [x_{i-1/2}, x_{i+1/2}]$ such that the node $x_i$ is at the center of the cell $\mathcal{C}_i$. Then, we introduce a piecewise constant function $\tilde u(x,t)$ which constant value over the cell $\mathcal{C}_i$ equals the grid-node value $u_i^n$ of $u$. This definition is analogous to the construction of midpoint Riemann sums.