CFD Online Discussion Forums

CFD Online Discussion Forums (
-   ParaView (
-   -   Glyths plot with cell_data vectors (

RicardoGoncalves May 16, 2014 13:04

Glyths plot with cell_data vectors
I'm writing a code that outputs three vectors components at the centre of each triangular cell.
The .vtk file opens fine and the visualization of the magnitude of the vectors look fine.
However, when I try to visualize the vectors themselves (glyth), all of the are shown as if they were point-data, and are patently wrong (they are horizontal vectors, rather than vectors with three finite components).
Any help would be highly welcome.

wyldckat May 16, 2014 15:54

Greetings Ricardo,

Any chance you can provide a small example file?

Best regards,

RicardoGoncalves May 16, 2014 16:57

Yes, thanks:


# vtk DataFile Version 3.0
model outputs
POINTS 1465 double
500397.490000 103751.070000 0.000000 ...

3 1380 1381 756 3 707 704 755 3 1380  ...

scalars cellvar double
0.193064 -1.840271 0.016829 0.012930 0.016424 0.052549 0.018979 0.020069 0.020000 ...

VECTORS vect double
0.51000 0.320000 0.000000
-1.104062 -1.543125 0.000000
0.005260 -0.003182 0.000000 ...

wyldckat May 17, 2014 13:25

Hi Ricardo,

Actually, I was referring to a small example file that could be used for doing some tests.

Anyway, a sample of the file you have does give some additional information that came in handy to figure out some details:
  1. Triangle strips sometimes aren't very good for post-processing. You might need to apply an auxiliary filter, such as "Triangulate" or "Extract Surface", in order for it to be processable with some other filters.
  2. Glyphs by default work with point data on the vertexes of the mesh. If you need to have a vector representation on the centers of the faces of the mesh, you need to first use the filter "Cell Centers", which should create the points for the centers of the cells, along with the data for those cells. In this case, the cells are the mesh faces.
Best regards,

RicardoGoncalves May 19, 2014 13:18

Thanks Bruno, makes sense. I sorted it out by applying the Cell Center filter.

All times are GMT -4. The time now is 11:19.