[petsc-users] Load a Sparse Matrix from a MAT file in PETSC

Matthew Knepley knepley at gmail.com
Fri Jun 10 12:57:02 CDT 2022


On Fri, Jun 10, 2022 at 1:15 PM NILTON SANTOS VALDIVIA <
100442268 at alumnos.uc3m.es> wrote:

> Hello,
>
> I was trying to load a sparse matrix from a .MAT file  (and solve the
> linear system). But even though, I have extracted  the A and b matrix and
> vector from this suite *https://sparse.tamu.edu/FEMLAB/waveguide3D
> <https://sparse.tamu.edu/FEMLAB/waveguide3D>* and saved the variables
> (A, b) in a MAT file as PETSC recommends, I couldn't be able to load the
> matrix. Is there something that I was doing wrong? or do you know a way to
> load a matrix  from the above link?
>
> Actually I was using src/ksp/ksp/tutorials/ex10.c.html
> <https://petsc.org/main/src/ksp/ksp/tutorials/ex10.c.html> example to try
> to load a .MAT file (containing A and b) without success.
>

Do you want to load a Matrix Market format matrix and vector? If so, this
is what https://petsc.org/main/src/mat/tests/ex72.c.html does.

  Thanks,

     Matt


>
> Best Regards,
>
> NILTON SANTOS
>
>

-- 
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/20220610/293d061a/attachment.html>


More information about the petsc-users mailing list