<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Moab developers,<div><br></div><div>I am a new (and very modest!) moab user experiencing difficulties when trying to retrieve the canonical face connectivities in a mesh of 10 nodded tetrahedrons (order based on&nbsp;Tautges system from the paper "Canonical numbering systems for finite-element codes")&nbsp;. I am trying to use moab in a 3D finite element code to model multi-phasic hyperelastic elements. I am using Gmsh and Paraview for pre- and post-processing. Attached is the basic mesh I am using to get started.</div><div><br></div><div>Apart from a small problem when importing the gmsh file (it seems nodes 7 and 8 are swapped), my main difficulty arises when I try to access the faces connectivity (see extract of code at the end of this message). This technique worked successfully to obtain the element connectivities (i.e. the 10 nodes of the tets in a canonical order) when I loop over the elements, but it fails when I loop over the faces. The handle conn gets populated with the correct 6 face nodes but not in a canonical order. The vertex nodes are in the right order, but the mid-nodes are not and I don't see any consistent pattern.</div><div><br></div><div>Is there anything I am doing wrong here? Could you advise any tip to get around this?</div><div><br></div><div><br></div><div><br></div><div><i>&nbsp;MBRange elems, faces;</i></div><div><div><i>&nbsp;const MBEntityHandle* conn;</i></div><div><i>&nbsp;int num_nodes;</i></div><div><i>&nbsp;double&nbsp;coord_node_face[6*3];</i></div><div><i><br></i></div></div><div><i>&nbsp;result = gMB-&gt;load_mesh("test_mesh_modified.msh"); EE(gMB);</i></div><div><i>&nbsp;result = gMB-&gt;get_entities_by_dimension(0, 3, elems);</i></div><div><i>&nbsp;gMB-&gt;get_adjacencies(elems,2,true,faces,MBInterface::UNION);</i></div><div><div><i><br></i></div><div><i>&nbsp;for (MBRange::iterator fit = faces.begin(); fit != faces.end(); fit++) {</i></div><div><i>&nbsp;&nbsp; &nbsp; gMB-&gt;get_connectivity(*fit,conn,num_nodes);</i></div><div><i>&nbsp;&nbsp; &nbsp;&nbsp;gMB-&gt;get_coords(conn,num_nodes,coord_node_face);</i></div><div><i>&nbsp;&nbsp; &nbsp; if (coord_node_face[1]==0.5) </i><b><i>[... call a function using face canonical connectivities...]</i></b></div><div><i>&nbsp;&nbsp; &nbsp; }</i></div></div><div><i><br></i></div><i>result = gMB-&gt;write_file("Vtk_file.vtk")</i><br><div><br class="webkit-block-placeholder"></div><div>
<div><br class="Apple-interchange-newline"></div></div></body></html>