[petsc-users] addition of two matrices

Umut Tabak u.tabak at tudelft.nl
Sat May 15 08:00:07 CDT 2010


Dear all,

How can I add two matrices? More openly, I have an expression

A^T * M* A  + B^T *K*B

I find M*A and K*B with MatMatMult then form the 1st and 2nd expression 
with MatMatMultTranspose and I would like to add the two eventually. I 
could not find a function in the documentation, maybe missed.

Any help is appreciated.

Umut


More information about the petsc-users mailing list