On Tue, Mar 20, 2012 at 12:26 PM, Shao-Ching Huang <span dir="ltr"><<a href="mailto:huangsc@gmail.com">huangsc@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I have two linear systems:<br>
<br>
A1*x1=b1<br>
A2*x2=b2<br>
<br>
Each of A1 and A2 has a null space with a constant vector (like [1 1<br>
... 1]') in it, so I currently use MatNullSpaceCreate(with<br>
n=0,has_cnst=PETSC_TRUE).<br>
<br>
Now I want to solve these two systems in one solve, i.e.<br>
<br>
A*x = b<br>
<br>
where A = [A1 0; 0 A2] and x=[x1 x2]', b=[b1 b2]'<br>
<br>
Can I just put two vectors<br>
<br>
[1 1 1 ... 1 0 0 ... 0]' (i.e. null space from A1)<br>
[0 0 0 ... 0 1 1 ... 1]' (i.e. null space from A2)<br>
<br>
into MatNullSpaceCreate (with n=2,has_cnst=PETSC_FALSE) to span the null space?<br></blockquote><div><br></div><div>Yes,</div><div><br></div><div> Thanks</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks.<br>
<span class="HOEnZb"><font color="#888888"><br>
Shao-Ching<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>