Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

khandler not working #214

Open
e-dub opened this issue Oct 5, 2020 · 5 comments
Open

khandler not working #214

e-dub opened this issue Oct 5, 2020 · 5 comments
Labels

Comments

@e-dub
Copy link
Contributor

e-dub commented Oct 5, 2020

#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,) 
@mtezzele
Copy link
Collaborator

mtezzele commented Oct 5, 2020

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

@e-dub
Copy link
Contributor Author

e-dub commented Oct 5, 2020

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 ;-)

@mtezzele
Copy link
Collaborator

mtezzele commented Oct 5, 2020

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.

@mtezzele mtezzele added the bug label Oct 5, 2020
@e-dub
Copy link
Contributor Author

e-dub commented Oct 5, 2020

I would return to the previous code. I do not know what this PR solved.

@mtezzele
Copy link
Collaborator

mtezzele commented Oct 5, 2020

Dear PR solved the problem for comma separated k files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants