|
[Sponsors] |
September 18, 2015, 16:34 |
Output of Jacobian matrix from SU2
|
#1 |
Member
Mandar Kulkarni
Join Date: Nov 2013
Location: Virginia Tech, Blacksburg, VA
Posts: 52
Rep Power: 13 |
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 |
|
September 26, 2015, 13:15 |
|
#2 |
Member
Mandar Kulkarni
Join Date: Nov 2013
Location: Virginia Tech, Blacksburg, VA
Posts: 52
Rep Power: 13 |
I found these variables declared in matrix.hpp
Code:
unsigned long *row_ptr; /*!< \brief Pointers to the first element in each row. */ unsigned long *col_ind; /*!< \brief Column index for each of the elements in val(). */ I think these variables are related to the elements in the sparse matrix. Am I right? Thanks, Mandar |
|
October 6, 2015, 05:51 |
|
#3 |
Super Moderator
Tim Albring
Join Date: Sep 2015
Posts: 195
Rep Power: 11 |
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. |
|
October 7, 2015, 15:15 |
|
#4 |
Member
Mandar Kulkarni
Join Date: Nov 2013
Location: Virginia Tech, Blacksburg, VA
Posts: 52
Rep Power: 13 |
Hi talbring,
Thanks a lot. This is very helpful. Regards, Mandar |
|
Tags |
jacobian, matrix, output |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] outputTime in Swak function | immortality | OpenFOAM Community Contributions | 20 | October 6, 2022 13:08 |
wrong SU2 calculation for lift and drag coefficient for NAC4421 | mechy | SU2 | 7 | January 9, 2017 06:18 |
Nondimensional output from SU2 | kmandar | SU2 | 2 | September 16, 2015 12:24 |
best setting for SU2 | mechy | SU2 | 3 | April 20, 2014 20:13 |
writing execFlowFunctionObjects | immortality | OpenFOAM Post-Processing | 30 | September 15, 2013 07:16 |