Re: [petsc-users] A question about loading data form .h5 file

2024-08-09 Thread Barry Smith
Vectors created from a DMDA have multi-dimensional information attached to them. When the vector is saved with an HDF5 viewer, this multi-dimensional information is saved in the HDF5 file. When a vector created with a DMDA loads the HDF5 file, the multi-dimensional information is used for a

Re: [petsc-users] A question about loading data form .h5 file

2024-08-08 Thread Barry Smith
Try reading the vector back in with a vector created from the DM. > On Aug 8, 2024, at 10:46 AM, 王惊梦 wrote: > > This Message Is From an External Sender > This message came from outside your organization. > Dear Sir or Madam, > > I met a problem about loading data from hdf5 file. Attached i

[petsc-users] A question about loading data form .h5 file

2024-08-08 Thread 王惊梦
Dear Sir or Madam, I met a problem about loading data from hdf5 file. Attached is a simple test program. A introduction of the program is as follows: I create a 3d DMDA object(50*50*50), and create 2 global vectors x and y by DMDA, then I write the vector x into file test.h5. When I try to load t