[petsc-users] Does PETSc have some functions like A.*B, A./B in Matlab?

Yujie recrusader at gmail.com
Sun Feb 21 14:44:55 CST 2010

I need do it for many. Actually, we don't consider a vector. Generally, if A
is dense matrix (nonzero entries) and B is sparse matrix, MatGetRow()
doesn't work when doing A.*B or A./B directly, right?
Thanks a lot.


On Sun, Feb 21, 2010 at 2:41 PM, Jed Brown <jed at 59a2.org> wrote:

> On Sun, 21 Feb 2010 14:33:23 -0600, Yujie <recrusader at gmail.com> wrote:
> > Thanks very much, Jed.
> > I have a vector (V) and a matrix (A),
> > I want to do Row_i_A.*V or Row_i_A./V (Row_i_A are the rows of A).
> However,
> > V has different format with the rows of A.
> You need to do this for a small number of rows (values of i), or for
> many?  Since vectors are dense, and since MatGetValues only provides the
> local part, this is not scalable.
> What is the problem you are trying to solve with this algebraic
> manipulation?  There is probably a scalable way to formulate the
> higher-level objective to avoid these shenanigans.
> Jed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20100221/f099979b/attachment.htm>

More information about the petsc-users mailing list