On Tue, Jun 21, 2011 at 2:45 PM, Алексей Рязанов <span dir="ltr"><<a href="mailto:amryazanov@gmail.com">amryazanov@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>Hello.</div><div><br></div><div>Help me please with my output trouble.</div><div><br></div><div>I have a solution vector X and i need it to be visualized via TecPlot 360.</div>
<div>X is a DA2D vector and PetscSnchtnizedFPrintf writes it down according to its petsc ordering, but i need the output to be arranged according to application ordering.</div><div><br></div><div>My goal is to have a file with lines of this format: "i j x(i,j)". </div>
<div>And Lines should be arranged firstly by j and secondly by i without any relation with DA processor distribution.</div><div>Actually i need to realize more complex file structure, but the problem of automaticly propperly arranged output is the main stuck point.</div>
<div><br></div><div>A combination of printf() and mpibarrier() didnt bring me luck. I need an advice.</div></blockquote><div><br></div><div>You want to use</div><div><br></div><div> <a href="http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-dev/docs/manualpages/DM/DMDAGlobalToNaturalBegin.html">http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-dev/docs/manualpages/DM/DMDAGlobalToNaturalBegin.html</a></div>
<div><br></div><div>to get a Vec with the natural ordering, and then VecView() to output it. You can postprocess that output to get whatever you want,</div><div>or use VecGetArray() and print what you like.</div><div><br>
</div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div>Thank you!!</div><div><br></div><div><span style="border-collapse:collapse;font-family:arial, sans-serif;font-size:13px"><div>
Alexey Ryazanov</div><div>______________________________________</div><div><span style="color:rgb(51, 51, 51);font-family:Arial, Helvetica, sans-serif"><font size="1">Nuclear Safety Institute of Russian Academy of Sciences </font></span></div>
</span></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div>
</blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>