function u0 = InitialCondition(X,nodesDir1,nodesDir0)

nPt = size(X,1);
u0 = zeros(nPt,1); 

u0(nodesDir1)=1;
u0(nodesDir0)=0;

sigma = 1; xref = 1; 
xdim = ( X(:,1) - xref) / sigma; 
ydim = ( X(:,2) - xref) / sigma; 
ind = find( (xdim.^2 + ydim.^2)<=1 ); 
u0(ind) = 0.25*(1 + cos(pi*xdim(ind))).*(1 + cos(pi*ydim(ind))); 
%}