<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Oct 20, 2016 at 1:22 AM, Safin, Artur <span dir="ltr"><<a href="mailto:aks084000@utdallas.edu" target="_blank">aks084000@utdallas.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div id="gmail-m_-134667772016593611divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:calibri,arial,helvetica,sans-serif">
<p></p>
<div>Hi all,</div>
<div><br>
</div>
<div>I would like to get your advice on how to set up an interface problem that I get from domain decomposition. The particular issue that I am dealing with is how to 'stack' two vectors on top of each other.</div>
<div><br>
</div>
<div>I would like to set up a problem of type</div>
<div><br>
</div>
<div>[ A B ] [ x ] = [ b ]</div>
<div>[ C D ] [ y ] [ c ]</div>
<div><br>
</div>
<div>where x and y live on a subset of the global domain (the interface to be exact, <span style="font-family:calibri,arial,helvetica,sans-serif,"apple color emoji","segoe ui emoji",notocoloremoji,"segoe ui symbol","android emoji",emojisymbols;font-size:16px">obtained
with VecGetSubVector</span>). I want to solve this system with an iterative method. I already have the x and y vectors, but in order to set up the system I believe I will need a vector that looks like v = [x; y]. Is there a way to set up a vector like this?
It would also be beneficial if I could extract either the x or y component of the solution vector back into the corresponding subvector.</div>
<div><br>
</div>
<div>Also, just in general, I am curious as to how one would approach setting up these kinds of problems.</div></div></div></blockquote><div><br></div><div>You use</div><div><br></div><div> <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatGetLocalSubMatrix.html">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatGetLocalSubMatrix.html</a></div><div> <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecGetSubVector.html">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecGetSubVector.html</a></div><div><br></div><div>to put values directly into the subvectors and submatrices. This interacts well with MatNest, so it</div><div>can be optimized after you get it working.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div id="gmail-m_-134667772016593611divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:calibri,arial,helvetica,sans-serif">
<div>Thanks,</div>
<div><br>
</div>
<div>Artur</div>
<br>
<p></p>
</div>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">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</div>
</div></div>