function bloc_J = bloc_J(J,x,e)

% bloc_J = bloc_J(J,x,e)
%             It calculates a local contribution to the right-hand
%             side vector that corresponds to the linear functional
%              f(v) = J * \int_{K^e} v(x) dx

x1 = x(:,e(1));
x2 = x(:,e(2));
x3 = x(:,e(3));

R = [x2-x1 x3-x1];
r = x1;

bloc_J = 0.5 * J * [1/3;1/3;1/3] * abs(det(R));
