function [ nq, xq, wq ] = quad1 ( nel, node, xc ) % % [ nq, xq, wq ] = quad1 ( nel, node, xc ) % % QUAD1 sets up a one point quadrature rule. % % NEL, the number of elements; % NODE, the nodes that belong to each element; % XC, the location of the nodes. % % NQ, the number of quadrature points per element: % XQ, the location of the quadrature points; % WQ, the quadrature weight. % nq = 1; % % Set the location of the quadrature point(s) in each element. % for it = 1 : nel ip1 = node(it,1); ip2 = node(it,2); x1 = xc(ip1); x2 = xc(ip2); xq(it,1) = ( x1 + x2 ) / 2.0; end % % Set the quadrature weights. % wq = 1.0;