function diri_list = do_Lshape2D_dlist(X1,X2)
% usage:  function diri_list = ssss.m(X1,X2)
% Makes diri_list for the 2D L shaped region problem.  diri_list is a
% nnodes by 2 array, with the ith row corresponding to the ith node.  If 
% diri_list(i,1) == 0, then the ith node is not a Dirichlet node, and
% diri_list(i,2) is ignored.  If diri_list(i,1) is 1 (or some other
% non-zero value), then diri_list(i,2) is the Dirichlet value assigned to 
% the ith node.
%
% This routine scans through all nodes and assigns the value of dval to
% nodes on the edge of the L shaped domain. Nodes outside the L shaped
% region are also handled as Dirichlet and assigned the value bval.

dval = 0;
bval = 0;

nnodes = prod(size(X1));

for i=1:nnodes
  x = X1(i);
  y = X2(i);
  if x<0 & y<0
    diri_list(i,:)=[1,bval];		% blanked node
  elseif x==1
    diri_list(i,:)=[1,dval];		% diri node
  elseif y==1
    diri_list(i,:)=[1,dval];		% diri node
  elseif x>=0 & y==-1
    diri_list(i,:)=[1,dval];		% diri node
  elseif x==0 & y<=0
    diri_list(i,:)=[1,dval];		% diri node
  elseif x<=0 & y==0
    diri_list(i,:)=[1,dval];		% diri node
  elseif x==-1 & y>=0
    diri_list(i,:)=[1,dval];		% diri node
  else
    % this must be an interior node, do nothing
  end
end

    
    