[petsc-users] Product of matrix row times a vector

Smith, Barry F. bsmith at mcs.anl.gov
Thu Jan 30 15:10:21 CST 2020


  MatGetSubMatrix() and then do the product on the sub matrix then VecSum

   Barry


> On Jan 30, 2020, at 3:02 PM, Jeremy Theler <jeremy at seamplex.com> wrote:
> 
> Sorry if this is basic, but I cannot figure out how to do it in
> parallel and I'd rather not say how I do it in single-processor mode
> because I would be ashamed.
> 
> Say I have a matrix and I want to multiply a row times a vector to
> obtain a scalar. Actually I would like to choose some rows, multiply
> each of them by the vector and then add the scalars up. Or, conversely,
> sum all the rows colmunwise and then multiply the sum by a vector.
> 
> How can I do this?
> 
> 
> Regards
> --
> jeremy theler
> www.seamplex.com
> 
> 



More information about the petsc-users mailing list