[petsc-users] Multiplying a row-vector to each row in a dense matrix, sliced or full
Roland Richter
roland.richter at ntnu.no
Tue Dec 8 12:13:07 CST 2020
Hei,
I would like to multiply a row-vector to each row in a dense matrix,
either full or sliced (i.e. if the row-vector is larger than the row
length of the matrix). Armadillo offers a each_row()-function, where I
can iterate over all rows in a matrix and multiply the vector to them
(similar to the operation VecPointwiseMult()). Is there a similar
operation in PETSc? Ideally with the option of only multiplying a
part/slice of the row vector to each row, if the corresponding row of
the target matrix is shorter than the initial row vector.
Thanks,
Roland
More information about the petsc-users
mailing list