Fwd: mixed matrix type?

Sean Dettrick sdettrick at gmail.com
Wed May 21 11:21:43 CDT 2008


I should have also mentioned that the matrix is symmetric.

Thanks,
Sean



Begin forwarded message:

> From: Sean Dettrick <sdettrick at gmail.com>
> Date: May 21, 2008 9:14:41 AM PDT
> To: petsc-users at mcs.anl.gov
> Subject: mixed matrix type?
>
> Hi,
>
> I have a sparse N*N matrix generated from a DA and a 5 point  
> stencil, with a total of approx 5*N non-zero entries.  Now I would  
> like to extend this matrix by adding a smaller M*M dense matrix to  
> the bottom right hand side, i.e. so that there is a dense square in  
> the bottom right hand corner of the otherwise sparse matrix.  The  
> total number of new non-zero entries, M*M, is comparable to the  
> total number of old entries, 5*N.  On top of this, there would be a  
> small number of non-zero entries in the new upper-right and lower- 
> left rectangular portions of the matrix, due to coupling of the two  
> systems.  The new total matrix size (including zeroes) would be (N 
> +M)*(N+M).
>
> Can anybody recommend a Mat type to store the new matrix?
>
> One possibility I was thinking of was to establish the original  
> sparse Mat with a DA in a sub-communicator (with half the CPUs), and  
> get the ownership range with MatGetOwnershipRange.  Then in the  
> petsc_comm_world communicator, the complete matrix could be  
> constructed (by element-wise copying the old one I suppose), and the  
> ownership range could be maintained manually.
>
> Does this sound like a reasonable strategy?
>
> I would very much appreciate any suggestions or advice.
>
> Thanks,
>
> Sean Dettrick

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20080521/d519d3c7/attachment.htm>


More information about the petsc-users mailing list