<div dir="ltr"><span style="font-size:12.8px">Dear all,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I am working on a program in Petsc that will read a vector and matrix from an ASCII file and store it into a vector and matrix object in Petsc so I can eventually solve. It needs to be an ASCII file because I will be outputting the vector and matrix to an ASCII file from code in Delphi.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I am starting out trying to accomplish printing a vector to an ASCII file and then reading the vector back into Petsc by reading from the ASCII file.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I was able to successfully print a vector to an ASCII file using the following code:</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">PetscViewerASCIIOpen(PETSC_<wbr>COMM_WORLD, "RyansVector.output", &viewer);</div><div style="font-size:12.8px">VecView(u, viewer);</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Where "PETSC_COMM_WORLD" is the MPI communicator, "RyansVector.output" is the name of the ASCII file, and "viewer" is the name of the PetscViewer to use with the specified file.</div><div style="font-size:12.8px">Also "u" is a vector object in Petsc.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">However, now when I want to read from an ASCII file and store the values into a vector I cannot seem to accomplish this. Looking around online I cannot find any evidence that it is possible to read from an ASCII file to produce a vector object in Petsc.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Is it only possible to read into Petsc objects with Binary and HDF5 file types?</div><div style="font-size:12.8px">Is it possible to use VecLoad when reading? If so, how? I was not able to get VecLoad to work.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thank you so much!</div><div style="font-size:12.8px">Ryan Morley</div></div>