<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;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>
<p><br>
</p>
<p>Another question is: Do the entries not filled automatically compressed out?</p>
<p><br>
</p>
<p>Thanks!</p>
<p>Junming</p>
<div id="Signature">
<div id="divtagdefaultwrapper" 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>
</body>
</html>