On Tue, Mar 15, 2011 at 4:10 PM, Jed Brown <jed at 59a2.org> wrote:

> On Tue, Mar 15, 2011 at 22:07, Matthew Knepley <knepley at gmail.com> wrote:
>
>> I guess I have no problem with MatGetSubMatrix() being the interface for
>> this, since all solvers get the Mat object. However, my point was
>> really that the interface for creating such things is horrible. There is
>> no easy way for me to do what I want, and the hard way is too hard for
>> me (a developer) without looking at a lot of code, trying things and
>> seeing where they break, and probably some crying. This will have to
>> change or no one will use this.
>>
>
> I'd love to hear suggestions for something with similar or better
> modularity.
>

What I have now is a MatShell that implements MatGetSubMatrix(), and it asks

  Is this the field I am replacing?

    Yes - give back my stored matrix

     No  - Dispatch to the original matrix

For this I need IS retrieval from FS which I am adding. I think you can do
this in
general very easily. Basically you have a function SwapOutBlockOfMatrix().

   Matt

-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110315/136c0ee6/attachment.html>

Reply via email to