-
Notifications
You must be signed in to change notification settings - Fork 62
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
Exception generated when trying to get the face indices on a specific element #172
Comments
@i3s93
|
Hi @sshiraiwa, thank you for your response. Actually, the mesh I used in my example is a 2-D Cartesian grid, which I create using |
@sshiraiwa Just to follow up, the issue only seems to happen when I use a Cartesian mesh. If I read in the mesh, as you have done, the error goes away. It looks like the table is not being generated for Cartesian meshes. |
One has to be cautious -- sometimes mfem uses "faces" to refer to (dim-1)-dimensional mesh entities and sometimes to refer specifically to 2-dimensional mesh entities. |
Hello,
I'm working with an application where I need to loop over faces associated with a particular element. My initial approach for this was to generate the element-to-face table using
elem_face_tbl = mesh.ElementToFaceTable()
, but it seems that this method is not currently supported by PyMFEM. Instead, for each element, I use the methodfaces, orientations = mesh.GetElementFaces(i)
to return the face indices and their respective orientations as separate Python lists. When I do this, I see the following exception:The relevant part of the traceback is here:
Internally, the call to MFEM uses the element to face table that I was originally trying to use, and I think the two problems might be related. I've checked other methods, such as
mesh.GetElementVertices(i)
, and they work just fine, but I need access to the faces in my particular application. I'm following the API provided indocs/manual.txt
(see 4-4). I'm looking to see if there are any recommendations for fixing this.Thank you, in advance, for your help and suggestions!
The text was updated successfully, but these errors were encountered: