[petsc-users] Questions about x-window and matlab engine in PETSc
Matthew Knepley
knepley at gmail.com
Thu Aug 30 06:20:55 CDT 2018
On Thu, Aug 30, 2018 at 4:09 AM Yingjie Wu <yjwu16 at gmail.com> 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/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180830/ebadcb0b/attachment.html>
More information about the petsc-users
mailing list