Output of Jacobian matrix from SU2
Hi,
I am implementing a method of obtaining flow sensitivities using Continuum Sensitivity Method. My current focus is Euler analysis. In the process, I want to output the Jacobain matrix and punch the elements of the matrix with high precision to text file, similar to what is done in the restart file. a) Is there already a routine to punch out a matrix which I may use? b) Is the structure (i.e. which elements are nonzero) of the sparse matrix available? I see that it is initialized in CSysMatrix::Initialize, but I could not follow the code to understand the structure. Thanks, Mandar |
I found these variables declared in matrix.hpp
Code:
unsigned long *row_ptr; /*!< \brief Pointers to the first element in each row. */ I think these variables are related to the elements in the sparse matrix. Am I right? Thanks, Mandar |
Hi kmandar,
you are right, these variables are related to the sparse matrix entries. The matrix is stored using a (block) CRS format (http://netlib.org/linalg/html_templates/node91.html). To see how to loop through the entries take a look at the routine CSysMatrix::MatrixVectorProduct in matrix_structure.cpp. |
Hi talbring,
Thanks a lot. This is very helpful. Regards, Mandar |
All times are GMT -4. The time now is 13:35. |