question about VecLoad (pls disregard previous one)
tsjb00
tsjb00 at hotmail.com
Thu May 15 12:09:37 CDT 2008
Many thanks for the reply! This seems to work.
----------------------------------------
> Date: Thu, 15 May 2008 13:38:19 -0300
> From: dalcinl at gmail.com
> To: petsc-users at mcs.anl.gov
> Subject: Re: question about VecLoad (pls disregard previous one)
>
> Have you give a look to VecLoadIntoVector() ? For use it, you have to
> previously create the vector with the desired distribution (or get it
> from DA's), and then the values will be read and used to fill your
> vector... Of couse, you have to get shure that the ordering of indices
> is the same (and I believe it should be the 'natural' DA ordering),
> this is specially important if you run your problem with different
> number of processes.
>
> On 5/15/08, tsjb00 wrote:
>>
>> Many thanks to all for the reply!
>>
>> I use the code:
>> PetscViewerBinaryOpen(PETSC_COMM_WORLD,"out.dat",FILE_MODE_READ,viewer);
>> VecLoad(viewer,VECMPI,&v1);
>> to get the vector storing values of var.
>>
>> My problem is, it seems that the vector global is evenly distributed over processors; while in my program, a DA is defined and according to DA global vectors are not distributed the same way. Would anybody please tell me how to deal with that?
>>
>> Thanks in advance!
>>
>>
>> JB
>>
>> _________________________________________________________________
>> MSN 中文网,最新时尚生活资讯,白领聚集门户。
>> http://cn.msn.com
>>
>>
>
>
> --
> Lisandro Dalcín
> ---------------
> Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
> Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
> Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
> PTLC - Güemes 3450, (3000) Santa Fe, Argentina
> Tel/Fax: +54-(0)342-451.1594
>
_________________________________________________________________
新年换新颜,快来妆扮自己的MSN给心仪的TA一个惊喜!
http://im.live.cn/emoticons/?ID=18
More information about the petsc-users
mailing list