This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Import group of nodes and group of cells from file in order to apply complicated boundary conditions

0 votes

Hi, i have a question about boundary conditions. I used to use an open source software (salome-platform) in oder to do geometry and mesh. This software can export the mesh (coordinate of nodes and connectivity table) with group of nodes and group of cells. These groups allow to apply complicated boundary conditions on each dimension lower than geometry dimension. Schematically:

Coordinates of nodes:
N0 X0 Y0 Z0
N1 X1 Y1 Z1
N2 X2 Y2 Z2
N3 X3 Y3 Z3
...

Connectivity table for edges (these edges are used in triangles and tetrahedrons)
E0 N0 N1
...

Connectivity table for triangles (these triangles are used in tetrahedrons)
T0 N0 N1 N2
.....

Connectivity table for tetrahedron
TETRA0 N0 N1 N2 N3
....

Group of nodes
group0 N0 N2 N10 ....
group1 N20 N40 ...

Group of cells (edges or triangles or tetrahedrons):
group2 E1 E10 E15 ....
group3 T1 T45 T14 ...
group4 TETRA0 TETRA1 ...

I would like to import data in fenics but if i understood correctly it s impossible to import group of nodes and group of edges for tetrahedrons with xml file. So, i would like to build a class in fenics in order to do this work but it 's difficult to do a manually mesh with fenics which allowing to build vertex then to build edges from vertex then to build triangle from edges then to build tetrahedron from triangles. I think this method would be the best solution to apply afterwards boundary conditions on vertex on edges or on triangles of tetrahedrons. Could you help me?
Thank you in advance.
Ps: sorry for my poor English

asked Apr 14, 2016 by Arnaud FEniCS Novice (190 points)

Hi, your problem seems quite similar to what is needed to convert meshes from Gmsh. So looking into the code might be a good starting point.

...