<div class="gmail_quote">On Wed, May 9, 2012 at 1:29 PM, Stefano Zampini <span dir="ltr"><<a href="mailto:stefano.zampini@gmail.com" target="_blank">stefano.zampini@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":cl">Finally I have some time to work on BDDC. I'm thinking to restyle some of my BDDC code. In particular in setting up the coarse environment, I want to implement a function (mostly reusing some BDDC code I already wrote) <br>
<br>MatiSSubassemble(A, IS ISSubdomains,*B,*intercomm,*partial_scatter)<br><br>which, given subdomain indices, creates a new MATIS matrix on a subcomm of the communicator of A by subassembling. In particular, ISSubdomains should come from a call to MatPartitioningApply on the adjacency matrix of the subdomains. <br>
<br>The communicator of B is the subcomm of A of processes which will receive some of the local matrices <br>intercomm will be the communicator which can be used between each receiving process and their sending "friends"<br>
*partial_scatter will be the scatter context associated to the intercomm <br><br>Jed, do you already wrote something similar for your PA? What's the best logic for you? Should I use MatCoarsen?</div></blockquote></div>
<div><br></div><div>MatCoarsen is for graph aggregation/matching, which is different.</div><br><div>It seems to me that subassembly doesn't coarsen at all. If MatGetSubMatrices() could extract parallel matrices directly, then it looks more like that's what you're after. I don't think the implementation should use an intercomm (too many implementations are buggy and it requires MPI-2 which PETSc tries to avoid depending on because enough users still have antique systems that don't support it).</div>
<div><br></div><div>In any case, I think that creating a partition should be separate from transforming the matrix.</div><div><br></div><div>For MatIS, I would be fine with creating a new MatIS using the same local matrices on a subcommunicator, then MatConvert'ing it to AIJ (that will do assembly), and discarding the temporary subcomm MatIS.</div>