I am sorry, but I am not yet clear on how to do this. I read ex32.c and ex72.c but I am still confused. What is ASCII 'slap' format? How should matrix be supplied to PETSc? <br><br>My matrix is a 2000x1900 matrix given in the format MATLAB stores sparse matrices. i.e [row, column, non-zero-entry] format.<br>
<br><br><br><div class="gmail_quote">On Tue, Dec 21, 2010 at 11:03 PM, Gaurish Telang <span dir="ltr"><<a href="mailto:gaurish108@gmail.com">gaurish108@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<span style="display: block; padding-left: 6em;"><span>i have this large text file containing a matrix. <br></span></span><div><span style="display: block; float: left; color: rgb(136, 136, 136);"> </span><span style="display: block; padding-left: 6em;"><span>This text file contains the non-zero entries of a very large sparse matrix</span></span></div>
<div><span style="display: block; float: left; color: rgb(136, 136, 136);"> </span><span style="display: block; padding-left: 6em;"><span><br>The first two columns indicate the position of the non-zero entry</span></span></div>
<div><span style="display: block; float: left; color: rgb(136, 136, 136);"> </span><span style="display: block; padding-left: 6em;"><span>and the last column the actual non-zero value it self</span></span></div><div><span style="display: block; float: left; color: rgb(136, 136, 136);"> </span><span style="display: block; padding-left: 6em;"><span><br>
for <br></span></span></div><div><span style="display: block; float: left; color: rgb(136, 136, 136);"></span><span style="display: block; padding-left: 6em;"><span>example the matrix <br></span></span></div><div><span style="display: block; float: left; color: rgb(136, 136, 136);"> </span><span style="display: block; padding-left: 6em;"><span>1 0 8</span></span></div>
<div><span style="display: block; float: left; color: rgb(136, 136, 136);"> </span><span style="display: block; padding-left: 6em;"><span>0 0 5</span></span></div><div><span style="display: block; float: left; color: rgb(136, 136, 136);"> </span><span style="display: block; padding-left: 6em;"><span>6 0 0</span></span></div>
<div><span style="display: block; float: left; color: rgb(136, 136, 136);"> </span><span style="display: block; padding-left: 6em;"><span>is written in the text file in the form of</span></span></div><div><span style="display: block; float: left; color: rgb(136, 136, 136);"> </span><span style="display: block; padding-left: 6em;"><span>1 1 1</span></span></div>
<div><span style="display: block; float: left; color: rgb(136, 136, 136);"> </span><span style="display: block; padding-left: 6em;"><span>1 3 8</span></span></div><div><span style="display: block; float: left; color: rgb(136, 136, 136);"> </span><span style="display: block; padding-left: 6em;"><span>2 3 5</span></span></div>
<div><span style="display: block; float: left; color: rgb(136, 136, 136);"> </span><span style="display: block; padding-left: 6em;"><span>3 1 6<br><br>This is the standard [(row ,column), non-zero] entry format. </span></span><span style="display: block; float: left; color: rgb(136, 136, 136);"></span><span style="display: block; padding-left: 6em;"><span>i want PETSc to load this matrix</span></span></div>
<div><span style="display: block; float: left; color: rgb(136, 136, 136);"> </span><span style="display: block; padding-left: 6em;"><span>from the text file</span></span></div><div><span style="display: block; float: left; color: rgb(136, 136, 136);"> </span><span style="display: block; padding-left: 6em;"><span>i am not sure how</span></span></div>
<div><span style="display: block; float: left; color: rgb(136, 136, 136);"> </span><span style="display: block; padding-left: 6em;"><span>to do that. What commands do I use? <br><br>I am new to PETSc, so some detail in the explanation will be really helpful.<br>
<br>Sincere thanks,<br><br>Gaurish. <br></span></span></div>
</blockquote></div><br>