ASCII format for Tecplot / Paraview

724 views
Skip to first unread message

Hossain Chizari

unread,
Sep 18, 2017, 10:43:04 PM9/18/17
to basilisk-fr
Dear all,

I write a header file in order to save output ASCII files in Basilisk to use in Tecplot / Paraview (http://basilisk.fr/sandbox/chizari/ASCIIoutput.h).

Please note that for each processor we need a specific name, therefore, you might want to use,

char name[50];
sprintf(name, "ASCII[%03d].dat", pid());

I will be more than happy if you give me some feedback.

With best wishes

Hossain

Antoon van Hooft

unread,
Oct 5, 2017, 8:16:53 AM10/5/17
to basilisk-fr
Hallo Hossain,

I have given it a try and run into several problems.
 
First I had to remove everything that refers to a fov scalar field f, as that does not appear in my simulations. (also the call to a 'reconstruction' function)
Also the 2D output routines gave errors upon compilation even tough i am running in 3D.

after i had manually 'fixed' it. the output file looked fine. Also when i loaded it into paraview (using the GUI and with the mandatory '.dat' extension in the file name) the Data arrays appear to be recognized (U,V,W etc.). 
Naturally i am eager to press the 'apply' button. But then i get a lot of these messages (in the therminal):


ERROR: In /build/paraview-arsa8T/paraview-5.0.1+dfsg1/VTK/IO/Geometry/vtkTecplotReader.cxx, line 1901
vtkTecplotReader
(0x49fa720): /home/antoon/basilisk/src/chielcase/hoi.dat: The record type -1.488281E+00 found in the file is unknown.

Is there another way i should use to load the data?

friendly greetings

Antoon

Hossain Chizari

unread,
Oct 8, 2017, 1:48:59 AM10/8/17
to basilisk-fr
Dear Antoon,

First of all, thank you for the feedback. You mention many good points here.

I am still working on the list format of the function in order to have more control on it. I am trying to check the "gfsview" function in order to compare and learn how to write "ascii" function with more control on the variables.

The other issue for me was that the ASCII file data should be in the same order for every variable, but when I use "foreach()" in Basilisk, for every loop it seems like the order of the cells in the loop might be different. Hence, I need to allocate some memory to overcome this.

Also, in "paraview", as you mentioned, I know what you mean, but I need to learn more about the structure as well.

Please let me know your suggestions.

Cheers
Hossain

Stephane Popinet

unread,
Oct 9, 2017, 4:15:21 AM10/9/17
to basil...@googlegroups.com
> The other issue for me was that the ASCII file data should be in the
> same order for every variable, but when I use "foreach()" in Basilisk,
> for every loop it seems like the order of the cells in the loop might be
> different.

There is no guarantee on the order of traversal of foreach() loops (in
particular because such loops can be parallelised). If you need such a
guarantee (i.e. for outputs), use foreach_cell()/foreach_leaf(), see
src/output.h for examples.

cheers

Stephane

Hossain Chizari

unread,
Oct 10, 2017, 2:04:30 AM10/10/17
to basilisk-fr
Dear Stephane,

Thank you for your effective help!

Cheers

Hossain
Reply all
Reply to author
Forward
0 new messages