[petsc-users] How to view petsc array?
Dave May
dave.mayhem23 at gmail.com
Wed Aug 19 04:57:55 CDT 2015
>
> MPI_Comm comm;
> PetscMPIInt rank;
> char filename[PETSC_MAX_PATH_LEN];
>
> ierr = MPI_Comm_rank(PETSC_COMM_WORLD,&rank);CHKERRQ(ierr);
> ierr =
> PetscSNPrintf(filename,PETSC_MAX_PATH_LEN-1,"u-%d.txt",rank);CHKERRQ(ierr);
> ierr = PetscObjectGetComm(((PetscObject)u_local,&comm);CHKERRQ(ierr);
> ierr = PetscViewerASCIIOpen(comm,filename,viewer);CHKERRQ(ierr);
>
The last line should be
ierr = PetscViewerASCIIOpen(comm,filename,*&viewer*);CHKERRQ(ierr);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150819/784e8f88/attachment.html>
More information about the petsc-users
mailing list