On Thu, Aug 30, 2018 at 4:09 AM Yingjie Wu <[email protected]> wrote: > Dear PETSc developer, > Hi, > Thank you very much for helping me solve the problem before. Recently, I > reinstalled my system and reinstalled PETSc and found the following > problems: > > 1. when I ran the example src/vec/vec/example/tutorial/ex3, there was a > error: > [0] PETSC ERROR: PETSc installed without X windows, Microsoft Graphics, > OpenGL ES, or GLUT / OpenGL on this machine > I installed PETSc following the official website. I don't know how to > solve this error. >
If you want that support, you have to install one of those toolkits on your machine and then reconfigure PETSc. > 2. I want to use matlab to do input and output data. My data is mainly the > information of model parameters and initial values in each grid, which is > usually stored in the form of matrix or vector. In src / vec / vec / > example / tutorial / ex5, the input and output data in the binary file. > dat, but I don't know how to open it for subsequent analysis. I want to > input or output data to PETSc in the form of matrix and vector in MATLAB. I > don't know how to use MATLAB as the input and output interface. It would be > better if there were examples. > The easiest way to get Matlab vectors and matrices into PETSc is to use the Matlab modules in PETSc: https://bitbucket.org/petsc/petsc/src/master/share/petsc/matlab/ which allow you to read and write PETSc binary format, like PetscBinaryWrite.m. Then you just use VecLoad() and MatLoad() with a binary viewer. > 3. Is there a web page that can query the usage of PETSc function? For > example, > Http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Viewer/PetscViewerBinaryOpen.html > > For beginners like me, a web page that queries how functions are used is > very useful. > I am not sure what the question means. The manual page you are referencing is exactly what we recommend looking at. Thanks, Matt > Thanks, > Yingjie > -- 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/>
