function A = assemble_P1operator(grid, localAssembler, quadrature)

P1Basis = basis(1);

n = size(grid.nodes, 2);

A = spalloc(n, n, 10*n);

for i = 1:size(grid.elements, 2)
	nodes = grid.elements(1:3,i);
	T = grid.nodes(1:2, nodes);
	localA = localAssembler(T, P1Basis, quadrature);
	A(nodes, nodes) = A(nodes, nodes) + localA;
end

