compute RHS using flux splitting
for i = 1:nx
r[i] = -(fL[i+1] - fL[i])/dx - (fR[i+1] - fR[i])/dx
end
end