[petsc-users] Printing parallel Vector in VTK format

khalid ashraf khalid_eee at yahoo.com
Thu Nov 25 23:36:08 CST 2010


Thanks Barry. I get the correct output when I use 
VecView(w,PETSC_VIEWER_STDOUT_WORLD)

But if I use the VecView_VTK function from the file
ksp/ksp/examples/tutorials/ex29.c

then I get different results.

For the code:
if (i<m/2) vec=0.001 else vec=-0.001;

Output with VecView:     0.001 for half of the grid
                                    -0.001 for rest half of the grid
Output with VecView_VTK:
                                 0.001 for the full grid.


Date: Thu, 25 Nov 2010 02:24:52 -0800 (PST)
From: khalid ashraf <khalid_eee at yahoo.com>
Subject: [petsc-users] DAGetCorners; xs,ys,zs return 0 for all the
    processors
To: petsc-users at mcs.anl.gov
Message-ID: <588844.78157.qm at web112619.mail.gq1.yahoo.com>
Content-Type: text/plain; charset="us-ascii"

Here is the call to DA creation:

ierr = 
DACreate3d(PETSC_COMM_WORLD,DA_NONPERIODIC,DA_STENCIL_BOX,appctx.l,appctx.m,appctx.n,


                  
PETSC_DECIDE,PETSC_DECIDE,PETSC_DECIDE,1,1,PETSC_NULL,PETSC_NULL,PETSC_NULL,
                    &appctx.da);CHKERRQ(ierr);

Khalid


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20101125/d0590ec8/attachment-0001.htm>


------------------------------

Message: 2
Date: Thu, 25 Nov 2010 11:35:43 +0100
From: Jed Brown <jed at 59A2.org>
Subject: Re: [petsc-users] DAGetCorners;    xs,ys,zs return 0 for all the
    processors
To: PETSc users list <petsc-users at mcs.anl.gov>
Message-ID:
    <AANLkTineq3bTG=iRsjkdoY2ZhZ9ac7r8vBmSUqEpOvu5 at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

On Thu, Nov 25, 2010 at 11:24, khalid ashraf <khalid_eee at yahoo.com> wrote:

> Here is the call to DA creation:
>
> ierr =
>DACreate3d(PETSC_COMM_WORLD,DA_NONPERIODIC,DA_STENCIL_BOX,appctx.l,appctx.m,appctx.n,
>,
>
>  PETSC_DECIDE,PETSC_DECIDE,PETSC_DECIDE,1,1,PETSC_NULL,PETSC_NULL,PETSC_NULL,
>                     &appctx.da);CHKERRQ(ierr);
>

If you created the DA as above and then call

  DAGetCorners(appctx.da,&xs,&ys,&zs,&xm,&ym,&zm);

then only on rank=0 will xs,ys,zs all be equal to zero.  Your other message
about PETSc versus natural ordering indicates that this is working
correctly.  Is it working now?  If not, please send more context, including
whatever code you are using to print output.

Jed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20101125/6da538a3/attachment-0001.htm>


------------------------------

_______________________________________________
petsc-users mailing list
petsc-users at mcs.anl.gov
https://lists.mcs.anl.gov/mailman/listinfo/petsc-users


End of petsc-users Digest, Vol 23, Issue 28
*******************************************



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20101125/d2817c38/attachment.htm>


More information about the petsc-users mailing list