[petsc-users] VecLoad into a SubVector ?

Sajid Ali sajidsyed2021 at u.northwestern.edu
Mon Jul 27 17:07:17 CDT 2020


Hi PETSc-developers,

When I load data (using VecLoad) into a subvector, the parent vector does
not seem to get the data after the subvector is restored. I tried doing a
VecSet to verify that the index set (used to select the subvector) is valid
and the values set by VecSet are transferred back to the parent vector.
Could anyone point out if I'm missing something when I try transferring the
data via a VecLoad from a subvector to the parent vector ?

I'm attaching the code for selecting the subvector and loading data along
with a test hdf5 file (filled with random values). I expect the output
`testload.h5` to be a vector of size 100 with the first 50 being 1 and the
rest being the input values.

Thank You,
Sajid Ali | PhD Candidate
Applied Physics
Northwestern University
s-sajid-ali.github.io
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200727/b678bc8f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testinput.h5
Type: application/octet-stream
Size: 2448 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200727/b678bc8f/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex2.c
Type: application/octet-stream
Size: 2377 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200727/b678bc8f/attachment-0001.obj>


More information about the petsc-users mailing list