next up previous contents
Next: Bibliography Up: E. Matrix Storage Formats Previous: E.3 Compressed Sparse Row

E.4 Matrix Storage Format Conversion

Since the CSR format is used in context of external solver modules only, the MCSR class provides a method for converting the already stored MCSR matrix to the respective CSR variant.

This method takes two boolean arguments: the first one, fortran, can be used to adapt the index array for the use in FORTRAN code. It is a well-known fact that indexing in FORTRAN starts with 1, whereas with 0 in C/C++. For that reason, the indices have to be incremented by one in case the array is passed to a function written in FORTRAN. The second flag sortedDiag indicates whether to store the diagonal sorted (Variant 1) or at the beginning of the row (Variant 2). The respective arrays are stored within the class and respective direct access methods to the CSR data are provided.


next up previous contents
Next: Bibliography Up: E. Matrix Storage Formats Previous: E.3 Compressed Sparse Row

S. Wagner: Small-Signal Device and Circuit Simulation