The mesh is built as element groups, and multiple element groups can be assembled into sets which define a partition of the mesh. The matrices for the various set pairs may then be decomposed individually, and re-used multiple times to solve various problems.