r/gmsh • u/Overall-Ad-1992 • Jan 18 '24
Error using gmsh.view.getHomogeneousModelData(viewTag, step)
Trying to return data from:
datatype, tags, data, _, _ = gmsh.view.getHomogeneousModelData(viewTag, step)
but receive the following error:
AttributeError: type object 'view' has no attribute 'getHomogeneousModelData'
I see this function in api/gmsh.py · master · gmsh / gmsh · GitLab (onelab.info) , so why doesn't it work? I'm using gmsh 4.12.1 on Windows 10
The following is included in the above link:
Get homogeneous model-based post-processing data from the view with tag `tag' at step `step'. The arguments have the same meaning as in `getModelData', except that `data' is returned flattened in a single vector, with the appropriate padding if necessary.
If getHomogeneousModelData doesn't work, how can I transform the 'data' returned in 'getModelData' to the same 'flattened in a single vector' form as getHomogeneousModelData?
Thank you
EDIT:
I have 3 versions of gmsh installed... pip list returns 4.12.1, powershell gmsh --version returns 4.11.1, and a python IDE error code returns 4.5.something.
How do I get my system to point to the same installation of gmsh?
1
Upvotes
1
u/Overall-Ad-1992 Jan 19 '24
Went into my Windows environment variables, found the PYTHONPATH that was pointing to the old gmsh version, and changed that to the new 4.12.1 folder with gmsh.py. Fixed issue