[petsc-users] MatElemDiv
Matthew Knepley
knepley at gmail.com
Mon Feb 15 16:36:39 CST 2010
You get the local piece.
Matt
On Mon, Feb 15, 2010 at 9:44 AM, John-Michael Fischer <fischej at umich.edu>wrote:
> On the documentation page for MatGetArray() it says the result is,
> understandably, dependent on matrix structure.
> 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?
>
> Thank you,
> John-Michael Fischer
>
> On Feb 11, 2010, at 2:36 PM, Barry Smith wrote:
>
> >
> > 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.
> >
> > Barry
> >
> > On Feb 11, 2010, at 10:06 AM, Matthew Knepley wrote:
> >
> >> On Thu, Feb 11, 2010 at 10:01 AM, John-Michael Fischer <
> fischej at umich.edu> wrote:
> >> 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?
> >>
> >> 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.
> >>
> >> We do not have any Mat element-wise functions, since with sparse
> matrices this might
> >> be ill-defined with different non-zero patterns, as well as slow since
> the result might have
> >> a third nonzero pattern.
> >>
> >> Matt
> >>
> >> Thanks
> >> John-Michael Fischer
> >> University of Michigan
> >> Nuclear Engineering and Radiological Sciences
> >>
> >>
> >>
> >> --
> >> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> >> -- Norbert Wiener
> >
> >
> >
>
>
--
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20100215/f9c0aca7/attachment.htm>
More information about the petsc-users
mailing list