Finally, we will see how well the optimizer behaves when given the system for which it was originally created. This system was given to me by Ph.D. Zahari Zlatev of DMU7.1. It describes the structure of the system derived from a scheme of chemical reactions, as described in section 1.1. The system treats 56 species, and is thus of dimension as the systems previously examined in this chapter. The system holds non-zeros, where some are located near the top and near the left side of the system. Others are distributed fairly randomly (from a statistical point of view - I'm sure the researchers behind the system will disagree that the distribution is anywhere near random).
This initial distribution of the non-zeros will behave very bad with QR factorization. We will generate a large number of fill-ins, and besides that, a large number of Givens rotations will be needed in order to factorize the system. Fortunately, it looks as though there are good opportunities for re-arranging some rows and columns to make the system better suited for sparse QR. Let's see. The initial system can be seen in figure 7.7.
The optimization on this system proved to be beneficial. The optimized system truly shows a structure much better suited for sparse QR, than the original system did. The R matrix is still somewhat sparse, although it is clearly seen, that the big savings - compared to a dense factorization - doesn't come from the back-substitution.
It is however interesting to see, how horrible the MatLab performance on this system is. MatLab requires an order of magnitude more FLOPS to solve this system to some reasonable accuracy. Had the system been better conditioned, the iterative method would have behaved better.