[MOAB-dev] Questions about side_number

Iulian Grindeanu iulian at mcs.anl.gov
Tue Nov 12 21:37:50 CST 2013


----- Original Message -----

| Hey Moab-Dev,

| I wanted to clarify my understanding of the side_number function for
| polygon meshes in 2D. Specifically, given a parent-child element
| pair;
| the function returns three parameters: side number, sense and offset.

| For a face-edge pair, these parameters represent:
| Side_number =the index of the edge in the array (NOT range) returned
| by get_adjacencies(face,1,1,edges_associated_with_face)

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 
offset is the same as the side number , you could ignore it, usually. 

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) 

| Sense = the orientation of the normal of the edge with respect to the
| face (ie positive for outward, negative for inward)

What is the normal to the edge? A face has one normal, an edge has a normal plane. see above for conventions. 

| For a face-vertex pair, these parameter represent:
| Side_number = the index of the vertex in the array (NOT range)
| returned by get_adjacencies(face,1,0,vertices_associated_with_face)

yes, or returned by get_connectivity() , array version, again 

| Sense = 0

| For an edge-vertex pair, these parameters represent:
| Side_number = the index of the vertex in the array (NOT range)
| returned by get_adjacencies(edge,1,0,vertices_associated_with_edge)
| Sense = the orientation of the tangent of the edge with respect to
| the
| vertex (ie positive for towards, negative for away)

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 

| Questions:

| 1) Is this understanding correct?

yes, I would use get_connectivity when possible ( polygon-vertex, or edge-vertex) 

| 2) What does the offset parameter represent in these cases?
It could be safely ignored 

| 3) Is side_number working for meshes that contain polygons with
| repeated vertices (like those used in MPAS)? My preliminary testing
| based on the above understanding says no, but I wanted to check. If
| not, will it be working soon?

Hmmm, I thought I fixed it; Maybe I forgot. Are you using NO_MIXED_ELEMENTS option when reading MPAS file? 
I will fix it soon. 

| 4) Is there an iMESH function (or MOAB specific extension) that would
| return similar information to side_number. I need to get access to
| the
| information returned by side_number via Fortran 90 and iMESH is what
| I
| am currently using to access MOAB via Fortran.

I don't think there is an imesh extension yet for side_number. If you need it, it should be added to the 
iMesh_extensions.h and iMesh_extensions_protos.h files, and implemented in the iMesh_MOAB.cpp. It should work for Fortran then too. 
Thanks, 
Iulian 

| Thanks,
| Chris Eldred

| --
| Chris Eldred
| DOE Computational Science Graduate Fellow
| Graduate Student, Atmospheric Science, Colorado State University
| B.S. Applied Computational Physics, Carnegie Mellon University, 2009
| chris.eldred at gmail.com / celdred at atmos.colostate.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20131112/db1a2547/attachment.html>


More information about the moab-dev mailing list