function out=findIndex(index,mesh)
%src+dis=dst
%PBCIndex n*3  1-edgeIndedxOfsrc 2-edgeIndexOfdst 3-+-1

%查找src和dst的对应edge索引
tempTriIndex=findTri(index,mesh);%mesh.tri索引
tempTriCoon=mesh.ConnOfTri(tempTriIndex,:);%mesh.connOfTri数据  1-Tet 2-第x面

tempNbr=length(tempTriCoon);
tempEdge=zeros(tempNbr*3,1);%src所有mesh.Edge的索引
for n=1:tempNbr
    if tempTriCoon(n,2)==1 %123 
        tempEdge((n-1)*3+1)=mesh.EdgeOfTet(tempTriCoon(n,1),1);
        tempEdge((n-1)*3+2)=mesh.EdgeOfTet(tempTriCoon(n,1),2);
        tempEdge((n-1)*3+3)=mesh.EdgeOfTet(tempTriCoon(n,1),4);
    elseif tempTriCoon(n,2)==2
        tempEdge((n-1)*3+1)=mesh.EdgeOfTet(tempTriCoon(n,1),1);
        tempEdge((n-1)*3+2)=mesh.EdgeOfTet(tempTriCoon(n,1),3);
        tempEdge((n-1)*3+3)=mesh.EdgeOfTet(tempTriCoon(n,1),5);
    elseif tempTriCoon(n,2)==3
        tempEdge((n-1)*3+1)=mesh.EdgeOfTet(tempTriCoon(n,1),2);
        tempEdge((n-1)*3+2)=mesh.EdgeOfTet(tempTriCoon(n,1),3);
        tempEdge((n-1)*3+3)=mesh.EdgeOfTet(tempTriCoon(n,1),6);
    elseif tempTriCoon(n,2)==4
        tempEdge((n-1)*3+1)=mesh.EdgeOfTet(tempTriCoon(n,1),4);
        tempEdge((n-1)*3+2)=mesh.EdgeOfTet(tempTriCoon(n,1),5);
        tempEdge((n-1)*3+3)=mesh.EdgeOfTet(tempTriCoon(n,1),6);
    end
end
%去重
[edge,~,~]=unique(tempEdge);%src边mesh.edge索引


out=edge;


end