OpenSees Cloud
OpenSees AMI
Make Room for Storage
Original Post - 27 Nov 2020 - Michael H. Scott
Visit Structural Analysis Is Simple on Substack.
In a previous post, I showed how equation numberers can reduce the bandwidth of the tangent stiffness matrix. In addition to reducing the solution time for linear systems of equations, a smaller bandwidth reduces the data required to store the tangent stiffness matrix.
To discuss matrix storage in this post, I’ll use the frame model and node numbers from the previous post.
As shown in the previous post, we obtained the following matrix topologies and bandwidths using the Plain, AMD, and RCM equation numberers on the frame model.
Linear equation solvers operate on a particular matrix topology–full, banded, profile, or sparse. If the matrix is known to be symmetric (almost always the case for structural models) you only have to store half the matrix. The primary metric for matrix storage is the number of non-zeros allocated to represent the matrix.
For sparse, symmetric matrix storage, we store only the non-zeros that we need. Accordingly, the equation numbering does not affect the number of matrix entries stored in memory.
With profile, symmetric storage, we go column by column, figure out the row with the farthest non-zero, and store all values in between. The resulting storage pattern looks like a city skyline. With a smaller bandwidth, we allocate storage for fewer entries.
With banded, symmetric storage, we allocate data for all entries within the bandwidth, regardless of the sparsity within the band. This generally leads to more storage compared to skyline storage.
With full, symmetric storage, data is allocated for all entries of the matrix. The equation numbering doesn’t make a difference in the amount of non-zeros allocated.
You might ask “Why choose profile, banded, or full storage when you know the matrix is sparse?” One answer is modal damping, where the damping matrix is full but the allocated matrix storage is sparse, based on the element connectivity. If you use a solver with sparse or profile/skyline storage, the dynamic tangent will be inconsistent with the residual and your analysis will either converge slowly or not at all. With full storage, your analysis with modal damping will have a consistent dynamic tangent, but the solver will be slow.