# discretization algorithm (hexahedron)

Hello,

does anybody know the algorithm of the discretization, so the order of the nodes, after a mesh with hexahedron or where to find this algorithm?

I need for my project an other order (lexicographic order).

Regards

Welpe

Hello Welpe

The algorithm of discretization, and thus order of nodes, is in general as follows.

- nodes on vertices
- segments on edges
- faces on surfaces
- volumes in solids.

Best regards

Edward

Hello Edward,

thank you for your indication.

Perhaps there is a way to get the source code of this algorithm with all its loops and enumeration?

Regards

Welpe

Hello Welpe

I'm afraid that the source code of the hexahedral algorithm (see SMESH/src/StdMeshers/StdMeshers_Hexa_3D.cxx) won't help you.

As far as I see you need to renumber nodes of a hexahedral mesh. You can do it using the fact that the hexahedrons are in the lexicographic order as you need. So, you write a Python script to iterate over all hexahedra and get nodes of each hexahedron, thus you can find out correspondence between the actual node numbers and the desired ones.

Edward