// assemblage
//
function [Aglob,Fglob]= assemblage(cal_Melm,Fext,U)
//
     global NUMER ADRESS Nno_u Nno_p Npt_u Npt_p;
//   
Ndof = length(NUMER);
[Nelt Ndof_el] = size(ADRESS)

Fglob = zeros(Ndof,1);
Aglob = spzeros(Ndof,Ndof);

// boucle sur les elements
//
for inel=1:Nelt
   clear Aloc;
   [Aloc,Floc]=cal_Melm(inel,Fext,U);
   for i = 1:Ndof_el
    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,[Ndof Ndof]); 
   Aglob = Aglob + Aloc;
   
end

endfunction
