[petsc-users] binary writing to tecplot
TAY wee-beng
zonexo at gmail.com
Mon Nov 28 07:54:32 CST 2011
Hi Benjamin,
I am also outputting tecplot files from my Fortran CFD code.
I am using mtd 1 and 2. For mtd 1, I copied data from other procs to the
root, and the root write the full data output using tecdat112. As you
mentioned, it takes more time.
For mtd 2, I write the data from each procs as a separate file. Then in
tecplot, load multiple files together to get the full view and data. Or
you can combine the files 1st using in command prompt or linux:
tec360 -b "1.plt" "2.plt" -p cat_datasets.mcr
where cat_datasets.mcr is:
!#!MC 1200
!$!WRITEDATASET "final.plt"
The above is obtained from http://www.tecplottalk.com/
This mtd is supposed to be much better than the 1st. However, during
visualization, you'll see the edges of each data file. In 2D, you can
just turn off the "edges" option but in 3D, due to the arrangement of
the data, it's much more difficult.
Supposed your data is i=1,10, j=1,10 and it's separated in 2 procs:
1. i=1,10, j=1,5
2. i=1,10, j=6,10.
If mtd 2 is used, both regions 'll be represented as i=1,10, j=1,5 in
tecplot, which explains the problem earlier.
If someone knows how to change both regions to j=1,5 and j=6,10, it'll
be much better.
Hope that helps.
Yours sincerely,
TAY wee-beng
On 22/11/2011 11:40 AM, Benjamin Sanderse wrote:
> Hello all,
>
> I am trying to output parallel data in binary format that can be read by Tecplot. For this I use the TecIO library from Tecplot, which provide a set of Fortran/C subroutines. With these subroutines it is easy to write binary files that can be read by Tecplot, but, as far as I can see, they can not be directly used with parallel Petsc vectors. On a single processor everything works fine, but on more processors it fails.
> I am thinking now of different workarounds:
>
> 1. Create a sequential vector from the parallel vector, and call the TecIO subroutines with this sequential vector. For large problems this will probably be too slow, and actually I don't know how to copy the content of a parallel vector into a sequential one.
> 2. Write a tecplot file from each processor, with the data from that processor. The problem is that this requires combining the files afterwards, and this is probably not easy (certainly not in binary format?).
> 3. Change the tecplot subroutines or write own binary output with VecView(). It might not be easy to get the output right so that Tecplot understands it.
>
> Do you have suggestions? Are there other possibilities?
>
> Thanks,
>
> Benjamin
>
>
More information about the petsc-users
mailing list