function [u,k] = multigrid_iter(l,prec)

global Matice PraveStrany

b = PraveStrany{l};
A = Matice{l};
n = length(b);
u = zeros(n,1);
r = b-A*u;

k = 0;
while norm(r)/norm(b)>prec
    v = multigrid(l,r);
    u = u+v;
    r = b-A*u;
    k = k+1;
end

