[petsc-users] MatNullSpaceCreate
Matthew Knepley
knepley at gmail.com
Tue Mar 20 13:14:03 CDT 2012
On Tue, Mar 20, 2012 at 12:26 PM, Shao-Ching Huang <huangsc at gmail.com>wrote:
> Hi,
>
> I have two linear systems:
>
> A1*x1=b1
> A2*x2=b2
>
> Each of A1 and A2 has a null space with a constant vector (like [1 1
> ... 1]') in it, so I currently use MatNullSpaceCreate(with
> n=0,has_cnst=PETSC_TRUE).
>
> Now I want to solve these two systems in one solve, i.e.
>
> A*x = b
>
> where A = [A1 0; 0 A2] and x=[x1 x2]', b=[b1 b2]'
>
> Can I just put two vectors
>
> [1 1 1 ... 1 0 0 ... 0]' (i.e. null space from A1)
> [0 0 0 ... 0 1 1 ... 1]' (i.e. null space from A2)
>
> into MatNullSpaceCreate (with n=2,has_cnst=PETSC_FALSE) to span the null
> space?
>
Yes,
Thanks
Matt
> Thanks.
>
> Shao-Ching
>
--
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-users/attachments/20120320/a09bb49a/attachment.htm>
More information about the petsc-users
mailing list