<div dir="ltr">So this actually means it somehow matches the local indecies? What i mean by that is,<div><br></div><div>y[ iy[i] ] = x[ ix[i] ].</div><div><br></div><div>Is that why ix and iy should have the same size?</div>
<div><br></div><div>Mohammad<br><br><div class="gmail_quote">On Thu, Feb 9, 2012 at 3:17 PM, Satish Balay <span dir="ltr"><<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Thu, 9 Feb 2012, Mohammad Mirzadeh wrote:<br>
<br>
> Hi guys,<br>
><br>
> I'm just wondering if I understand how the VecScatter works. Considering<br>
> (petsc 3.2-p6 manual page 53):<br>
><br>
> VecScatterCreate(Vec x,IS ix,Vec y,IS iy,VecScatter *ctx);<br>
> VecScatterBegin(VecScatter ctx,Vec x,Vec y,INSERT VALUES,SCATTER FORWARD);<br>
> VecScatterEnd(VecScatter ctx,Vec x,Vec y,INSERT VALUES,SCATTER FORWARD);<br>
> VecScatterDestroy(VecScatter *ctx);<br>
><br>
> is the following statement correct?<br>
><br>
> VecScatter looks into "ix" and "iy" index sets and `matches' the global<br>
> indecies between the two to copy data from vector "x" to vector "y". For<br>
> example, if "ix" maps local index "1" to global index "10", VecScatter<br>
> looks inside "iy" to find a local index that is mapped to global index "10"<br>
> and sends the data accordingly to the correct processor.<br>
<br>
</div></div>nope - it means - if you have x[10],y[10]:<br>
<br>
ix = {1,5,9}<br>
iy = {0,2,1}<br>
<br>
<br>
Then you get:<br>
y[0] = x[1]<br>
y[2] = x[5]<br>
y[1] = x[9]<br>
<br>
[all numbers above are global indices]<br>
<br>
Satish<br>
<br>
><br>
> Thanks,<br>
> Mohammad<br>
><br>
<br>
</blockquote></div><br></div></div>