<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br></div><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">So in this case, I would have a monolithic (interleaved) matrix which I<br>
assemble into by doing MatGetLocalSubMatrix to get a block. Rather than<br>
having a Nest for which I do MatNestGetSubMat to get a block. Is that<br>
right? So in this case I just need to arrange to create my monolithic<br>
matrices and the ISes to pass to MatGetLocalSubMatrix (note I can't let<br>
the DM create the Mat because in some cases I'm lying to it about the<br>
connectivity so the sparsity pattern it would give is wrong, even if the<br>
number of dofs and offsets are right). However, is it intended that<br>
this kind of setup ever work with DMSetMatType(..., MATNEST)? If so, I<br>
think I'll be back at square one with this approach.</blockquote><div><br></div><div>Yes, exactly. You would just use your ISes from the section to pull out the</div><div>submatrix, </div></div></div></div></blockquote><div><br></div>Do I have to build these from the global section I've pulled from the dm by hand or is there a utility function to do so? If the former, I run over all the points in the chart, how do I determine which dofs belong to each field (it sort of feels like I'm recreating something that the dm just do already).<div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>and it should then function exactly as the one from MatNestGetSubMat().</div>
<div>I don't think square one here, because the approach is more flexible. </div></div></div></div></blockquote><div><br></div><div>So with that part I was referring to matgetsubmatrix_nest only being able to pull out single blocks, which sort of defeats recursive fieldsplit, since you can't ask for a 2x2 block to split again. Perhaps, however this is a small smop.</div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>If the IS</div><div>matches the IS for a Nest block, then the submatrix can just be returned wholesale.</div><div>If the Mat is not a Nest, or the IS is interleaved, then the interface is the same.</div>
<div>I think this approach can do what you want.</div></div></div></div>
</blockquote><div><br></div>I'll have to do something similar with the vecs I build, since they're currently built separately and then shoved together with a vecscatter as needed, but I guess that's more similar index fiddling.</div><div><br></div><div>Lawrence<br><div><br></div></div></body></html>