Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
HalfFacetRep.hpp
Go to the documentation of this file.
1 /**
2  * MOAB, a Mesh-Oriented datABase, is a software component for creating,
3  * storing and accessing finite element mesh data.
4  *
5  * Copyright 2004 Sandia Corporation. Under the terms of Contract
6  * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government
7  * retains certain rights in this software.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  */
15 
16 #ifndef MOAB_HALF_FACET_REP_HPP
17 #define MOAB_HALF_FACET_REP_HPP
18 
19 #include "moab/Core.hpp"
20 #include "moab/Range.hpp"
21 #include "moab/CN.hpp"
22 
23 namespace moab
24 {
25 
26 /*!
27  * \brief HalfFacetRep class implements the Array-Based Half-Facet(AHF) Mesh data structure on
28  * top of MOAB. \ It is based on a generalized notion of a half-facet derived from that a
29  * half-edge/half-face data structure for 2D/3D. \ The core construct of AHF are its two
30  * maps: sibling-half-facets(SIBHFS) and vertex-to-half-facet(V2HF) \ 1. SIBHFS: Maps every
31  * half-facet in the mesh to its sibling half-facets, \ 2. V2HF: Maps each vertex to an
32  * incident half-facet \ Using these two maps, a range of adjacency queries is performed. The
33  * maps are stored in dense tags over entities and vertices.
34  * \
35  * \ Adjacency functions:
36  * \ 1. upward-incidence queries: vertex -> edge, edge -> faces, edge -> cells, face ->cells
37  * \ 2. neighborhood (same-dimensional) adjacency queries: edge -> edges, face -> faces,
38  * cell -> cells, etc. \ 3. downward adjacency queries: face -> edges, cell -> edges, etc.
39  * \
40  * \ Mesh types supported:
41  * \ 1D(edges), 2D(triangles, quads), 3D(tet, pyramid, prism, hex), Mixed dimensional meshes
42  * \
43  * \ CURRENTLY NOT SUPPORTED:
44  * \ 1. Meshes with mixed entity types of same dimension. Ex. a volume mesh with both tets
45  * and prisms. \ 2. create_if_missing = true \ 3. Modified meshes
46  * \
47  */
48 
50 
51 const int MAXSIZE = 200;
52 
53 //! ENUM for the type of input mesh.
55 {
56  CURVE = 0, // Homogeneous curve mesh
57  SURFACE, // Homogeneous surface mesh
58  SURFACE_MIXED, // Mixed surface with embedded curves
59  VOLUME, // Homogeneous volume mesh
60  VOLUME_MIXED_1, // Volume mesh with embedded curves
61  VOLUME_MIXED_2, // Volume mesh with embedded surface
62  VOLUME_MIXED // Volume mesh with embedded curves and surfaces
63 };
64 
65 enum
66 {
68  MAX_EDGES = 12,
69  MAX_FACES = 6,
71  MAX_INCIDENT_HF = 4
72 };
73 
74 class Core;
75 class ParallelComm;
77 {
78 
79  public:
80  HalfFacetRep( Core* impl, ParallelComm* comm = 0, moab::EntityHandle rset = 0, bool filter_ghosts = true );
81 
82  ~HalfFacetRep();
83 
85 
86  // User interface functions
87 
88  //! Constructs the sibling-half-facet and vertex-to-incident-half-facet maps for each dimension
89  //! present in the input. This routine should be called before any calls for adjacency is made.
91 
92  //! Deinitialize
94 
95  //! Prints the tag values.
96  ErrorCode print_tags( int dim );
97 
98  //! Get the adjacencies associated with an entity.
99  /** Given an entity of dimension <em>d</em>, gather all the adjacent <em>D</em> dimensional
100  * entities where <em>D >, = , < d </em>.
101  *
102  * \param source_entity EntityHandle to which adjacent entities have to be found.
103  * \param target_dimension Int Dimension of the desired adjacent entities.
104  * \param target_entities Vector in which the adjacent EntityHandle are returned.
105  */
106 
107  ErrorCode get_adjacencies( const EntityHandle source_entity,
108  const unsigned int target_dimension,
109  std::vector< EntityHandle >& target_entities );
110 
111  //! Get the upward incidences associated with an entity.
112  /** Given an entity of dimension <em>d</em>, gather all the incident <em>D(>d)</em> dimensional
113  * entities.
114  * :
115  * \param ent EntityHandle to which incident entities have to be found.
116  * \param out_dim Dimension of the desired incidence information.
117  * \param adjents Vector in which the incident entities are returned.
118  * \param local_id Set to false by default. If true, returns the local id's of the half-facets
119  * \param lids Vector in which the local id's are returned.
120  */
121 
123  int out_dim,
124  std::vector< EntityHandle >& adjents,
125  std::vector< int >* lids = NULL );
126 
127  //! Get the same-dimensional entities connected with an entity.
128  /** Given an entity of dimension <em>d</em>, gather all the entities connected via <em>d-1</em>
129  * dimensional entities. Same as bridge_adjacencies in MOAB.
130  *
131  * \param ent EntityHandle to which neighbor entities have to be found.
132  * \param adjents Vector in which the neighbor entities are returned.
133  */
134 
135  ErrorCode get_neighbor_adjacencies( EntityHandle ent, std::vector< EntityHandle >& adjents );
136 
137  //! Get the downward adjacent entities connected with an entity.
138  /** Given an entity of dimension <em>d</em>, gather all the <em>d-1</em> dimensional entities.
139  *
140  * \param ent EntityHandle to which neighbor entities have to be found.
141  * \param out_dim Dimension of the desired downward adjacency.
142  * \param adjents Vector in which the neighbor entities are returned.
143  */
144 
145  ErrorCode get_down_adjacencies( EntityHandle ent, int out_dim, std::vector< EntityHandle >& adjents );
146 
147  // 1D Maps and queries
148 
149  //! Given a range of edges, determines the map for sibling half-verts and stores them into
150  //! SIBHVS_EID, SIBHVS_LVID tags.
151  /** Compute all sibling half-vertices for all half-vertices in the given curve. The sibling
152  * half-verts is defined in terms of the containing edge and the local id of the vertex w.r.t
153  * that edge. That is, the map consists of two pieces of information: <EntityHandle eid, int
154  * lvid>
155  *
156  * \param edges Range of edges.
157  */
158 
160 
161  //! Given a range of edges, determines the map for incident half-verts and stores them into
162  //! V2HV_EID, V2HV_LVID tags.
163  /** Compute a map between a vertex and an incident half-vertex. This map is not always required,
164  * but is essential for local neighborhood searching as it acts like an anchor to start the
165  * search.
166  *
167  * \param edges Range of edges
168  */
169 
171 
172  //! Given a vertex, finds the edges incident on it.
173  /** Given a vertex handle, it starts by first finding an incident half-vert by using the
174  * incident half-vert map, and then obtaining all the sibling half-verts of the corresponding
175  * half-vertex.
176  *
177  * \param vid EntityHandle of the query vertex
178  * \param adjents Vector returning the incident edges
179  * \param local_id False by default. If true, returns the local vertex id's corresponding to vid
180  * \param lvids Vector returning the local vertex id's
181  */
182 
184  std::vector< EntityHandle >& adjents,
185  std::vector< int >* lvids = NULL );
186 
187  //! Given an edge, finds vertex-connected neighbor edges
188  /** Given an edge, it gathers all the incident edges of each vertex of the edge.
189  *
190  * \param eid EntityHandle of the query edge
191  * \param adjents Vector returning neighbor edges
192  */
193 
194  ErrorCode get_neighbor_adjacencies_1d( EntityHandle eid, std::vector< EntityHandle >& adjents );
195 
196  // 2D Maps and queries
197 
198  //! Given a range of faces, determines the sibling half-edges and stores them into SIBHES_FID,
199  //! SIBHES_LEID tags.
200  /** Compute all sibling half-edges for all half-edges in the given surface.
201  * The sibling half-edges is defined in terms of the containing face and the local id of the
202  * edge w.r.t that entity. That is, the map consists of two pieces of information: <EntityHandle
203  * fid, int leid>
204  *
205  * \param faces Range of faces
206  */
207 
209 
210  //! Given a range of faces, determines the incident half-edges and stores them into V2HE_FID,
211  //! V2HE_LEID tags.
212  /** Compute a map between a vertex and an incident half-edge.
213  * This map is not always required, but is essential for local neighborhood searching as it acts
214  * like an anchor to start the search.
215  *
216  * \param faces Range of faces
217  */
218 
220 
221  //! Given a vertex, finds the faces incident on it.
222  /** Given a vertex, it first finds an incident half-edge via v2he map, and then
223  * collects all the incident half-edges/faces via the sibhes map.
224  *
225  * \param vid EntityHandle of the query vertex
226  * \param adjents Vector returning the incident faces
227  */
228 
229  ErrorCode get_up_adjacencies_vert_2d( EntityHandle vid, std::vector< EntityHandle >& adjents );
230 
231  //! Given an edge, finds the faces incident on it.
232  /** Given an edge, it first finds a matching half-edge corresponding to eid, and then
233  * collects all the incident half-edges/faces via the sibhes map.
234  *
235  * \param eid EntityHandle of the query edge
236  * \param adjents Vector returning the incident faces
237  * \param local_id By default false. If true, returns the local edge id's corresponding to the
238  * input edge \param leids Vector returning local edge ids
239  */
240 
242  std::vector< EntityHandle >& adjents,
243  std::vector< int >* leids = NULL );
244 
245  //! Given a half-edge <fid, leid>, finds the faces incident on it.
246  /**
247  *
248  * \param fid EntityHandle of the containing face
249  * \param leid local id of the edge w.r.t to the face
250  * \param add_inent If true, adds the input fid into the returning vector of adjents.
251  * \param adjents Vector returning the incident faces
252  * \param local_id By default false. If true, returns the local edge id's as well.
253  * \param leids Vector returning local edge ids
254  */
255 
257  int leid,
258  bool add_inent,
259  std::vector< EntityHandle >& adj_ents,
260  std::vector< int >* adj_leids = NULL,
261  std::vector< int >* adj_orients = NULL );
262 
263  //! Given an edge, finds edge-connected neighbor face
264  /** Given an face, it gathers all the neighbor faces of each local edge of the face.
265  *
266  * \param fid EntityHandle of the query face
267  * \param adjents Vector returning neighbor faces
268  */
269 
270  ErrorCode get_neighbor_adjacencies_2d( EntityHandle fid, std::vector< EntityHandle >& adjents );
271 
272  //! Given a face, finds its edges.
273  /** Given a face, it first finds incident edges on each vertex of the face, and then
274  * it performs a set intersection to gather all the edges of the given face.
275  *
276  * \param fid EntityHandle of the query face
277  * \param adjents Vector returning its edges
278  */
279 
280  ErrorCode get_down_adjacencies_2d( EntityHandle fid, std::vector< EntityHandle >& adjents );
281 
282  //! Given a range of faces, finds the total number of edges.
283 
284  int find_total_edges_2d( Range& faces );
285 
286  ErrorCode get_face_edges( EntityHandle fid, std::vector< EntityHandle >& edges );
287 
288  // 3D Maps and queries
289 
290  //! Given a range of cells, determines the sibling half-faces and stores them into SIBHFS_CID,
291  //! SIBHFS_LFID tags.
292  /** Compute all sibling half-faces for all half-faces in the given volume.
293  * The sibling half-faces is defined in terms of the containing cell and the local id of the
294  * face w.r.t that cell. That is, the map consists of two pieces of information: <EntityHandle
295  * cid, int lfid>
296  *
297  * \param faces Range of cells
298  */
299 
301 
302  //! Given a range of cells, determines the incident half-faces and stores them into V2HF_CID,
303  //! V2HF_LFID tags.
304  /** Compute a map between a vertex and an incident half-face.
305  * This map is not always required, but is essential for local neighborhood searching as it acts
306  * like an anchor to start the search.
307  *
308  * \param faces Range of cells
309  */
310 
312 
313  //! Given a range of cells, tags all border vertices with a true value.
314  /** Tag border vertices by using the sibhf_cid map. All vertices on half-faces with no sibling
315  * half-faces are considered as border vertices.
316  *
317  * \param cells Range of cells
318  * \param isborder: A dense tag over all vertices of size 1. Value is true for a border vertex,
319  * otherwise is false.
320  */
321 
322  ErrorCode determine_border_vertices( Range& cells, Tag isborder );
323 
324  //! Given a vertex, finds the cells incident on it.
325  /** Given a vertex, it first finds an incident half-face via v2hf map, and then
326  * collects all the incident half-faces via the sibhfs map.
327  *
328  * \param vid EntityHandle of the query vertex
329  * \param adjents Vector returning the incident cells
330  */
331 
332  ErrorCode get_up_adjacencies_vert_3d( EntityHandle vid, std::vector< EntityHandle >& adjents );
333 
334  //! Given an edge, finds the cells incident on it.
335  /** Given an edge, it first finds a matching local edge in a cell corresponding to eid, and then
336  * collects all the incident cells via the sibhfs map.
337  *
338  * \param eid EntityHandle of the query edge
339  * \param adjents Vector returning the incident cells
340  * \param local_id By default false. If true, returns the local edge id's corresponding to the
341  * input edge \param leids Vector returning local edge ids
342  */
343 
345  std::vector< EntityHandle >& adjents,
346  std::vector< int >* leids = NULL );
347 
348  //! Given a local edge <cid, leid>, finds the cells incident on it.
349  /** Given a local edge, it gathers all the incident cells via the sibhfs map.
350  *
351  * \param cid EntityHandle of the cell containing the local edge
352  * \param leid local edge id w.r.t the cell
353  * \param adjents Vector returning the incident cells
354  * \param local_id By default false. If true, returns the local edge id's corresponding to the
355  * input edge \param leids Vector returning local edge ids
356  */
357 
359  int leid,
360  std::vector< EntityHandle >& adjents,
361  std::vector< int >* leids = NULL,
362  std::vector< int >* adj_orients = NULL );
363 
365  int leid,
366  std::vector< EntityHandle >& adjents,
367  std::vector< int >* leids = NULL,
368  std::vector< int >* adj_orients = NULL );
369 
370  //! Given an face, finds the cells incident on it.
371  /** Given an face, it first finds a matching half-face in a cell corresponding to face, and then
372  * collects all the incident cells via the sibhfs map.
373  *
374  * \param fid EntityHandle of the query face
375  * \param adjents Vector returning the incident cells
376  * \param local_id By default false. If true, returns the local face id's corresponding to the
377  * input face \param leids Vector returning local face ids
378  */
379 
381  std::vector< EntityHandle >& adjents,
382  std::vector< int >* lfids = NULL );
383 
384  //! Given a local face <cid, lfid>, finds the cells incident on it.
385  /** Given a local face, it gathers all the incident cells via the sibhfs map.
386  *
387  * \param cid EntityHandle of the cell containing the local edge
388  * \param lfid local face id w.r.t the cell
389  * \param adjents Vector returning the incident cells
390  * \param local_id By default false. If true, returns the local face id's corresponding to the
391  * input face \param lfids Vector returning local face ids
392  */
393 
395  int lfid,
396  std::vector< EntityHandle >& adjents,
397  std::vector< int >* lfids = NULL );
398 
399  //! Given a cell, finds face-connected neighbor cells
400  /** Given a cell, it gathers all the neighbor cells of each local face of the cell.
401  *
402  * \param cid EntityHandle of the query cell
403  * \param adjents Vector returning neighbor cells
404  */
405 
406  ErrorCode get_neighbor_adjacencies_3d( EntityHandle cid, std::vector< EntityHandle >& adjents );
407 
408  //! Given a cell, finds its edges.
409  /** Given a cell, it first finds incident edges on each vertex of the cell, and then
410  * it performs a set intersection to gather all the edges of the given cell.
411  *
412  * \param cid EntityHandle of the query cell
413  * \param adjents Vector returning its edges
414  */
415 
416  ErrorCode get_down_adjacencies_edg_3d( EntityHandle cid, std::vector< EntityHandle >& adjents );
417 
418  //! Given a cell, finds its faces.
419  /** Given a cell, it first finds incident faces on each vertex of the cell, and then
420  * performs a set intersection to gather all the faces of the given cell.
421  *
422  * \param cid EntityHandle of the query cell
423  * \param adjents Vector returning its faces
424  */
425 
426  ErrorCode get_down_adjacencies_face_3d( EntityHandle cid, std::vector< EntityHandle >& adjents );
427 
428  /* Find the number of edges and faces of given range of cells
429  * */
430  ErrorCode find_total_edges_faces_3d( const Range& cells, int* nedges, int* nfaces );
431 
432  ErrorCode count_subentities( Range& edges, Range& faces, Range& cells, int* nedges, int* nfaces );
433 
434  void get_memory_use( unsigned long long& entity_total, unsigned long long& memory_total );
435 
437  int leid,
438  std::vector< EntityHandle >& ents,
439  std::vector< int >& lids,
440  std::vector< int >& lfids );
441 
442  /**************************
443  * Interface to AHF maps *
444  **************************/
445  HFacet create_halffacet( EntityHandle handle, int lid );
446 
447  EntityHandle fid_from_halfacet( const HFacet facet, EntityType type );
448 
449  int lid_from_halffacet( const HFacet facet );
450 
452 
454  int nverts,
455  EntityHandle start_edge,
456  int nedges,
457  EntityHandle start_face,
458  int nfaces,
459  EntityHandle start_cell,
460  int ncells );
461 
462  ErrorCode get_sibling_map( EntityType type,
463  EntityHandle ent,
464  EntityHandle* sib_entids,
465  int* sib_lids,
466  int num_halffacets );
467 
468  ErrorCode get_sibling_map( EntityType type, EntityHandle ent, int lid, EntityHandle& sib_entid, int& sib_lid );
469 
470  ErrorCode set_sibling_map( EntityType type,
471  EntityHandle ent,
472  EntityHandle* set_entids,
473  int* set_lids,
474  int num_halffacets );
475 
476  ErrorCode set_sibling_map( EntityType type, EntityHandle ent, int lid, EntityHandle& set_entid, int& set_lid );
477 
478  ErrorCode get_incident_map( EntityType type,
479  EntityHandle vid,
480  std::vector< EntityHandle >& inci_entid,
481  std::vector< int >& inci_lid );
482 
483  ErrorCode set_incident_map( EntityType type,
484  EntityHandle vid,
485  std::vector< EntityHandle >& set_entid,
486  std::vector< int >& set_lid );
487 
488  bool check_nonmanifold_vertices( EntityType type, EntityHandle vid );
489 
490  /**********************
491  * Local Maps
492  * ********************/
493  //! 2D local maps
494  struct LocalMaps2D
495  {
496  //! Number of vertices in a face
497  short int num_verts_in_face;
498  //! Local ids of the next half-edge
500  //! Local ids of the previous half-edge
502  };
503  static const LocalMaps2D lConnMap2D[2];
504 
505  //! 3D local maps
506  struct LocalMaps3D
507  {
508  //! Number of vertices in cell
509  short int num_verts_in_cell;
510  //! Number of edges in cell
511  short int num_edges_in_cell;
512  // Number of faces in cell
513  short int num_faces_in_cell;
514  //! Number of vertices in each half-face
516  //! Map: Half-face to local vertex ids
518  //! Number of incident half-faces on each vertex
520  //! Map: Local vertices to incident half-facets
522  //! Map: Local edges to local vertices
523  int e2v[MAX_EDGES][2];
524  //! Map: Local edges to incident half-faces
525  int e2hf[MAX_EDGES][2];
526  //! Map: Half-faces to local edges
528  //! Map: local vertices to local edges
530  //! Search edge verts:
533  int v2le[4][5];
534  };
535  static const LocalMaps3D lConnMap3D[4];
537 
538  std::map< EntityType, int > cell_index;
539 
540  int get_index_in_lmap( EntityHandle cid );
541  ErrorCode get_entity_ranges( Range& verts, Range& edges, Range& faces, Range& cells );
542  MESHTYPE get_mesh_type( int nverts, int nedges, int nfaces, int ncells );
543 
545  {
546  return &_rset;
547  }
548 
549  protected:
551 
557 
559 
560  // AHF map storage containers for 1D, 2D, 3D
561  std::vector< HFacet > sibhvs, v2hv;
562  std::vector< HFacet > sibhes, v2he;
563  std::vector< HFacet > sibhfs, v2hf;
564 
565  // AHF maps for non-manifold vertices 2D, 3D
566  std::multimap< EntityHandle, HFacet > v2hes, v2hfs;
567 
568  // Auxiliary storage for local searches.
572 
573  struct adj_matrix
574  {
575  int val[4][4];
576  };
577 
578  static const adj_matrix adjMatrix[7];
579  int get_index_for_meshtype( MESHTYPE mesh_type );
580 
581  // These two flags are for checking mixed entity type meshes
582  bool is_mixed;
583  bool chk_mixed;
584 
588 
589  //! Contains the local information for 2D entities
590  /** Given a face, find the face type specific information
591  *
592  * \param face EntityHandle. Used to gather info about the type of face for which local info is
593  * required \param nepf: Returns the number of vertices/edges for given face type.
594  */
595 
596  //! Contains the local information for 2D entities
597  /** Given number of edges, returns local indices of next and previous local edges.
598  *
599  * \param nepf: The number of vertices/edges for given face type.
600  * \param next, prev: Local ids of next and previous edges w.r.t to the face
601  *
602  * Note: For 2D entities, the number of vertices and edges are same and each local edge is
603  outgoing
604  * corresponding to the local vertex, i.e,
605 
606  v2 v3 __e2__v2
607  /\ | |
608  e2 / \ e1 e3| |e1
609  /____\ |______|
610  v0 e0 v1 v0 e0 v1
611  */
612 
613  //! Given a half-edge as <he_fid,he_lid> , finds the half-edges incident on it and adds them
614  // to an input queue if it not already added.
615  /** Given an half-edge, obtain all the incident half-edges via the sibhes map and add them to a
616  * given queue of half-edges, if they do not already exist in the queue. This function is used
617  * to increment the search space for finding a matching half-edge.
618  *
619  * \param he_fid EntityHandle of query half-edge
620  * \param he_lid Local id of query half-edge
621  */
622 
623  ErrorCode get_up_adjacencies_2d( EntityHandle he_fid, int he_lid, int* qsize, int* count );
624 
625  //! Given an edge, finds a matching half-edge in the surface.
626  /** Given an edge eid, it first collects few half-edges belonging to one-ring neighborhood of
627  * the starting vertex of the given edge, and then simultaneously searches and adds to the local
628  * list of half-edges for searching, till it finds a matching half-edge.
629  *
630  * \param eid EntityHandle of the query edge
631  * \param hefid, helid: Returns the matching half-edge corresponding to the query edge.
632  */
633 
634  bool find_matching_halfedge( EntityHandle eid, EntityHandle* hefid, int* helid );
635 
636  //! Gather half-edges to a queue of half-edges.
637  /** Given a vertex vid, and a half-edge <he_fid,he_lid>, add another half-edge in the same face
638  * sharing the vertex
639  */
640 
641  ErrorCode gather_halfedges( EntityHandle vid, EntityHandle he_fid, int he_lid, int* qsize, int* count );
642 
643  //! Obtains another half-edge belonging to the same face as the input half-edge
644  /** It uses the local maps to find another half-edge that is either incident or outgoing
645  * depending on vid and input half-edge
646  */
647 
649  EntityHandle he_fid,
650  int he_lid,
651  EntityHandle* he2_fid,
652  int* he2_lid );
653 
655  EntityHandle he_fid,
656  int he_lid,
657  Range& faces,
658  std::vector< char >& markHEdgs,
659  HFacet& bnd_hf );
660 
661  //! Collect and compare to find a matching half-edge with the given edge connectivity.
662  /** Given edge connectivity, compare to an input list of half-edges to find a matching half-edge
663  * and add a list of half-edges belonging to the one-ring neighborhood to a queue till it finds
664  * a match.
665  */
666 
667  bool collect_and_compare( const EntityHandle vid,
668  const EntityHandle* edg_vert,
669  int* qsize,
670  int* count,
671  EntityHandle* he_fid,
672  int* he_lid );
673 
675  EntityHandle curcid,
676  int curlid,
677  std::multimap< EntityHandle, EntityHandle >& comps,
678  HFacet& hf );
680  EntityHandle cell,
681  std::multimap< EntityHandle, EntityHandle >& comps );
682 
683  //! Given an edge, finds a matching local edge in an incident cell.
684  /** Find a local edge with the same connectivity as the input edge, belonging to an incident
685  * cell.
686  *
687  * \param eid EntityHandle of the edge
688  * \param cid Returns EntityHandle of the incident cell
689  * \param leid Returns the local id of the edge corresponding to the input edge w.r.t the
690  * incident cell.
691  */
692 
694  std::vector< EntityHandle >& cid,
695  std::vector< int >& leid );
696 
697  //! Given a face, finds a matching local face in an incident cell.
698  /** Find a local face with the same connectivity as the input face, belonging to an incident
699  * cell.
700  *
701  * \param fid EntityHandle of the face
702  * \param cid Returns EntityHandle of the incident cell
703  * \param lfid Returns the local id of the face corresponding to the input face w.r.t the
704  * incident cell.
705  */
706 
707  bool find_matching_halfface( EntityHandle fid, EntityHandle* cid, int* leid );
708 
710  EntityHandle* ent_list,
711  int count,
712  bool get_index = false,
713  int* index = NULL );
714 };
715 
716 } // namespace moab
717 
718 #endif