On Wed, Mar 3, 2021 at 4:23 PM Smit Thijs <[email protected]> wrote:
> Hi All,
>
>
>
> I would like to readin a fairly large external vector into PETSc to be
> used further. My idea was to write a hdf5 file using Python with the vector
> data. Then read that hdf5 file into PETSc using PetscViewerHDF5Open and
> VecLoad. Is this the advised way or is there a better alternative to
> achieve the same (getting this external array data into PETSc)?
>
I think there are at least two nice ways to do this:
1) Use HDF5. Here you have to name your vector to match the HDF5 object
2) Use raw binary. This is a specific PETSc format, but it is fast and
simple.
Thanks,
Matt
> Best regards,
>
>
>
> Thijs Smit
>
>
>
> PhD Candidate
>
> ETH Zurich
>
> Institute for Biomechanics
>
>
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>