[petsc-users] Does PETSc have some functions like A.*B, A./B in Matlab?
Jed Brown
jed at 59a2.org
Sun Feb 21 14:41:57 CST 2010
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
More information about the petsc-users
mailing list