[petsc-users] Irregular Matrix Partitioning problem

Matthew Knepley knepley at gmail.com
Wed Jun 11 11:51:06 CDT 2014


On Wed, Jun 11, 2014 at 11:44 AM, Brian Yang <jyang29 at uh.edu> wrote:

> Hi all,
>
> To solve a linear system, Ax=b, I am trying to solve a irregular matrix
> partitioning problem.
>
> For example, I want to create a parallel sparse matrix A, which is a
> square and 1000*1000.
>
> Due to the requirements of the problem, for the first and last 100 rows, I
> just want to put 1.0 in the main diagonal.
>
> For the middle 800 rows, I will set other values around the main diagonal.
> So what I want to do is that first and last computing node take care of the
> first and last 100 rows and other nodes distribute the work in between.
>
> Is there any specific way to achieve this considering it's a parallel
> matrix? If yes, should I also be care of the method to create the related
> parallel vector?
>

You are completely in charge of matrix partitioning when you call

  MatSetSizes()

which sets the local and global sizes. Does this make sense?

  Thanks,

     Matt


> Thanks.
>
> Brian
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140611/d8fe85b1/attachment.html>


More information about the petsc-users mailing list