question about VecLoad (pls disregard previous one)

Lisandro Dalcin dalcinl at gmail.com
Thu May 15 11:38:19 CDT 2008


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 <tsjb00 at hotmail.com> 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




More information about the petsc-users mailing list