% Convection - Diffusion - 2D; Dirichle BC on [0,1]*[0,1]
% compute an exact solution sol=x^3*y^2*(1-x)*(1-y)
%
function sol=cd_sol(h,nanr)

xcoor=h:h:(1-h);ycoor=h:h:(1-h);
sol  =spalloc(size(xcoor,1),1,size(xcoor,1)); 
for i=1:nanr,
    for j=1:nanr,
        sol((i-1)*nanr+j,1)=(xcoor(i)^3)*(ycoor(j)^2)*(1-xcoor(i))*(1-ycoor(j))';
    end
end
%sol=sol';

%[meshx,meshy] = meshdom(0:h:1,0:h:1);
%meshsol=(meshx.^3).*(meshy.^2).*(1.-meshx).*(1.-meshy);
%mesh(meshsol,[20 20]),hold on,pause
%
