matrix addition

#DOMINIC DENVER JOHN CHANDAR# DOMI0002 at ntu.edu.sg
Thu Feb 15 03:24:08 CST 2007


How about MatAXPY() ?

 
http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/
manualpages/Mat/MatAXPY.html

 Computes Y = aX + Y , where X, Y are matrices. Set a=1.


-Dominic



-----Original Message-----
From: owner-petsc-users at mcs.anl.gov
[mailto:owner-petsc-users at mcs.anl.gov] On Behalf Of Manav Bhatia
Sent: Thursday, February 15, 2007 4:57 PM
To: petsc-users at mcs.anl.gov
Subject: matrix addition

Hi,
   I need to add two matrices, but I did not find a direct function to
do so. Is there a specific reason not having a matrix addition function?
   In the absence of such a function, I am thinking of extracting each
row of the two matrices and adding them. Would there be a more efficient
way to do the same?

   Kindly help me with your advice.

Thanks,
Manav




More information about the petsc-users mailing list