The diag variable in the source code

20 views
Skip to first unread message

Hejitian Pan

unread,
Sep 13, 2022, 10:41:06 PM9/13/22
to Cantera Users' Group
Hello all,

In the source code file there is a vadiable int* diag, it is often modified to 0 or 1 like in line 490: diag[ index(c_offset_T,j) ] = 0 ,line 453: diag[ index(c_offset_Y + k,j) ] = 1. The line number may not be accurate because i have modified some of the lines. What does this vadiable diag do? From the name i guess it's the diagonal of Jacobian or some matrix. When should i set it to 0 and when to 1? And I would be more than grateful if somebody can tell me how does it take effect in the numerical solving process.

Regards,
Pan

Hejitian Pan

unread,
Sep 13, 2022, 10:41:59 PM9/13/22
to Cantera Users' Group
i miss out the file name. this variable appears in StFlow.h and .cpp file
Reply all
Reply to author
Forward
0 new messages