Revisit the use of sparse matrices
The tangent stiffness matrix could technically be stored as a sparse matrix. The problem however (and the reason why currently a dense matrix is used) is how to avoid (excessive) memory allocations and/or single entry lookups during the simulation. Contact handling makes this more difficult, because new elements have to be inserted on contact (no constant block-diagonal structure anymore).
Edited by Stefan Pfeifer