[petsc-users] A good way of dealing data

Barry Smith bsmith at mcs.anl.gov
Tue Apr 27 15:01:21 CDT 2010


On Apr 27, 2010, at 4:44 AM, (Rebecca) Xuefei YUAN wrote:

> Dear all,
>
> If I save my data file as a binary file from Petsc,i.e.,
>
> ierr =  
> PetscViewerBinaryOpen 
> (PETSC_COMM_WORLD,fileName,FILE_MODE_WRITE,&viewer);CHKERRQ(ierr);
>
> How could I deal(get access to) with my data with a c/c++ code?

    It you want to access it directly from C/C++ without a PETSc code  
then you can read the manual page for VecLoad() and MatLoad() for  
exact details of the file format.

    Barry

>
> Any examples on it?
>
> Thanks very much!
>
> Rebecca
>
>
>
>
> -- 
> (Rebecca) Xuefei YUAN
> Department of Applied Physics and Applied Mathematics
> Columbia University
> Tel:917-399-8032
> www.columbia.edu/~xy2102
>



More information about the petsc-users mailing list