[petsc-users] petsc vector management for monte carlo

Jed Brown jedbrown at mcs.anl.gov
Sun Dec 1 23:08:46 CST 2013


Gideon Simpson <gideon.simpson at gmail.com> writes:

> A yes, you're right, it really just formats things as though it's a .m file to be executed.
>
> By the way, I can't seem to find any documentation about how, after doing:
>
> PetscViewerBinaryOpen(PETSC_COMM_WORLD,"sim_data.bin", FILE_MODE_WRITE, &output_viewer);
>   VecView(sim_data,output_viewer);
>   PetscViewerDestroy(&output_viewer);
>
>
> how to load the "sim_data.bin" in matlab.

Add $PETSC_DIR/bin/matlab to your MATLAB path and run

x = PetscBinaryRead('sim_data.bin');



And yes, I see that chapter of the user's manual definitely gives the
wrong idea.  Will fix it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131201/80941c4f/attachment.pgp>


More information about the petsc-users mailing list