[petsc-users] How subdomain talks to neighbors?

Barry Smith bsmith at mcs.anl.gov
Wed Mar 10 11:36:31 CST 2010


On Mar 10, 2010, at 10:43 AM, (Rebecca) Xuefei YUAN wrote:

> Dear all,
>
> I have a question about how subdomains "talk" to neighbor subdomains.
>
> For example, I have a 6X5 mesh, the solution at each mesh f[j][i] is  
> given
>
> 	for (j = jFirst; j <= jLast; j++){
> 		for (i = iFirst; i <= iLast; i++){
> 			f[j][i] = i+j*info.mx;
> 		}
> 	}
> i.e.,
> 0   1  2  3  4  5
> 6   7  8  9 10 11
> 12 13 14 15 16 17
> 18 19 20 21 22 23
> 24 25 26 27 28 29
>
> When I read this solution (binary file) as an input of another set  
> of code with np=2, the array gives me
>
> rank=0: xs=0,x=3,ys=0,y=5
>
> 0   1  2  3  4  5
> 3   4  5  6  7  8
> 6   7  8  9 10 11
> 9  10 11 12 13 14
> 12 13 14  X  X  X

    This process has 3*5 = 15 locations in its part of the global  
array. All the entries are filled (the final entry with a 14). There  
are no X X X at the end.

>
> rank=1: xs=3,x=3,ys=0,y=5
>
> X   X  X 15 16 17
> 15 16 17 18 19 20
> 18 19 20 21 22 23
> 21 22 23 24 25 26
> 24 25 26 27 28 29

     Similarly here their are 15 slots and they are all filled up.  
There are no XXX

>
> or np=3 gives
>
> rank=0: xs=0,x=2,ys=0,y=5
>
> 0   1  2  3  4  5
> 2   3  4  5  6  7
> 4   5  6  7  8  9
> 6   7  8  9  X  X
> 8   9  X  X  X  X
>
> rank=1: xs=2,x=2,ys=0,y=5
>
> X   X 10 11 12 13
> 10 11 12 13 14 15
> 12 13 14 15 16 17
> 14 15 16 17 18 19
> 16 17 18 19  X  X
>
> rank=2: xs=4,x=2,ys=0,y=5
>
> X   X  X  X 20 21
> X   X 20 21 22 23
> 20 21 22 23 24 25
> 22 23 24 25 26 27
> 24 25 26 27 28 29
>
> , where X means this location is not visited. Still I do not know  
> how subdomains talk to each other. Any references on how to  
> understand those communication between subdomains?
>
> Thanks a lot!
>
> Rebecca
>
>
>
>
>
>
>



More information about the petsc-users mailing list