add a smaller matrix to a larger one?

Zhifeng Sheng z.sheng at ewi.tudelft.nl
Thu Jan 17 04:20:07 CST 2008


Dear all

I have a problem, I want to add a small matrix to a larger matrix, where 
the row and column indexes of the small matrix is mapped to global 
indexes of the global one.

the problem comes from a kind of finite element method, however, I have 
to do some operations on the small matrix, and it prevent me from 
directly assembling the local entries. So I have local matrices and I 
would like to add it to the global one. At this moment, I have to get 
the matrix value and add it to the global matrix  one by one ...

is there a better way to do it?

Thanks

Best regards
Zhifeng





More information about the petsc-users mailing list