[Gmsh] gmsh.view.getModelData returns empty arrays

Christophe Geuzaine cgeuzaine at uliege.be
Wed Jan 23 15:01:50 CET 2019


Dear Michiel,

This is now fixed in Git - you can test the next SDK snapshot.

(Just for reference: as a test for improving the performance of the C, Python and Julia API (compared to the native C++ API), getModelData was implemented both in C++ and in C. The bug was only in the raw C implementation - hence not showing up in the C++ test.)

Thanks a lot for the report!

Christophe

> On 23 Jan 2019, at 12:55, Michiel Van Ginderachter <michiel.vanginderachter at meteo.be> wrote:
> 
> Dear Developers,
> 
> I was going through the python demos and came across the following issue in the plugin.py example:
> 
> when after creating a view with model data with:
> 
> t = gmsh.view.add("some data")
> gmsh.view.addModelData(t, 0, "test", "NodeData",
> [1, 2, 3, 4],
> [[1.],[10.],[20.],[1.]])
> 
> I try to retrieve some of the data with:
> 
> dataType, tags, data, time, numComp = gmsh.view.getModelData(t, 0)
> print dataType, tags, data, time, numComp
> 
> i get empty arrays for tags and data:
> 
> NodeData [] [] 0.0 1.
> 
> However, when I store the view in a .msh file and inspect it the data is there.
> 
> gmsh.view.write(t, "test.msh")
> 
> $NodeData
> 1
> "some data"
> 1
> 0
> 3
> 0
> 1
> 4
> 1 1
> 2 10
> 3 20
> 4 1
> $EndNodeData
> 
> I have tried different versions of the gmsh library on different systems. All seem to have the same issue.
> 
> Best regards,
> Michiel Van Ginderachter
> 
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine






More information about the gmsh mailing list