Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . 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.

Notice

The forum is in read only mode.

Boundary condition on faces

More
1 year 6 days ago - 1 year 5 days 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.nr, face.bc)".

Once again, thanks in advance :)

Greetings,
Philipp

Edit: To clarify, I need the label of the bc on the resp. face or all face.nr for a given label.
Last edit: 1 year 5 days ago by PKonig.
More
11 months 3 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)

Joachim
 
Time to create page: 0.120 seconds