Boundary condition on faces

1 year 3 months ago - 1 year 3 months 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: 1 year 3 months ago by PKonig.
1 year 2 months 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.131 seconds