<div dir="ltr"><div dir="ltr">I am trying to write a python script to refine the fourth order mesh to a linear mesh preserving all the nodes. I have used API functions only to read the mesh file and haven't used any of it to write the linear mesh. <div><br></div><div>I started with a cube with only one volume element (4th order) and figured out that among the given 125 nodes, nodes on which location forms a linear hexahedra. The same thing can be repeated for any number of hexahedrons. Thus a mesh made up only of 4th order hexahedrons can be converted to a linear mesh (similar things can also be done for the boundary faces). </div><div><br></div><div>When I try this for simple cube geometry with several number of cube elements it works fine(cube.msh is the input quartic mesh while refine.msh is the refined linear mesh) but with the 3dbody.msh geometry there seems to be an issue in the connectivity as one can see the incompatible nodes being connected to form a cell(3dRefined.msh is the resultant mesh). </div><div><br></div><div>I suppose that if this works for one quartic mesh with only hexahedrons it should work for the other, since the way a quartic hexahedron element is numbered should remain the same.</div><div><br></div><div>What could be the problem in the script? Is there any functionality in gmsh API(so that I don't have to write the connectivity myself) to make this work?</div><div><br></div><div>I have also attached the script for your reference.</div><div><br></div>Thanks <br></div><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;font-family:arial;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/file/d/151Xg5dE8LYMOlgLuv0w_zwuxv2a3o-Fs/view?usp=drive_web" target="_blank" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration-line:none;padding:1px 0px;border:none"><img style="vertical-align: bottom; border: none;" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="vertical-align:bottom;text-decoration:none">cube.msh</span></a><img src="//ssl.gstatic.com/ui/v1/icons/common/x_8px.png" style="opacity: 0.55; cursor: pointer; float: right; position: relative; top: -1px; display: none;"></div><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;font-family:arial;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/file/d/17pKCg5pFCyrlcX37jFME4eNVf7yRGR1_/view?usp=drive_web" target="_blank" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration-line:none;padding:1px 0px;border:none"><img style="vertical-align: bottom; border: none;" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="vertical-align:bottom;text-decoration:none">refine.msh</span></a><img src="//ssl.gstatic.com/ui/v1/icons/common/x_8px.png" style="opacity: 0.55; cursor: pointer; float: right; position: relative; top: -1px; display: none;"></div></div>