[Nek5000-users] vtk into prenek

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Sun Aug 14 12:10:28 CDT 2016


Neks,

I am trying to import some mesh information into prenek via a vtk file.
Can someone please post an example of one that works into the git repo?
Ideally it would be nice to have a 2d and 3d case for vtk files that work
in prenek.

I have tried using the vtkUnstructuredGridWriter class from the vtk library
and prenek does not accept the file.  At first I thought it was because the
class required 3d points and I am importing a 2d mesh, but after I modified
the file to remove the extra coordinate and make it match the style guide (
http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf) prenek
reads the mesh without crashing, but no elements appear.  The output to the
terminal from prenek is:

IMPORT VTK MESH
Current number of elements:       0
input name of vtk file
 4 0 1 2 3

 inside gencen            0 F           4
 done gencen            0


The contents of the file I am trying to import are below, so if you see a
bug please let me know.

# vtk DataFile Version 4.0
vtk output
ASCII
DATASET UNSTRUCTURED_GRID
POINTS 7 float
0 0
2.1 0
1.48492 1.48492
0 2.1
3 0
2.12132 2.12132
0 3
CELLS 3 15
4 0 1 2 3
4 1 4 5 2
4 3 2 5 6

CELL_TYPES 3
9
9
9

Thanks,
-- 
Phil S.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20160814/806f8760/attachment.html>


More information about the Nek5000-users mailing list