Using high-order Lagrange elements in VTK #632
Replies: 2 comments 3 replies
-
Dear Matthew,
Thanks for the note.
Our approach to this has been that the cell-based approach is generally sufficient for viz—one of the more recent features of Nek is that the user can (from inside Nek) interpolate the data onto a finer mesh in each element using either the std. GLL distribution or one that is uniform in the reference element. For example, an
8x8x8 GLL distribution could be mapped to a 10x10x10 uniform distribution in each element. (The map GLL—> uniform is stable; the map uniform—>GLL is, however, unstable, so these are not good files for restart.)
Generally, we compute gradients inside Nek and then dump the corresponding vector fields—a significant reason for this is that, indeed, we get the spectral accuracy of the high-order representation, which is what you're describing as being possible, but also, we get the full 64-bit working precision. Right now, the field files are 32 bit, unless the user asks for 64 bit output. Again, 32 bit seems to be OK for viz and for most restart situations.
I think a more pressing matter might be whether we can have zf/fz or other compression techniques that can be used both for reading and writing on the Nek side and for reading on the viz side.
All that being said, an accurate in-viz gradient feature would allow computation of derivative-based quantities such a vorticity and Lambda 2 from base data, which indeed does reduce I/O traffic since one wouldn't need to write the derived fields.
Best,
Paul
…________________________________
From: Matthew Falcone ***@***.***>
Sent: Thursday, March 27, 2025 5:25 AM
To: Nek5000/nekRS ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [Nek5000/nekRS] Using high-order Lagrange elements in VTK (Discussion #632)
This question relates more strictly to the implementation of the vtkNek5000Reader in VTK rather than nekRS itself, but I want to make sure that my reasoning is sound before I propose any additions to VTK. Currently, the vtkNek5000Reader breaks each spectral element into many smaller vtkHexahedron elements; hence, the solution is not correctly represented in VTK or Paraview. This also applies to gradients calculated in Paraview. Recently, VTK introduced functionality to use high-order Lagrange elements (vtkLagrangeHexahedron). If I am not mistaken, nekRS uses Lagrange basis functions based on the GLL quadrature points. Therefore, it should be possible to have the option in VTK to create the mesh using these elements and get a better representation of the solution in VTK and Paraview. Is this reasoning correct, and would it be helpful to implement?
I have created a test Python script that converts the current output into one using vtkLagrangeHexahedron cells. While not thoroughly tested, it gives a basis for how it would work and appears to yield reasonable results.
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https://github.com/Nek5000/nekRS/discussions/632__;!!DZ3fjg!-9RdeK7BBXL4zvjGlcIhS22ipWBszKbsvUgtEmdpiGem9pKQRj5UKGUl9Y2TWbQ-KlWXadASO0cQWQVZ_Bdt6W9b8hU$>, or unsubscribe<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ACV35EMNLDPXOZ3OR6CUF6T2WO7XVAVCNFSM6AAAAABZ4SRO42VHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZYGEZTKNJQHE__;!!DZ3fjg!-9RdeK7BBXL4zvjGlcIhS22ipWBszKbsvUgtEmdpiGem9pKQRj5UKGUl9Y2TWbQ-KlWXadASO0cQWQVZ_BdtEIhc3yw$>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi Matthew, Here are some related discussions in the past:
There are 4 stages for rendering the data. And, three workflows...
For accuracy, I'll be interested if you found a case that workflow 3 shows visible improvement. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This question relates more strictly to the implementation of the
vtkNek5000Reader
in VTK rather than nekRS itself, but I want to make sure that my reasoning is sound before I propose any additions to VTK. Currently, thevtkNek5000Reader
breaks each spectral element into many smallervtkHexahedron
elements; hence, the solution is not correctly represented in VTK or Paraview. This also applies to gradients calculated in Paraview. Recently, VTK introduced functionality to use high-order Lagrange elements (vtkLagrangeHexahedron
). If I am not mistaken, nekRS uses Lagrange basis functions based on the GLL quadrature points. Therefore, it should be possible to have the option in VTK to create the mesh using these elements and get a better representation of the solution in VTK and Paraview. Is this reasoning correct, and would it be helpful to implement?I have created a test Python script that converts the current output into one using
vtkLagrangeHexahedron
cells. While not thoroughly tested, it gives a basis for how it would work and appears to yield reasonable results.Beta Was this translation helpful? Give feedback.
All reactions