CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

Output of Jacobian matrix from SU2

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By talbring

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 18, 2015, 16:34
Default Output of Jacobian matrix from SU2
  #1
Member
 
Mandar Kulkarni
Join Date: Nov 2013
Location: Virginia Tech, Blacksburg, VA
Posts: 52
Rep Power: 13
kmandar is on a distinguished road
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
kmandar is offline   Reply With Quote

Old   September 26, 2015, 13:15
Default
  #2
Member
 
Mandar Kulkarni
Join Date: Nov 2013
Location: Virginia Tech, Blacksburg, VA
Posts: 52
Rep Power: 13
kmandar is on a distinguished road
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 understand *row_ptr, but what is the meaning of *col_ind ?

I think these variables are related to the elements in the sparse matrix. Am I right?

Thanks,
Mandar
kmandar is offline   Reply With Quote

Old   October 6, 2015, 05:51
Default
  #3
Super Moderator
 
Tim Albring
Join Date: Sep 2015
Posts: 195
Rep Power: 11
talbring is on a distinguished road
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.
kmandar likes this.
talbring is offline   Reply With Quote

Old   October 7, 2015, 15:15
Default
  #4
Member
 
Mandar Kulkarni
Join Date: Nov 2013
Location: Virginia Tech, Blacksburg, VA
Posts: 52
Rep Power: 13
kmandar is on a distinguished road
Hi talbring,

Thanks a lot. This is very helpful.

Regards,
Mandar
kmandar is offline   Reply With Quote

Reply

Tags
jacobian, matrix, output


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 16:19.