Discussion:
[petsc-users] Question - read text file
Marcelo Xavier Guterres
2015-10-23 19:21:44 UTC
Permalink
Dear friends,

I need to read a matrix from a text file (txt).

This matrix has a high dimension (2000 X 2000) .

Example: date.txt - provision in the text file:

1 2 3 5
5 5 7 8
5 6 8 9


What's the proper way to perform the action?

thanks for help


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- --
Marcelo Xavier Guterres
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -
Matthew Knepley
2015-10-27 17:32:31 UTC
Permalink
On Fri, Oct 23, 2015 at 2:21 PM, Marcelo Xavier Guterres <
Post by Marcelo Xavier Guterres
Dear friends,
I need to read a matrix from a text file (txt).
This matrix has a high dimension (2000 X 2000) .
1 2 3 5
5 5 7 8
5 6 8 9
What's the proper way to perform the action?
Read each row in and call MatSetValues() for that row.

Thanks,

Matt
Post by Marcelo Xavier Guterres
thanks for help
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- --
Marcelo Xavier Guterres
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- -
--
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
Loading...