Forum Message



We have moved the forum to . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.


The forum is in read only mode.

Boundary condition on faces

5 months 1 week ago - 5 months 1 week ago #4767 by PKonig
Hello all,

I'd like to know if there is a way to get the face number and associated boundary condition for a given 3D mesh (generated in netgen/ngsolve)? We try to double check some results with another software and therefore would like to recreate the mesh there.

In the tutorial about mesh topology I already found ways to return faces associated to cells, edges to faces, nodes to edges and materials to elements. However, I struggle with creating a list of the kind "(, face.bc)".

Once again, thanks in advance :)


Edit: To clarify, I need the label of the bc on the resp. face or all for a given label.
Last edit: 5 months 1 week ago by PKonig.
4 months 4 weeks ago #4812 by joachim
Replied by joachim on topic Boundary condition on faces
Hi Philip,

faces are all inter-element faces in the mesh, also inside. In contrast, boundary elements exist only for geometry boundaries. You can query boundary indices for boundary elements:

for bel in mesh.Elements(BND):
    print (bel.index, bel.mat)

Time to create page: 0.126 seconds