<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'><br><br><hr id="zwchr"><blockquote id="DWT1727" style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">Hey Moab-Dev,<br><br>I wanted to clarify my understanding of the side_number function for<br>polygon meshes in 2D. Specifically, given a parent-child element pair;<br>the function returns three parameters: side number, sense and offset.<br><br>For a face-edge pair, these parameters represent:<br>Side_number =the index of the edge in the array (NOT range) returned<br>by get_adjacencies(face,1,1,edges_associated_with_face)<br id="DWT1729"></blockquote>so for a polygon ABCDEF, the "positive oriented" edges will be AB, BC, CD, DE, EF, FA, with their "side_number" 0, 1, 2,..., 5<br>offset is the same as the side number, you could ignore it, usually.<br><br>edge BA will be oriented "negative", sense will be -1, but the index should be 1 (it is the "index" of the first node of the edge)<br><br><blockquote id="DWT1727" style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><br>Sense = the orientation of the normal of the edge with respect to the<br>face (ie positive for outward, negative for inward)<br></blockquote>What is the normal to the edge? A face has one normal, an edge has a normal plane. see above for conventions.<br><blockquote id="DWT1730" style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><br>For a face-vertex pair, these parameter represent:<br>Side_number = the index of the vertex in the array (NOT range)<br>returned by get_adjacencies(face,1,0,vertices_associated_with_face)<br></blockquote>yes, or returned by get_connectivity() , array version, again<br><blockquote id="DWT1731" style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">Sense = 0<br><br>For an edge-vertex pair, these parameters represent:<br>Side_number = the index of the vertex in the array (NOT range)<br>returned by get_adjacencies(edge,1,0,vertices_associated_with_edge)<br>Sense = the orientation of the tangent of the edge with respect to the<br>vertex (ie positive for towards, negative for away)<br></blockquote>so each edge has a connectivity like AB. A will be the first vertex, B the second (in the get_connectivity). You could use get_adjacencies (also for connectivity of polygons), it should return the same things<br><blockquote id="DWT1732" style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><br>Questions:<br><br>1) Is this understanding correct?<br><br></blockquote>yes, I would use get_connectivity when possible ( polygon-vertex, or edge-vertex)<br><blockquote id="DWT1733" style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">2) What does the offset parameter represent in these cases?</blockquote>It could be safely ignored<br><blockquote id="DWT1734" style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><br><br>3) Is side_number working for meshes that contain polygons with<br>repeated vertices (like those used in MPAS)? My preliminary testing<br>based on the above understanding says no, but I wanted to check. If<br>not, will it be working soon?<br></blockquote>Hmmm, I thought I fixed it; Maybe I forgot. Are you using NO_MIXED_ELEMENTS option when reading MPAS file?<br>I will fix it soon. <br><blockquote id="DWT1735" style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><br>4) Is there an iMESH function (or MOAB specific extension) that would<br>return similar information to side_number. I need to get access to the<br>information returned by side_number via Fortran 90 and iMESH is what I<br>am currently using to access MOAB via Fortran.<br></blockquote>I don't think there is an imesh extension yet for side_number. If you need it, it should be added to the <br>iMesh_extensions.h and iMesh_extensions_protos.h files, and implemented in the iMesh_MOAB.cpp. It should work for Fortran then too.<br>Thanks,<br>Iulian<br><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><br>Thanks,<br>Chris Eldred<br><br>-- <br>Chris Eldred<br>DOE Computational Science Graduate Fellow<br>Graduate Student, Atmospheric Science, Colorado State University<br>B.S. Applied Computational Physics, Carnegie Mellon University, 2009<br>chris.eldred@gmail.com / celdred@atmos.colostate.edu<br></blockquote><br></div></body></html>