function eta = flux_jump(x,u,lambda)
N = length(x);
eta = zeros(N,1);

for j = 2:N-1
    ul = (u(j)-u(j-1))/(x(j)-x(j-1)); %left derivative
    ur = (u(j+1)-u(j))/(x(j+1)-x(j)); %right derivative 
    eta(j) = abs(lambda(x(j))*ur - lambda(x(j))*ul); %error indicator
end
end
