<div dir="ltr">You might want to explain what you want to do. <div>A local vector has ghost values that you can use to compute local residuals. You don't usually want a matrix that conforms with this local vector.</div><div>You could get the global equations of the local vector and use MatCreateSubMatrix, but I think there is a better way to do what you want.</div><div><br></div><div>OK, Matt and Jed beat me</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 14, 2022 at 10:35 AM liluo <<a href="mailto:liluo@um.edu.mo">liluo@um.edu.mo</a>> wrote:<br></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_-3120542394385288429divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p>Dear developers,</p>
<p><br>
</p>
<p>I created a DMDA object and obtain the local vector from a global vector by using <span>DMGlobalToLocalBegin/End.</span></p>
<p>How can I obtain the corresponding local matrix from the global matrix? </p>
<p>In my case, the global matrix is of MPIBAIJ type created by <span>DMCreateMatrix(da,MATBAIJ,&A);</span><br>
<span></span></p>
<p><br>
</p>
<p>Bests,</p>
<p>LI</p>
<p><span></span></p>
<p><span><br>
</span></p>
<pre width="80"><strong><font color="#4169E1"><br></font></strong></pre>
<p></p>
<div id="gmail-m_-3120542394385288429Signature">
<div id="gmail-m_-3120542394385288429divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p></p>
</div>
</div>
</div>
</div>

</blockquote></div>