From: Rainer M. <ra...@tb...> - 2008-09-09 13:03:44
|
Hi there, For large models with a very sparse Jacobi matrix, it is much more efficient to NOT print out all the DENSE_ELEM[] = 0 commands for the gcc compiler. So I have added this to construction of the forward and adjoint Jacobi evaluation function. From looking at the results and the CVODES examples I think that it is OK, to just not initialize or set the DENSE_ELEM things for the 0 entries. However, I guess that could also be very useful for the hard-coded R.H.S. functions (used by both evaluateAST and the arithmeticCompiler). So instead of looping through the neq*neq matrix, we could generate some sort of list, which contains the correct Jacobi matrix equation (only for non-0 entris) and the indices i,j to which Jacobi element it refers to. Then just loop through this list instead of through neq*neq. What do you think? Worth a try? Rainer |