Mesh to quad-hexa converter
Mesh2qh converter takes on input a
mesh consisting of linear 2D (triangles and quads) and 3D (tetrahedra
and hexahedra) elements and converts it to mesh consisting purely of
quadrilateral and hexahedral elements. The original mesh is refined at
first by spliting each face/quad to 3/4 quads and each
tetrahedron/hexahedron to 4/8 hexahedra and then each element is
optionally refined by regular subdivision (in each direction) up to
given refinement level. The resulting mesh contains all the nodes of
the original mesh.
Synopsis: mesh2qh input_file_name output_file_name refinement_level
Format of input and output file:
number_of_nodes number_of_triangles number_of_quads
number_of_tetrahedra number_of_hexahedra
for each node {
node_id x_coord y_coord z_coord
}
for each face {
face_id node1_id node2_id node3_id
}
for each quad {
quad_id node1_id node2_id node3_id node4_id
}
for each tetrahedron {
tetrahedron_id node1_id node2_id node3_id node4_id
}
for each hexahedron {
hexahedron_id node1_id node2_id node3_id node4_id
node5_id node6_id node7_id node8_id
}
Notes:
- node numbering is continuos starting from 1
- numbering of elements is global (regardless of particular type of element) and continuous starting from 1
- node numbers of output mesh retains the numbers of nodes from input mesh
- number of triangles and tetrahedra in output mesh is always zero
- zero refinement level means that no subdivision is performed
- total number of nodes added on a single edge of input mesh is equal to 2^(refinement_level+1)-1
Download: mesh2qh.c