You get the local piece.<div><br></div><div> Matt<br><br><div class="gmail_quote">On Mon, Feb 15, 2010 at 9:44 AM, John-Michael Fischer <span dir="ltr"><<a href="mailto:fischej@umich.edu">fischej@umich.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">On the documentation page for MatGetArray() it says the result is, understandably, dependent on matrix structure.<br>
My question is if I'm using an MPI Mat then will MatGetArray get the local array on each proc, or will it assemble the whole array?<br>
<br>
Thank you,<br>
John-Michael Fischer<br>
<br>
On Feb 11, 2010, at 2:36 PM, Barry Smith wrote:<br>
<br>
><br>
> If you "know" that the two matrices have the same nonzero pattern you can do this efficiently with a call to MatGetArray() on each matrix.<br>
><br>
> Barry<br>
><br>
> On Feb 11, 2010, at 10:06 AM, Matthew Knepley wrote:<br>
><br>
>> On Thu, Feb 11, 2010 at 10:01 AM, John-Michael Fischer <<a href="mailto:fischej@umich.edu">fischej@umich.edu</a>> wrote:<br>
>> This seems like a silly question, but is there a reason I cannot find a function for MatrixElementWiseDivide that would accept two matricies, M1 and M2 and perform element wise division?<br>
>><br>
>> I can go through the process of getting local rows on each proc, doing the element by element division, etc... but it just seems like a perfect candidate for a built-in.<br>
>><br>
>> We do not have any Mat element-wise functions, since with sparse matrices this might<br>
>> be ill-defined with different non-zero patterns, as well as slow since the result might have<br>
>> a third nonzero pattern.<br>
>><br>
>> Matt<br>
>><br>
>> Thanks<br>
>> John-Michael Fischer<br>
>> University of Michigan<br>
>> Nuclear Engineering and Radiological Sciences<br>
>><br>
>><br>
>><br>
>> --<br>
>> 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<br>
><br>
><br>
><br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>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<br>
</div>