I have a linear system of equation like<br> [A  B]  [E]= [C]<br> [F  G]  [S]= [D], <br>where size of matrix A is NxN, B is NxNs, F is Ns_N, G is Ns_Ns; size of vector E is N, S is Ns, C is N and D is N.<br>Instead of solving them together, I prefer to solve it by:<br>
(1) AX=B, AY=C;<br>(2) QS=P, Q= G-FX, P=D-FY,<br>due to the dense property of G. <br><br>In step (1), I need to extract a new &quot;vec&quot; Bi from &quot;mat&quot; B, according to the way of PETSc telling me. My question is that could I do it as follows,<br>
for a given sparse matrix B, first get transpose of B by &quot;MatTranspose(B, MatReuse, B_t); then, form a new &quot;vec&quot; Bi by &quot;MatGetRow(...)&quot;? <br>If answer is yes, is it expensive? <br><br><br><br clear="all">
<br>-- <br>Zhengyong Ren<br>AUG Group, Institute of Geophysics<br>Department of Geosciences, ETH Zurich<br>NO H 47 Sonneggstrasse 5<br>CH-8092, Zürich, Switzerland<br>Tel: +41 44 633 37561<br>e-mail: <a href="mailto:zhengyong.ren@aug.ig.erdw.ethz.ch">zhengyong.ren@aug.ig.erdw.ethz.ch</a><br>
Gmail: <a href="mailto:renzhengyong@gmail.com">renzhengyong@gmail.com</a><br>