PyGeM
PyGeM copied to clipboard
khandler not working
#187 makes changes to original khandler resulting inablility to read in file. Revert to old code previous to this commit?
See tutorial-6-k.py to reproduce the following error:
File ~/opt/PyGeM/tutorials/tutorial-6-k.py", line 14, in <module>
new_mesh_points = ffd(mesh_points)
File "/usr/local/lib/python3.8/dist-packages/pygem-2.0.0-py3.8.egg/pygem/ffd.py", line 560, in __call__
src_reference_frame_pts = self.psi(src_pts - self.box_origin)
ValueError: operands could not be broadcast together with shapes (0,) (3,)
Thanks. Can you tell me the shape of mesh_points after the following line:
mesh_points = handler.parse('../tests/test_datasets/test_pipe.k')
Moreover do you have the same problem using the following files instead?
../tests/test_datasets/test_square.k../tests/test_datasets/test_square_comma.k
mesh_points = (29189,3)
Those files work as the nodes are defined above the elements. The new code uses the *elements to break the code. Not all preprocessors export k files in this fashion though. Therefore ungood ;-)
Ok perfect, you have already found the problem. I will leave this issue open. If you want/are able to propose a patch to solve this we would be more than happy.
I would return to the previous code. I do not know what this PR solved.
Dear PR solved the problem for comma separated k files