[petsc-users] PETSc binary write format

Mark Adams mfadams at lbl.gov
Wed Dec 5 12:33:40 CST 2018


On Wed, Dec 5, 2018 at 1:27 PM Sajid Ali via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> I have created a file as per the specification as shown below
>
> [sajid at xrm temp]$ cat vector.dat
> 00000000000100100111101101001110
> 00000000000000000000000000010100
> 0000000000000000000000000000000000000000000000000000000000000000
> 0011111111110000000000000000000000000000000000000000000000000000
> 0100000000000000000000000000000000000000000000000000000000000000
> 0100000000001000000000000000000000000000000000000000000000000000
> 0100000000010000000000000000000000000000000000000000000000000000
> 0100000000010100000000000000000000000000000000000000000000000000
> 0100000000011000000000000000000000000000000000000000000000000000
> 0100000000011100000000000000000000000000000000000000000000000000
> 0100000000100000000000000000000000000000000000000000000000000000
> 0100000000100010000000000000000000000000000000000000000000000000
> 0100000000100100000000000000000000000000000000000000000000000000
> 0100000000100110000000000000000000000000000000000000000000000000
> 0100000000101000000000000000000000000000000000000000000000000000
> 0100000000101010000000000000000000000000000000000000000000000000
> 0100000000101100000000000000000000000000000000000000000000000000
> 0100000000101110000000000000000000000000000000000000000000000000
> 0100000000110000000000000000000000000000000000000000000000000000
> 0100000000110001000000000000000000000000000000000000000000000000
> 0100000000110010000000000000000000000000000000000000000000000000
> 0100000000110011000000000000000000000000000000000000000000000000
>
> How do I save it as binary so that petsc can understand it?
>
This is the format that PETSc can read. ex10 saves these .dat files and
then reads them in. Am I missing something?


> xxd -b takes each element as ascii 0 or 1 and converts that to binary and
> neither does petsc understand the file.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20181205/0691cb59/attachment.html>


More information about the petsc-users mailing list