[petsc-users] VecScatter in 'add' mode?

Hui Zhang mike.hui.zhang at hotmail.com
Wed Sep 28 11:22:53 CDT 2011


On Sep 28, 2011, at 6:16 PM, Matthew Knepley wrote:

> On Wed, Sep 28, 2011 at 4:15 PM, Hui Zhang <mike.hui.zhang at hotmail.com> wrote:
> 
> On Sep 28, 2011, at 6:08 PM, Matthew Knepley wrote:
> 
>> On Wed, Sep 28, 2011 at 4:05 PM, Hui Zhang <mike.hui.zhang at hotmail.com> wrote:
>> 
>> On Sep 28, 2011, at 5:58 PM, Matthew Knepley wrote:
>> 
>>> On Wed, Sep 28, 2011 at 3:54 PM, Hui Zhang <mike.hui.zhang at hotmail.com> wrote:
>>> Hi all,
>>> When using
>>> PetscErrorCode  VecScatterCreate(Vec xin,IS ix,Vec yin,IS iy,VecScatter *newctx)
>>> I want to add those values of xin to the original values of yin.
>>> Is there a way to do this without copy of yin?
>>> I am not sure what you mean here. Do you want xin == yin?
>> 
>> No, I mean part of xin is going to be added to part of yin.
>> 
>> Alright. We do not make a copy of yin.
> 
> My fault, the question is not clear. I mean 'add' as 'sum'. I want the resultant 'yin' to have values 
> y(iy) = y(iy) + x(ix).
> 
> Use ADD_VALUES in VecScatterBegin/End()

Yes, thank you! I should read the manual more carefully.


> 
>    Matt
>  
>>    Matt
>> 
>>  
>>>   Matt
>>>  
>>> Thanks!
>>> Hui
>>> -- 
>>> 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
>> 
>> 
>> 
>> 
>> -- 
>> 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
> 
> 
> 
> 
> -- 
> 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/20110928/73e9ac9f/attachment.htm>


More information about the petsc-users mailing list