[petsc-users] How to view petsc array?

Wee Beng Tay zonexo at gmail.com
Wed Aug 19 11:06:59 CDT 2015


Hi,

So I can use PetscScalar view directly to view the u_array?



Sent using CloudMagic 
[https://cloudmagic.com/k/d/mailapp?ct=pa&cv=7.2.7&pv=5.0.2]


On Wed, Aug 19, 2015 at 10:41 PM, Satish Balay < balay at mcs.anl.gov 
[balay at mcs.anl.gov] > wrote:
check PetscScalarView()

Satish

On Tue, 21 Jul 2015, TAY wee-beng wrote:

 > Hi,
 >
 > I need to check the contents of the array which was declared using:
 >
 > PetscScalar,pointer ::
 > u_array(:,:,:),v_array(:,:,:),w_array(:,:,:),p_array(:,:,:)
 >
 > I tried to use :
 >
 > call PetscViewerASCIIOpen(MPI_COMM_WORLD,"pres.txt",viewer,ierr)
 >
 > call VecView(p_array,viewer,ierr)
 >
 > or
 >
 > call MatView(p_array,viewer,ierr)
 >
 > call PetscViewerDestroy(viewer,ierr)
 >
 > but I got segmentation error. So is there a PETSc routine I can use?
 >
 >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150820/9e7e9177/attachment.html>


More information about the petsc-users mailing list