Hello, Hong,<br><br>thank you very much for the help. Well, I'm not positive wether I really understood what that code snippet does, but I'll definitely take a closer look at it later. For now, I have some doubts I'd like to clear out. As far as I'm concerned, the following line<br>
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">ierr = MatGetColoring(Jac,MATCOLORING_SL,&iscoloring);CHKERRQ(ierr);</blockquote>
<div><br>gives me the coloring, right? But what if I want to test my own parallel coloring routine, instead of just using PETSc's? Please, correct me if I'm wrong: the way I see it, the MatFDColoring context in PETSc is always built on top of 1) the coloring (ISColoring) <b>and</b> 2) the sparsity pattern of the underlying matrix, right?<br>
<br>The thing is that I've developed my code completely separate from the PETSc API, I mean, it's written in "pure" ANSI C language/MPI. My goal now is to link it to the PETSc framework, so that I can benefit from all the other things already implemented within PETSc. As I'm not quite the expert in the "inner workings" of the PETSc library, my first guess was that I would have to provide a special routine to create the MatFDColoring context on each processor based on the coloring I found and on how my code "represents" the sparsity pattern of the jacobian matrix.<br>
<br>Rafael<br></div><br>