[petsc-users] Some questions regarding VecNest type.
Jed Brown
jedbrown at mcs.anl.gov
Wed Oct 12 16:41:42 CDT 2011
On Wed, Oct 12, 2011 at 16:26, Vijay S. Mahadevan <vijay.m at gmail.com> wrote:
> Not fun, yes, but two different code paths are inevitable.
>
Nonsense! That's the point of the MatGetLocalSubMatrix() assembly interface.
> You can
> choose to do block solves or monolithic inversions but both do need a
> different data structure representation. In your example mat X vs Y.
>
> Anyway, I was trying to create a simple test case and was stopped
> immediately in my progress. I found the hard way that VecCreateNest is
> the only way to create a Nest vector ? The usual
> VecCreate+SetFromOptions doesn't seem to do the trick.
>
So we can (and should) change this to be like MatNest where you can
MatCreate(), MatSetType(), MatNestSetSubMats(). But even with the update,
you will still have to call VecNestSetSubVecs(), so creation is still
different. The point of the rest of the interface (e.g. VecGetSubVector()
instead of VecNestGetSubVecs()) is that *the rest* of your code never
depends on the implementation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111012/6b45779a/attachment.htm>
More information about the petsc-users
mailing list