[MOAB-dev] Order of entities returned by iMesh_getEntAdj

Tim Tautges (ANL) tautges at mcs.anl.gov
Mon Dec 2 12:08:02 CST 2013


Yes, this is one incompatibility we have with the iMesh spec.

The best way to do this is to use the MOAB native function Interface::side_number.  From Fortran, it's also possible to 
use functions defined in CN.cpp, specifically the functions with name prefixes MBCN_; the equivalent to 
Interface::side_number is MBCN_SideNumberXxx, where Xxx is the type of arguments (various ones are supported, see 
src/CN.cpp for details).

- tim

On 11/17/2013 11:39 PM, Iulian Grindeanu wrote:
>
>
> ------------------------------------------------------------------------------------------------------------------------
>
>     Hey Moab-Dev,
>
>     Are the adjacent entities returned by iMesh_getEntAdj in any sort of order?
>
> Hi,
> from the code, it looks like we are not preserving the order, we are ordering the adjacent entities by their handles
> (and eliminating the duplicates)
> I am not seeing an easy solution if you need a particular order.
> Maybe Tim has some suggestions. One solution would be to implement side number method in iMesh;
> Or to look at connectivity array and figure out from there the order. I am not sure which one would be easier to do or
> be more efficient.
>
> Iulian
>
>
>     For example, consider a mesh of quadrilaterals. Get the edges adjacent
>     to a given face. If the edges are numbered according the convention
>     defined by MOAB
>     (http://www.mcs.anl.gov/uploads/cels/papers/P1573A.pdf) I would get
>     the array (0,1,2,3) or some shifted version of this. Will
>     iMesh_getEntAdj return (0,1,2,3) (or a shifted/flipped version of it),
>     or could I get something like (1,3,2,0) back (where the edges are not
>     ordered with respect to a CW or CCW traverse around the face)?
>
>     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
>
>

-- 
================================================================
"You will keep in perfect peace him whose mind is
   steadfast, because he trusts in you."               Isaiah 26:3

              Tim Tautges            Argonne National Laboratory
          (tautges at mcs.anl.gov)      (telecommuting from UW-Madison)
  phone (gvoice): (608) 354-1459      1500 Engineering Dr.
             fax: (608) 263-4499      Madison, WI 53706



More information about the moab-dev mailing list