[petsc-users] Output for TecPlot

Matthew Knepley knepley at gmail.com
Tue Jun 21 09:49:14 CDT 2011


On Tue, Jun 21, 2011 at 2:45 PM, Алексей Рязанов <amryazanov at gmail.com>wrote:

> Hello.
>
> Help me please with my output trouble.
>
> I have a solution vector X and i need it to be visualized via TecPlot 360.
> 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.
>
> My goal is to have a file with lines of this format: "i   j   x(i,j)".
> And Lines should be arranged firstly by j and secondly by i without any
> relation with DA processor distribution.
> Actually i need to realize more complex file structure, but the problem of
> automaticly propperly arranged output is the main stuck point.
>
> A combination of printf() and mpibarrier() didnt bring me luck. I need an
> advice.
>

You want to use


http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-dev/docs/manualpages/DM/DMDAGlobalToNaturalBegin.html

to get a Vec with the natural ordering, and then VecView() to output it. You
can postprocess that output to get whatever you want,
or use VecGetArray() and print what you like.

   Matt


> Thank you!!
>
> Alexey Ryazanov
> ______________________________________
> Nuclear Safety Institute of Russian Academy of Sciences
>
>
>
>
>
>


-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110621/f1e78d93/attachment-0001.htm>


More information about the petsc-users mailing list