function it=pdesdt(t,sdl)
%PDESDT	Indices of triangles in a set of subdomains.
%
%	I=PDESDT(T,SDL). Given triangle data T and a list of
%	subdomain numbers SDL, I will contain indices of the triangles
%	inside that set of subdomains.
%	
%	If SDL is not given, a list of all subdomains is assumed.

%	A. Nordmark 4-25-94, AN 6-14-94.
%	Copyright (c) 1994-95 by The MathWorks, Inc.
%	$Revision: 1.4.1.1 $  $Date: 1995/08/14 15:05:18 $

nsd=max(t(4,:));
bsd=zeros(1,nsd);
if nargin==2,
  bsd(sdl)=ones(size(sdl)); % 1 if SD in list, 0 otherwise
else
  bsd=ones(1,nsd);
end

it=find(bsd(t(4,:)));
