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

mesh.GetBoundingBox() does not work in parallel #81

Closed
benzwick opened this issue May 20, 2021 · 2 comments
Closed

mesh.GetBoundingBox() does not work in parallel #81

benzwick opened this issue May 20, 2021 · 2 comments
Assignees
Labels

Comments

@benzwick
Copy link
Member

I get the following error:

NameError                                 Traceback (most recent call last)
~/projects/EEG/mfem-eeg-python/eeg_leadfield.py in <module>
     60 print("done.")
     61 
---> 62 print("Mesh bounding box: ", mesh.GetBoundingBox())
     63 
     64 # create finite element function space

~/.local/lib/python3.8/site-packages/mfem/_par/pmesh.py in GetBoundingBox(self, ref)
    313         min = Vector()
    314         max = Vector()
--> 315         _mesh.Mesh_GetBoundingBox(self, min, max, ref)
    316         return min.GetDataArray().copy(), max.GetDataArray().copy()
    317 

NameError: name '_mesh' is not defined

It looks to me like _mesh should be replaced with _pmesh here:

_mesh.Mesh_GetBoundingBox(self, min, max, ref)

and also here:

count = _mesh.Mesh_FindPoints(self, M, elem_ids, int_points, warn, inv_trans)

@sshiraiwa
Copy link
Member

Thanks for reporting this. A fix is being in test...

@sshiraiwa sshiraiwa added the bug label May 23, 2021
@sshiraiwa sshiraiwa self-assigned this May 23, 2021
@sshiraiwa sshiraiwa mentioned this issue May 24, 2021
@benzwick
Copy link
Member Author

This is fixed in 4.2.0.16 #84

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