function G=vector_rhs_2_Cortex
global Invariant ini_Val Material

xi_rho_0 = Material.xi_rho_0';

G=zeros(ini_Val.ncontrol,1);
connect=Invariant.connect;
aux = -  xi_rho_0.*Invariant.gaussp'.*Invariant.gweight;


for iel=1:size(connect,1)
    ig=(1:ini_Val.gaussno);
    igglob=(iel-1)*ini_Val.gaussno+ig;
    G_loc= (aux(igglob)')*Invariant.dNsh(igglob,:);
    G(connect(iel,:)) = ...
        G(connect(iel,:)) + G_loc(:);
end
