// assemblage
//
function [Aglob,Fglob]= assemblage(cal_Melm,Fext,U)
//
   global CONNEC COOR NUMER ADRESS UC Nelt Nno Npt NI;
   global XG PG;
//   
Fglob = zeros(Npt,1);
Aglob = spzeros(Npt,Npt);

// boucle sur les elements
//
for inel=1:Nelt
   clear Aloc;
   [Aloc,Floc]=cal_Melm(inel,Fext,U);
   for i = 1:Nno
    Fglob(ADRESS(inel,i)) = Fglob(ADRESS(inel,i)) + Floc(i);
   end;
   Aloc=sparse(Aloc);
   [ij,v,mn] = spget(Aloc);
   for i = 1:length(v)
     ij(i,1) = ADRESS(inel,ij(i,1));
     ij(i,2) = ADRESS(inel,ij(i,2));
   end;
   Aloc = sparse(ij,v,[Npt Npt]); 
   Aglob = Aglob + Aloc;
   
end

endfunction
