This subroutine assembles a set of element matrices, that is, it forms the summation
where each element matrix has entries only in the principal submatrix corresponding to the variables in element . Each must be held in packed form as a small full square matrix, together with a list of the variables associated with element . The assembled matrix has a symmetric sparsity pattern but may be unsymmetric. An option exists for assembling only the sparsity pattern of . If the variables are not indexed contiguously, absent rows and columns may optionally be removed.