function prikladRichardson3()

for h=[0.1,0.2,0.25,0.5]
    h
    [uzly,prvky,ID] = diskretizuj_obdelnik(1,1,h);
    n = size(uzly,2);
    m = size(prvky,2);
    f = zeros(1,m);
    for i=1:m
        ti = sum(uzly(:,prvky(:,i)),2)/3;
        f(i) = sin(8*pi*ti(1))*cos(8*pi*ti(2))+sin(4*pi*ti(1))*cos(4*pi*ti(2)) + sin(pi*ti(1))*cos(pi*ti(2));
    end
    [A,b] = mkp_2d(uzly,prvky,f,ID);
    u = A\b;
    trisurf(prvky',uzly(1,:),uzly(2,:),u)
    title('reseni')

    omega = 1/Gershgorin(A);
    [u,k] = Richardson(A,b,zeros(n,1),omega,1e-3,5000);
    k

    pause
end
