function prikladMKP2d()

% MKP diskretizace
h = 0.01;
[P,T,ID,IN] = diskretizujObdelnik(1,1,h);
m = size(T,2);
mN = size(IN,2);
nvlnka = size(P,2);
nD = length(ID);

% data ulohy
k = ones(1,m);
f = 10*ones(1,m);
uDirich = sin(pi*P(2,ID))';
idxNonDirich = setdiff(1:nvlnka,ID);
tauNeum = ones(1,mN);

% MKP
[A,b] = mkp(P,T,k,f,IN,tauNeum,ID,uDirich);
uvlnka = zeros(nvlnka,1);
uH = A\b;
uvlnka(idxNonDirich) = uH;
uvlnka(ID) = uDirich;

trisurf(T',P(1,:),P(2,:),uvlnka')
