[petsc-users] Sum of the absolute values of each row's components

Salazar De Troya, Miguel salazardetro1 at llnl.gov
Mon May 24 20:08:17 CDT 2021


Hello,

I am simply interested in obtaining a vector with x_i = \sum_j | A_{i, j} | for each row “i” in the matrix A. I found MatGetColumnNorms(), but no row version. I am wondering if it is more efficient to calculate the transpose A^T and then MatGetColumnNorms() or maybe iterate through each row with MatGetRow() and calculate \sum_j | A_{i, j} | by hand by myself.

Thanks
Miguel

Miguel A. Salazar de Troya
Postdoctoral Researcher, Lawrence Livermore National Laboratory
B141
Rm: 1085-5
Ph: 1(925) 422-6411
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210525/dbe58185/attachment.html>


More information about the petsc-users mailing list