<div class="gmail_quote">2011/3/21 Barry Smith <span dir="ltr">&lt;<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On Mar 21, 2011, at 10:14 AM, Alejandro Marcos Aragón wrote:<br>
<br>
&gt; Hi Barry,<br>
&gt;<br>
&gt; Thanks for your answer. I&#39;ll look into those functions, but instead of copying, do you know if there is a way to give the address of the arrays?<br>
<br>
</div>MatCreateSeqAIJWithArrays() will not copy the arrays but just use them. In parallel MatCreateMPIAIJWithSplitArrays() will not copy the arrays, just use them but you need to have the correct format for the arrays (in parallel we use a &quot;non-standard&quot; parallel compressed sparse row format that likely you don&#39;t use but check the manual page <a href="http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-3.0.0/docs/manualpages/Mat/MatCreateMPIAIJWithSplitArrays.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-3.0.0/docs/manualpages/Mat/MatCreateMPIAIJWithSplitArrays.html</a></blockquote>
<div><br></div><div>There is slightly more info in the more recent man page</div><div><br></div><div><a href="http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-dev/docs/manualpages/Mat/MatCreateMPIAIJWithSplitArrays.html">http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-dev/docs/manualpages/Mat/MatCreateMPIAIJWithSplitArrays.html</a></div>
</div>