[petsc-users] set a Vec as row or column of a Mat
Shriram Srinivasan
shriram at ualberta.ca
Sun Jun 1 18:00:26 CDT 2014
Hi,
I have a petsc Vec object ( say length 3). I want to use its entries as
the column of a Petsc Mat (say 3x3).
Is there an obvious way to do this ?
I could only think of first copying the entries of the Vec into an
array with VecGetValues, and then use it to set the values of the column
of the Mat.
In case it is relevant, I am doing a sweep of a direction splitting
method over a square, and I want to store the solution (vector) of each
one dimensional problem in a Mat.
Thanks,
Shriram
More information about the petsc-users
mailing list