Hello to everyone,<br><br>I've been working for some time on this piece of code for estimating large-scale and general jacobian matrices via finite differences whose sparsity patterns can be determined a priori. It basically uses a parallel graph coloring heuristic to find a good vertex coloring for the column intersection graph relative to the jacobian matrix at hand.<br>
<br>Now, I'd like to integrate that code into PETSc, but the problem is that I don't know exactly how. So after spending a lot of time sifting through and trying to grasp "the logic" of PETSc source code, especially, the source code to the MatFDColoring module, I came up with a "tacky" solution proposal: firstly, I would call my code in order to obtain the coloring in parallel, and then I would have a routine (which would have to be embedded in PETSc code base) that, on each processor, would build the "MatFDColoring" data structure based on two things, the coloring found and the sparsity pattern of the jacobian matrix in question.<br>
<br>It seems to me that this might work out, though I'm not entirely sure. What do you guys think? Is there an easier and/or more "elegant" way to do this?<br><br>Thanks in advance,<br><br>Rafael<br>