[petsc-users] array and vec

Barry Smith bsmith at mcs.anl.gov
Fri Apr 16 08:25:24 CDT 2010


On Apr 16, 2010, at 8:21 AM, Jed Brown wrote:

> On Thu, 15 Apr 2010 21:17:19 +0800, "=?gb2312?B?s8LA1sa9?=" <chenleping at yahoo.cn 
> > wrote:
>> petsc teams,
>>
>> for following definitions:
>>
>> double precision u(n)
>> Vec  v
>>
>> then, how can I actualize mutual updating between u(n) and v?
>
> I'm not sure what you mean, if these are the same quantity then they
> shouldn't be stored in separate locations.  See VecGetArray:
>
>  http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Vec/VecGetArray.html

    and also http://www.ib.cnea.gov.ar/~ipc/ptpde/petsc-dir/docs/manualpages/Vec/VecCreateMPIWithArray.html 
  is an alternative approach.

    Barry

>
> Jed



More information about the petsc-users mailing list