<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>