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:


Download: mesh2qh.c


  Copyright © by Daniel Rypl 2010
Enjoy :-)