<div dir="ltr">Do you know what kind of solver works well for this problem?<div><br></div><div>You probably want to figure that out first and not worry about efficiency. </div><div><br></div><div>MATCOMPOSITE does what you want but not all solvers will work with it.</div><div><br></div><div>Where does this problem come from? We have a lot of experience and might know something.</div><div><br></div><div>Mark</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 12, 2022 at 1:33 PM Peder Jørgensgaard Olesen via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</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 class="msg2650141620983590696">
<div dir="ltr">
<div id="m_-829510148838848988divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p>Hello</p>
<p><br>
</p>
<p>I have a set of sparse matrices (A1, A2, ...) , and need to generate a larger matrix B with these as submatrices. <span style="font-size:12pt">I do not know the
</span><span style="font-size:12pt">precise </span><span style="font-size:12pt">sparse layouts of the </span><span style="font-size:12pt">A's (only that each row has one or two non-zero values), and extracting
<i>all</i> values to copy into B seems incredibly wasteful. How can I make use of the sparsity to solve this efficiently?</span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p>Thanks,</p>
<p>Peder</p>
<p><span style="font-size:12pt"></span></p>
<p><br>
</p>
<div id="m_-829510148838848988Signature">
<div id="m_-829510148838848988divtagdefaultwrapper" 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><br>
</p>
<p></p>
<table border="0" cellspacing="0" cellpadding="0" style="font-family:"Times New Roman";padding:0px;width:400px">
<tbody>
<tr>
<td style="width:400px">
<table border="0" cellspacing="0" cellpadding="0" style="width:400px;font-family:Arial;font-size:11.5px;border-collapse:collapse">
<tbody>
<tr>
<td valign="top" style="width:50px;vertical-align:top">
<table cellspacing="0" cellpadding="0" style="width:50px;padding-top:4px">
<tbody>
<tr>
<td align="left" style="width:50px;vertical-align:top"><img width="36" height="53" src="http://www.dtu.dk/-/media/DTU_Generelt/Andet/mail-signature-logo.png"></td>
</tr>
</tbody>
</table>
</td>
<td valign="top" style="width:350px;vertical-align:top">
<table border="0" cellspacing="0" cellpadding="0" style="width:350px;border-collapse:collapse">
<tbody>
<tr>
<td style="width:350px;font-size:16px;margin:0px;font-weight:bold;line-height:19.2px">
Peder Jørgensgaard Olesen</td>
</tr>
<tr>
<td style="width:350px;margin:0px;line-height:17px">PhD student<br>
Department of Civil and Mechanical Engineering</td>
</tr>
<tr>
<td style="width:350px;margin:0px;line-height:17px"> </td>
</tr>
<tr>
<td style="width:350px;line-height:17px"><a href="mailto:pjool@mek.dtu.dk" style="margin:0px;line-height:17px;color:black" id="m_-829510148838848988LPNoLP" target="_blank">pjool@mek.dtu.dk</a></td>
</tr>
<tr>
<td style="width:350px;margin:0px;line-height:17px">Koppels Allé</td>
</tr>
<tr>
<td style="width:350px;margin:0px;line-height:17px">Building 403, room 105</td>
</tr>
<tr>
<td style="width:350px;margin:0px;line-height:17px">2800 Kgs. Lyngby</td>
</tr>
<tr>
<td style="width:350px;line-height:17px"><a href="https://www.dtu.dk/english" style="margin:0px;line-height:17px;color:black" id="m_-829510148838848988LPNoLP" target="_blank">www.dtu.dk/english</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p><span style="font-size:10pt;color:rgb(117,123,128)"></span></p>
</div>
</div>
</div>
</div>
</div></blockquote></div>