<div dir="ltr"><div dir="ltr">On Tue, Jun 27, 2023 at 2:20 PM Duan Junming via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg6697262867473065175">
<div dir="ltr">
<div id="m_6697262867473065175divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:"Times New Roman",Times,serif" dir="ltr">
<p>Dear all,</p>
<p><br>
</p>
<p>I try to create a compatible sparse MPI matrix A with dmplex global vector x, so I can do matrix-vector multiplication y = A*x.</p>
<p>I think I can first get the local and global sizes of x on comm, say n and N, also sizes of y, m, M,</p>
<p>then create A by using MatCreate(comm, &A), set the sizes using MatSetSizes(A, m, n, M, N), set the type using MatSetType(A, MATMPIAIJ). <span style="font-size:12pt">Is this process correct?</span></p></div></div></div></blockquote><div><br></div><div>Yes.</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 class="msg6697262867473065175"><div dir="ltr"><div id="m_6697262867473065175divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:"Times New Roman",Times,serif" dir="ltr">
<p>Another question is: Do the entries not filled automatically compressed out?</p></div></div></div></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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg6697262867473065175"><div dir="ltr"><div id="m_6697262867473065175divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:"Times New Roman",Times,serif" dir="ltr">
<p>Thanks!</p>
<p>Junming</p>
<div id="m_6697262867473065175Signature">
<div id="m_6697262867473065175divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,Times,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p style="font-family:Calibri,Helvetica,sans-serif;font-size:16px"><span style="font-family:"Times New Roman",Times,serif;font-size:12pt"></span></p>
</div>
</div>
</div>
</div>
</div></blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>