Error on Mean Field Python API
I am using the following python code trying to smooth the size field, but encounter the following error (GMSH 4.8.4):
Code:
gmsh.model.mesh.field.add("Min", 10)
gmsh.model.mesh.field.setNumbers(10, "FieldsList", [1, 2, 3, 7])
gmsh.model.mesh.field.add("Mean", 11)
gmsh.model.mesh.field.setNumbers(11, "InField", 10)
gmsh.model.mesh.field.setNumbers(11, "Delta", 2*lc4)
Output:
Traceback (most recent call last):
File "20210705_test_debug.py", line 393, in <module>
gmsh.model.mesh.field.setNumbers(11, "InField", 10)
File "C:\Users\anaconda3\lib\site-packages\gmsh-git-Windows64-sdk\lib\gmsh.py", line 3664, in setNumbers
api_value_, api_value_n_ = _ivectordouble(value)
File "C:\Users\anaconda3\lib\site-packages\gmsh-git-Windows64-sdk\lib\gmsh.py", line 155, in _ivectordouble
if(len(o) and array.ndim != 1):
TypeError: object of type 'int' has no len()
Edited by Jack Wong