[MOAB-dev] commit/MOAB: 2 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon Aug 19 12:40:32 CDT 2013


2 new commits in MOAB:

https://bitbucket.org/fathomteam/moab/commits/0c1b28599bf1/
Changeset:   0c1b28599bf1
Branch:      None
User:        vijaysm
Date:        2013-07-30 18:51:41
Summary:     API breaking interface changes to allow flexible data manipulation with file sets.

1) Adding meshset argument for some important functions in ParallelComm and Skinner.
2) Do not assume a default root set (=0) unless explicitly necessary.
3) As we move towards loading more meshes together (MBCoupler) using file_sets, dealing with root_set alone is problematic.
4) Fixed all other examples and tests to follow the new API.
5) Removed some shadow warnings in some source files.

Affected #:  16 files

diff --git a/src/GeomTopoTool.cpp b/src/GeomTopoTool.cpp
index a302f0c..8f74453 100644
--- a/src/GeomTopoTool.cpp
+++ b/src/GeomTopoTool.cpp
@@ -901,7 +901,7 @@ ErrorCode GeomTopoTool::geometrize_surface_set(EntityHandle surface, EntityHandl
 
 
   Skinner tool(mdbImpl);
-  rval = tool.find_skin(surface_ents, 1, edge_ents);
+  rval = tool.find_skin(0, surface_ents, 1, edge_ents);
   if (MB_SUCCESS != rval)
     return rval;
   if (debugFlag)
@@ -1472,7 +1472,7 @@ bool GeomTopoTool::check_model()
     if (MB_SUCCESS!=rval)
       RETFALSE(" can't get surface elements from the face set ", faceSet)
 
-    rval = tool.find_skin(surface_ents, 1, edge_ents);
+    rval = tool.find_skin(0, surface_ents, 1, edge_ents);
     if (MB_SUCCESS != rval)
       RETFALSE("can't skin a surface ", surface_ents[0])
 

diff --git a/src/MergeMesh.cpp b/src/MergeMesh.cpp
index 3ea7623..71119a3 100644
--- a/src/MergeMesh.cpp
+++ b/src/MergeMesh.cpp
@@ -61,7 +61,7 @@ moab::ErrorCode MergeMesh::merge_entities(moab::Range &elems,
   // get the skin of the entities
   moab::Skinner skinner(mbImpl);
   moab::Range skin_range;
-  moab::ErrorCode result = skinner.find_skin(elems, 0, skin_range);
+  moab::ErrorCode result = skinner.find_skin(0, elems, 0, skin_range);
   if (moab::MB_SUCCESS != result) return result;
 
   // create a tag to mark merged-to entity; reuse tree_root
@@ -232,7 +232,7 @@ moab::ErrorCode MergeMesh::merge_higher_dimensions(moab::Range &elems)
   for(int dim = 1; dim <3; dim++){
     skinEnts.clear();
     moreDeadEnts.clear();
-    result = skinner.find_skin(elems, dim, skinEnts);
+    result = skinner.find_skin(0, elems, dim, skinEnts);
     //Go through each skin entity and see if it shares adjacancies with another entity
     for(moab::Range::iterator skinIt = skinEnts.begin(); skinIt != skinEnts.end(); skinIt++){
       adj.clear();

diff --git a/src/Skinner.cpp b/src/Skinner.cpp
index 5869777..57b3d51 100644
--- a/src/Skinner.cpp
+++ b/src/Skinner.cpp
@@ -185,7 +185,7 @@ void Skinner::add_adjacency(EntityHandle entity,
   }
 }
 
-ErrorCode Skinner::find_geometric_skin(Range &forward_target_entities) 
+ErrorCode Skinner::find_geometric_skin(const EntityHandle meshset, Range &forward_target_entities)
 {
     // attempts to find whole model skin, using geom topo sets first then
     // normal find_skin function
@@ -203,7 +203,7 @@ ErrorCode Skinner::find_geometric_skin(Range &forward_target_entities)
   Range face_sets;
   int two = 2;
   const void *two_ptr = &two;
-  result = thisMB->get_entities_by_type_and_tag(0, MBENTITYSET, &geom_tag, &two_ptr, 1,
+  result = thisMB->get_entities_by_type_and_tag(meshset, MBENTITYSET, &geom_tag, &two_ptr, 1,
                                                  face_sets);
 
   Range::iterator it;
@@ -240,7 +240,8 @@ ErrorCode Skinner::find_geometric_skin(Range &forward_target_entities)
   return result;
 }
 
-ErrorCode Skinner::find_skin( const Range& source_entities,
+ErrorCode Skinner::find_skin( const EntityHandle meshset,
+                              const Range& source_entities,
                               bool get_vertices,
                               Range& output_handles,
                               Range* output_reverse_handles,
@@ -264,7 +265,8 @@ ErrorCode Skinner::find_skin( const Range& source_entities,
     this_core->a_entity_factory()->create_vert_elem_adjacencies();
     
   if (this_core && this_core->a_entity_factory()->vert_elem_adjacencies())
-    return find_skin_vertices( source_entities, 
+    return find_skin_vertices( meshset,
+                               source_entities,
                                get_vertices ? &output_handles : 0,
                                get_vertices ? 0 : &output_handles,
                                output_reverse_handles,
@@ -276,7 +278,7 @@ ErrorCode Skinner::find_skin( const Range& source_entities,
   if (!source_entities.all_of_dimension(d))
     return MB_TYPE_OUT_OF_RANGE;
   
-  rval = thisMB->get_entities_by_dimension( 0, d-1, prev );
+  rval = thisMB->get_entities_by_dimension( meshset, d-1, prev );
   if (MB_SUCCESS != rval)
     return rval;
   
@@ -297,7 +299,7 @@ ErrorCode Skinner::find_skin( const Range& source_entities,
   
   if (!create_skin_elements) {
     Range new_skin;
-    rval = thisMB->get_entities_by_dimension( 0, d-1, new_skin);
+    rval = thisMB->get_entities_by_dimension( meshset, d-1, new_skin);
     if (MB_SUCCESS != rval)
       return rval;
     new_skin = subtract( new_skin, prev );
@@ -1062,13 +1064,14 @@ bool Skinner::has_larger_angle(EntityHandle &entity1,
 }
 
   // get skin entities of prescribed dimension
-ErrorCode Skinner::find_skin(const Range &entities,
+ErrorCode Skinner::find_skin(const EntityHandle this_set,
+                             const Range &entities,
                                  int dim,
                                  Range &skin_entities,
                                  bool create_vert_elem_adjs) 
 {
   Range tmp_skin;
-  ErrorCode result = find_skin(entities, (dim==0), tmp_skin, 0, 
+  ErrorCode result = find_skin(this_set, entities, (dim==0), tmp_skin, 0,
                                  create_vert_elem_adjs, true);
   if (MB_SUCCESS != result || tmp_skin.empty()) return result;
   
@@ -1086,7 +1089,8 @@ ErrorCode Skinner::find_skin(const Range &entities,
   return result;
 }
 
-ErrorCode Skinner::find_skin_vertices( const Range& entities,
+ErrorCode Skinner::find_skin_vertices( const EntityHandle this_set,
+                                       const Range& entities,
                                            Range* skin_verts,
                                            Range* skin_elems,
                                            Range* skin_rev_elems,
@@ -1104,7 +1108,7 @@ ErrorCode Skinner::find_skin_vertices( const Range& entities,
     // are we skinning all entities
   size_t count = entities.size();
   int num_total;
-  rval = thisMB->get_number_entities_by_dimension( 0, dim, num_total );
+  rval = thisMB->get_number_entities_by_dimension( this_set, dim, num_total );
   if (MB_SUCCESS != rval)
     return rval;
   bool all = (count == (size_t)num_total);

diff --git a/src/moab/Skinner.hpp b/src/moab/Skinner.hpp
index 94463af..7ec5450 100644
--- a/src/moab/Skinner.hpp
+++ b/src/moab/Skinner.hpp
@@ -54,7 +54,7 @@ public:
   //! destructor
   ~Skinner();
 
-  ErrorCode find_geometric_skin(Range &forward_target_entities);
+  ErrorCode find_geometric_skin(const EntityHandle meshset, Range &forward_target_entities);
   
     /**\brief will accept entities all of one dimension and 
      *        return entities of n-1 dimension; NOTE: get_vertices argument controls whether
@@ -72,7 +72,8 @@ public:
      *        of skin entities, otherwise only skin entities already extant 
      *        will be returned
      */
-  ErrorCode find_skin( const Range &entities,
+  ErrorCode find_skin( const EntityHandle meshset,
+                       const Range &entities,
                        bool get_vertices,
                        Range &output_handles,
                        Range *output_reverse_handles = 0,
@@ -97,7 +98,8 @@ public:
      *        of skin entities, otherwise only skin entities already extant 
      *        will be returned
      */
-  ErrorCode find_skin( const EntityHandle *entities,
+  ErrorCode find_skin( const EntityHandle this_set,
+                       const EntityHandle *entities,
                        int num_entities,
                        bool get_vertices,
                        Range &output_handles,
@@ -113,7 +115,8 @@ public:
      * \param create_vert_elem_adjs If true, this function will cause 
      *        vertex-element adjacencies to be generated
      */
-  ErrorCode find_skin(const Range &entities,
+  ErrorCode find_skin(const EntityHandle this_set,
+                      const Range &entities,
                       int dim,
                       Range &skin_entities,
                       bool create_vert_elem_adjs = false);
@@ -189,7 +192,8 @@ protected:
      *                    will contain only those skin elements that already
      *                    exist.
      */
-  ErrorCode find_skin_vertices( const Range& entities,
+  ErrorCode find_skin_vertices( const EntityHandle this_set,
+                                const Range& entities,
                                   Range* skin_verts = 0,
                                   Range* skin_elems = 0,
                                   Range* rev_elems = 0,
@@ -281,7 +285,8 @@ protected:
                      bool create_skin_elements);
 };
 
-inline ErrorCode Skinner::find_skin( const EntityHandle *entities,
+inline ErrorCode Skinner::find_skin( const EntityHandle this_set,
+                                     const EntityHandle *entities,
                                      int num_entities,
                                      bool get_vertices,
                                      Range &output_handles,
@@ -292,7 +297,7 @@ inline ErrorCode Skinner::find_skin( const EntityHandle *entities,
 {
   Range ents;
   std::copy(entities, entities+num_entities, range_inserter(ents));
-  return find_skin(ents, get_vertices, output_handles, output_reverse_handles, 
+  return find_skin(this_set, ents, get_vertices, output_handles, output_reverse_handles,
                    create_vert_elem_adjs, create_skin_elements, look_for_scd);
 }
       

diff --git a/src/parallel/ParallelComm.cpp b/src/parallel/ParallelComm.cpp
index 90bab23..4977f91 100644
--- a/src/parallel/ParallelComm.cpp
+++ b/src/parallel/ParallelComm.cpp
@@ -3575,7 +3575,7 @@ ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
     return resolve_shared_ents(this_set, proc_ents, resolve_dim, shared_dim, id_tag);
   }
   
-  ErrorCode ParallelComm::resolve_shared_ents(EntityHandle /*this_set*/,
+  ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
                                               Range &proc_ents,
                                               int resolve_dim,
                                               int shared_dim,
@@ -3630,7 +3630,7 @@ ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
 
     // find the skin
     Skinner skinner(mbImpl);
-    result = skinner.find_skin(skin_ents[skin_dim+1], false, skin_ents[skin_dim],
+    result = skinner.find_skin(this_set, skin_ents[skin_dim+1], false, skin_ents[skin_dim],
                                NULL, true, true, true);
     RRA("Failed to find skin.");
     myDebug->tprintf(1, "Found skin, now resolving.\n");
@@ -3643,11 +3643,12 @@ ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
       RRA("Failed getting skin adjacencies.");
     }
 
-    return resolve_shared_ents(proc_ents, skin_ents,
+    return resolve_shared_ents(this_set, proc_ents, skin_ents,
                                resolve_dim, shared_dim, id_tag);
   }
 
-  ErrorCode ParallelComm::resolve_shared_ents(Range &proc_ents,
+  ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
+                                              Range &proc_ents,
                                               Range skin_ents[],
                                               int resolve_dim,
                                               int shared_dim,
@@ -3671,7 +3672,7 @@ ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
 
       else if (tag_created) {
         // just created it, so we need global ids
-        result = assign_global_ids(0, skin_dim+1,true,true,true);
+        result = assign_global_ids(this_set, skin_dim+1,true,true,true);
         RRA("Failed assigning global ids.");
       }
     }
@@ -3711,7 +3712,7 @@ ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
     // get total number of entities; will overshoot highest global id, but
     // that's ok
     int num_total[2] = {0, 0}, num_local[2] = {0, 0};
-    result = mbImpl->get_number_entities_by_dimension(0, 0, num_local);
+    result = mbImpl->get_number_entities_by_dimension(this_set, 0, num_local);
     if (MB_SUCCESS != result) return result;
     int failure = MPI_Allreduce(num_local, num_total, 1,
     MPI_INTEGER, MPI_SUM, procConfig.proc_comm());
@@ -3873,6 +3874,7 @@ ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
 
   ErrorCode ParallelComm::resolve_shared_ents(ParallelComm **pc, 
                                               const unsigned int np, 
+                                              EntityHandle this_set,
                                               const int part_dim) 
   {
     std::vector<Range> verts(np);
@@ -3882,9 +3884,9 @@ ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
     for (p = 0; p < np; p++) {
       Skinner skinner(pc[p]->get_moab());
       Range part_ents, skin_ents;
-      rval = pc[p]->get_moab()->get_entities_by_dimension(0, part_dim, part_ents);
+      rval = pc[p]->get_moab()->get_entities_by_dimension(this_set, part_dim, part_ents);
       if (MB_SUCCESS != rval) return rval;
-      rval = skinner.find_skin(part_ents, false, skin_ents, 0, true, true, true);
+      rval = skinner.find_skin(this_set, part_ents, false, skin_ents, 0, true, true, true);
       if (MB_SUCCESS != rval) return rval;
       rval = pc[p]->get_moab()->get_adjacencies(skin_ents, 0, true, verts[p],
                                                 Interface::UNION);
@@ -3951,7 +3953,7 @@ ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
 
     std::set<unsigned int> psets;
     for (p = 0; p < np; p++) {
-      rval = pc[p]->create_interface_sets(part_dim, part_dim-1);
+      rval = pc[p]->create_interface_sets(this_set, part_dim, part_dim-1);
       if (MB_SUCCESS != rval) return rval;
       // establish comm procs and buffers for them
       psets.clear();
@@ -4332,7 +4334,7 @@ ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
 
 
 
-  ErrorCode ParallelComm::create_interface_sets(int resolve_dim, int shared_dim) 
+  ErrorCode ParallelComm::create_interface_sets(EntityHandle this_set, int resolve_dim, int shared_dim)
   {
     std::map<std::vector<int>, std::vector<EntityHandle> > proc_nvecs;
   
@@ -4355,9 +4357,9 @@ ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
                                                   
     Skinner skinner(mbImpl);
     Range skin_ents[4];
-    result = mbImpl->get_entities_by_dimension(0, resolve_dim, skin_ents[resolve_dim]);
+    result = mbImpl->get_entities_by_dimension(this_set, resolve_dim, skin_ents[resolve_dim]);
     RRA("");
-    result = skinner.find_skin(skin_ents[resolve_dim], false, 
+    result = skinner.find_skin(this_set, skin_ents[resolve_dim], false,
                                skin_ents[resolve_dim-1], 0, true, true, true);
     RRA("Failed to find skin.");
     if (shared_dim > 1) {
@@ -6896,7 +6898,8 @@ ErrorCode ParallelComm::post_irecv(std::vector<unsigned int>& shared_procs,
     Range entities;
     if (entities_in.empty()) 
       std::copy(sharedEnts.begin(), sharedEnts.end(), range_inserter(entities));
-    else entities = entities_in;
+    else
+      entities = entities_in;
 
     int dum_ack_buff;
 
@@ -6908,7 +6911,7 @@ ErrorCode ParallelComm::post_irecv(std::vector<unsigned int>& shared_procs,
       result = filter_pstatus(tag_ents, PSTATUS_SHARED, PSTATUS_AND, *sit);
       RRA("Failed pstatus AND check.");
     
-      // remove nonowned entities
+      // remote nonowned entities
       if (!tag_ents.empty()) {
         result = filter_pstatus(tag_ents, PSTATUS_NOT_OWNED, PSTATUS_NOT);
         RRA("Failed pstatus NOT check.");
@@ -6999,7 +7002,8 @@ ErrorCode ParallelComm::post_irecv(std::vector<unsigned int>& shared_procs,
       Range owned_ents;
       if (entities_in.empty()) 
         std::copy(sharedEnts.begin(), sharedEnts.end(), range_inserter(entities));
-      else owned_ents = entities_in;
+      else
+        owned_ents = entities_in;
       result = filter_pstatus(owned_ents, PSTATUS_NOT_OWNED, PSTATUS_NOT);
       RRA("Failure to get subset of owned entities");
   

diff --git a/src/parallel/ParallelMergeMesh.cpp b/src/parallel/ParallelMergeMesh.cpp
index e6e1cd1..f0b99c6 100644
--- a/src/parallel/ParallelMergeMesh.cpp
+++ b/src/parallel/ParallelMergeMesh.cpp
@@ -45,7 +45,7 @@ namespace moab{
     }
     
     //Get the local skin elements
-    rval = PopulateMySkinEnts(dim);
+    rval = PopulateMySkinEnts(0,dim);
     //If there is only 1 proc, we can return now
     if(rval != MB_SUCCESS || myPcomm->size() == 1){
       return rval;
@@ -107,12 +107,12 @@ namespace moab{
   }
 
   //Sets mySkinEnts with all of the skin entities on the processor
-  ErrorCode ParallelMergeMesh::PopulateMySkinEnts(int dim)
+  ErrorCode ParallelMergeMesh::PopulateMySkinEnts(const EntityHandle meshset,int dim)
   {
     /*Merge Mesh Locally*/
     //Get all dim dimensional entities
     Range ents;
-    ErrorCode rval = myMB->get_entities_by_dimension(0,dim,ents);
+    ErrorCode rval = myMB->get_entities_by_dimension(meshset,dim,ents);
     if(rval != MB_SUCCESS){
       return rval;
     }
@@ -137,7 +137,7 @@ namespace moab{
       -skinEnts[i] is the skin entities of dimension i*/  
     Skinner skinner(myMB);
     for(int skin_dim = dim; skin_dim >= 0; skin_dim--){
-      rval = skinner.find_skin(ents,skin_dim,mySkinEnts[skin_dim]);
+      rval = skinner.find_skin(meshset,ents,skin_dim,mySkinEnts[skin_dim]);
       if(rval != MB_SUCCESS){
 	return rval;
       }

diff --git a/src/parallel/moab/ParallelComm.hpp b/src/parallel/moab/ParallelComm.hpp
index 55bdd93..90cbad6 100644
--- a/src/parallel/moab/ParallelComm.hpp
+++ b/src/parallel/moab/ParallelComm.hpp
@@ -437,7 +437,8 @@ namespace moab {
 
      * \param skin_ents[] entity skin array by user
      */
-    ErrorCode resolve_shared_ents(Range &proc_ents,
+    ErrorCode resolve_shared_ents(EntityHandle this_set,
+                                  Range &proc_ents,
 				  Range skin_ents[],
 				  int resolve_dim = 3,
 				  int shared_dim = -1,
@@ -445,6 +446,7 @@ namespace moab {
     
     static ErrorCode resolve_shared_ents(ParallelComm **pc, 
                                          const unsigned int np, 
+                                         EntityHandle this_set,
                                          const int to_dim);
 
     /** Remove shared sets.
@@ -865,7 +867,7 @@ namespace moab {
                                     int resolve_dim, int shared_dim);
 
     // do the same but working straight from sharedEnts
-    ErrorCode create_interface_sets(int resolve_dim, int shared_dim);
+    ErrorCode create_interface_sets(EntityHandle this_set, int resolve_dim, int shared_dim);
 
     ErrorCode tag_shared_verts(TupleList &shared_ents,
 			       std::map<std::vector<int>, std::vector<EntityHandle> > &proc_nvecs,

diff --git a/src/parallel/moab/ParallelMergeMesh.hpp b/src/parallel/moab/ParallelMergeMesh.hpp
index a995bd5..aea3061 100644
--- a/src/parallel/moab/ParallelMergeMesh.hpp
+++ b/src/parallel/moab/ParallelMergeMesh.hpp
@@ -39,7 +39,7 @@ namespace moab {
     //Wrapper of merge() that performs the merge
     ErrorCode PerformMerge();
     //Determine the local skin entities (fills mySkinEnts)
-    ErrorCode PopulateMySkinEnts(int dim);
+    ErrorCode PopulateMySkinEnts(const EntityHandle meshset,int dim);
     //Get the global bounding box
     ErrorCode GetGlobalBox(double *gbox);
     //Fill out the local myTup before the first gather-scatter

diff --git a/test/MBTest.cpp b/test/MBTest.cpp
index 7394c63..df947cf 100644
--- a/test/MBTest.cpp
+++ b/test/MBTest.cpp
@@ -4442,7 +4442,7 @@ ErrorCode mb_merge_test()
       //get Hexes from model
   }
   result = MB->get_entities_by_type(0, MBHEX, entities);
-  Skinner_Obj.find_skin(entities,false,forward_lower,&reverse_lower);
+  Skinner_Obj.find_skin(0,entities,false,forward_lower,&reverse_lower);
   cout <<"num hexes = "<<entities.size()<<"\n";
   cout <<"fl = "<<forward_lower.size()<<" rl = "<<reverse_lower.size()<<"\n";
   
@@ -6146,7 +6146,7 @@ ErrorCode mb_skin_curve_test_common( bool use_adj )
   
   Range skin;
   Skinner tool(mb);
-  rval = tool.find_skin( edges, 0, skin, use_adj );
+  rval = tool.find_skin( 0, edges, 0, skin, use_adj );
   if (MB_SUCCESS != rval) {
     std::cerr << "Skinner failure at " __FILE__ ":" << __LINE__ << std::endl;
     return MB_FAILURE;
@@ -6169,7 +6169,7 @@ ErrorCode mb_skin_curve_test_common( bool use_adj )
   EntityHandle edge = edges.front();
   Range range(edge,edge);
   skin.clear();
-  rval = tool.find_skin( range, 0, skin, use_adj );
+  rval = tool.find_skin( 0, range, 0, skin, use_adj );
   if (MB_SUCCESS != rval) {
     std::cerr << "Skinner failure at " __FILE__ ":" << __LINE__ << std::endl;
     return MB_FAILURE;
@@ -6238,7 +6238,7 @@ ErrorCode mb_skin_surface_test_common( bool use_adj )
   
   Range skin;
   Skinner tool(mb);
-  rval = tool.find_skin( source, 1, skin, use_adj );
+  rval = tool.find_skin( 0, source, 1, skin, use_adj );
   if (MB_SUCCESS != rval) {
     std::cerr << "Skinner failure at " __FILE__ ":" << __LINE__ << std::endl;
     return MB_FAILURE;
@@ -6331,7 +6331,7 @@ ErrorCode mb_skin_volume_test_common( bool use_adj )
   
   Range skin;
   Skinner tool(mb);
-  rval = tool.find_skin( source, 2, skin, use_adj );
+  rval = tool.find_skin( 0, source, 2, skin, use_adj );
   if (MB_SUCCESS != rval) {
     std::cerr << "Skinner failure at " __FILE__ ":" << __LINE__ << std::endl;
     return MB_FAILURE;
@@ -6361,10 +6361,10 @@ ErrorCode mb_skin_scd_test()
   Skinner tool(mb);
   Range ents(this_box->start_element(), this_box->start_element()+this_box->num_elements()-1),
       scd_skin_ents, skin_ents;
-  rval = tool.find_skin(ents, false, scd_skin_ents, NULL, true, true, true);
+  rval = tool.find_skin(0, ents, false, scd_skin_ents, NULL, true, true, true);
   if (MB_SUCCESS != rval) return rval;
 
-  rval = tool.find_skin(ents, false, skin_ents, NULL, true, true, false);
+  rval = tool.find_skin(0, ents, false, skin_ents, NULL, true, true, false);
   if (MB_SUCCESS != rval) return rval;
 
     // should be same number of entities
@@ -6374,10 +6374,10 @@ ErrorCode mb_skin_scd_test()
   scd_skin_ents.clear();
   
     // now test getting faces and vertices, also with existing faces now
-  rval = tool.find_skin(ents, true, scd_skin_ents, NULL, true, true, true);
+  rval = tool.find_skin(0, ents, true, scd_skin_ents, NULL, true, true, true);
   if (MB_SUCCESS != rval) return rval;
 
-  rval = tool.find_skin(ents, true, skin_ents, NULL, true, true, false);
+  rval = tool.find_skin(0, ents, true, skin_ents, NULL, true, true, false);
   if (MB_SUCCESS != rval) return rval;
 
     // again, should have same numbers
@@ -6532,7 +6532,7 @@ ErrorCode mb_skin_verts_common( unsigned dim, bool skin_elems )
   
     // Get skin vertices using skinner
   Range actual;
-  rval = tool.find_skin( ents, !skin_elems, actual );
+  rval = tool.find_skin( 0, ents, !skin_elems, actual );
   if (MB_SUCCESS != rval)
     return rval;
  
@@ -6761,7 +6761,7 @@ ErrorCode mb_skin_poly_test()
   
   Skinner tool(&mb);
   Range skin;
-  rval = tool.find_skin( regions, true, skin, 0, true, false );
+  rval = tool.find_skin( 0, regions, true, skin, 0, true, false );
   if (MB_SUCCESS != rval) {
     std::cout << "Vertex skinning failed with: " << mb.get_error_string(rval) << std::endl;
     return rval;
@@ -6784,7 +6784,7 @@ ErrorCode mb_skin_poly_test()
   }
   
   skin.clear();
-  rval = tool.find_skin( regions, false, skin, 0, true, false );
+  rval = tool.find_skin( 0, regions, false, skin, 0, true, false );
   if (MB_SUCCESS != rval) {
     std::cout << "Non-create face skinning failed with: " << mb.get_error_string(rval) << std::endl;
     return rval;
@@ -6800,7 +6800,7 @@ ErrorCode mb_skin_poly_test()
   }
   
   skin.clear();
-  rval = tool.find_skin( regions, false, skin, 0, true, true );
+  rval = tool.find_skin( 0, regions, false, skin, 0, true, true );
   if (MB_SUCCESS != rval) {
     std::cout << "Create face skinning failed with: " << mb.get_error_string(rval) << std::endl;
     return rval;
@@ -6906,7 +6906,7 @@ ErrorCode mb_skin_higher_order_faces_common( bool use_adj )
   Skinner tool(&mb);
   Range skin;
   
-  rval = tool.find_skin( faces, true, skin, 0, use_adj, false );
+  rval = tool.find_skin( 0, faces, true, skin, 0, use_adj, false );
   if (MB_SUCCESS != rval) {
     std::cout << "Vertex skinning failed with: " << mb.get_error_string(rval) << std::endl;
     return rval;
@@ -6919,7 +6919,7 @@ ErrorCode mb_skin_higher_order_faces_common( bool use_adj )
   const int skin_edges[5][3] = {
     {0,1,2}, {2,3,4}, {4,9,12}, {12,11,10}, {10,5,0} };
   skin.clear();
-  rval = tool.find_skin( faces, false, skin, 0, use_adj, true );
+  rval = tool.find_skin( 0, faces, false, skin, 0, use_adj, true );
   if (MB_SUCCESS != rval) {
     std::cout << "Edge skinning failed with: " << mb.get_error_string(rval) << std::endl;
     return rval;
@@ -7034,7 +7034,7 @@ ErrorCode mb_skin_higher_order_regions_common( bool use_adj )
   Skinner tool(&mb);
   Range skin;
 
-  rval = tool.find_skin( hexes, true, skin, 0, use_adj, false );
+  rval = tool.find_skin( 0, hexes, true, skin, 0, use_adj, false );
   if (MB_SUCCESS != rval) {
     std::cout << "Vertex skinning failed with: " << mb.get_error_string(rval) 
               << std::endl;
@@ -7057,7 +7057,7 @@ ErrorCode mb_skin_higher_order_regions_common( bool use_adj )
   }
   
   skin.clear();
-  rval = tool.find_skin( hexes, false, skin, 0, use_adj, true );
+  rval = tool.find_skin( 0, hexes, false, skin, 0, use_adj, true );
   if (MB_SUCCESS != rval) {
     std::cout << "Element skinning failed with: " << mb.get_error_string(rval) << std::endl;
     return rval;
@@ -7202,7 +7202,7 @@ ErrorCode mb_skin_reversed_common( int dim, bool use_adj )
   
   Range forward, reverse;
   Skinner tool(&mb);
-  rval = tool.find_skin( elems, false, forward, &reverse, use_adj, true );
+  rval = tool.find_skin( 0, elems, false, forward, &reverse, use_adj, true );
   if (MB_SUCCESS != rval) {
     std::cout << "Skinner failed." << std::endl;
     return rval;
@@ -7284,7 +7284,7 @@ ErrorCode mb_skin_subset_common( int dimension, bool use_adj )
   
   Range skin;
   Skinner tool(&mb);
-  rval = tool.find_skin( input, true, skin, 0, use_adj, false );
+  rval = tool.find_skin( 0, input, true, skin, 0, use_adj, false );
   if (MB_SUCCESS != rval) {
     std::cout << "Skinner failed to find skin vertices" << std::endl;
     return MB_FAILURE;
@@ -7303,7 +7303,7 @@ ErrorCode mb_skin_subset_common( int dimension, bool use_adj )
   std::vector<EntityHandle> sv( skin.begin(), skin.end() );
   std::vector<int> counts( sv.size(), 0 );
   skin.clear();
-  rval = tool.find_skin( input, false, skin, 0, use_adj, true );
+  rval = tool.find_skin( 0, input, false, skin, 0, use_adj, true );
   if (MB_SUCCESS != rval) {
     std::cout << "Skinner failed to find skin elements" << std::endl;
     return MB_FAILURE;
@@ -7418,7 +7418,7 @@ ErrorCode mb_skin_full_common( int dimension, bool use_adj )
   
   Range skin;
   Skinner tool(&mb);
-  rval = tool.find_skin( input, false, skin, 0, use_adj, true );
+  rval = tool.find_skin( 0, input, false, skin, 0, use_adj, true );
   if (MB_SUCCESS != rval) {
     std::cout << "Skinner failed to find skin elements" << std::endl;
     return MB_FAILURE;
@@ -7552,7 +7552,7 @@ ErrorCode mb_skin_adjacent_surf_patches()
     Range edges[4];
     for (int grp = 0; grp < 4; ++grp) {
         // get the skin edges
-      rval = tool.find_skin( ranges[grp], 1, edges[grp], use_adj );
+      rval = tool.find_skin( 0, ranges[grp], 1, edges[grp], use_adj );
       if (MB_SUCCESS != rval) {
         std::cout << "Skinner failed for run " << run << " group " << grp << std::endl;
         return rval;

diff --git a/test/parallel/parallel_hdf5_test.cc b/test/parallel/parallel_hdf5_test.cc
index 680d4bd..2b2a1c8 100644
--- a/test/parallel/parallel_hdf5_test.cc
+++ b/test/parallel/parallel_hdf5_test.cc
@@ -335,9 +335,9 @@ void print_partitioned_entities( Interface& moab, bool list_non_shared = false )
           else {
             buffer << rank << ":\t" << topo_names_s[t] << " " << id << ":\t"
                    << "processors ";
-            for (int j = 0; j < MAX_SHARING_PROCS; ++j)
-              if (ent_procs[j] != -1)
-                buffer << ent_procs[j] << ", ";
+            for (int k = 0; k < MAX_SHARING_PROCS; ++k)
+              if (ent_procs[k] != -1)
+                buffer << ent_procs[k] << ", ";
             if (num_owned)
               buffer << " (owned by this processor)";
             buffer << std::endl;
@@ -856,7 +856,7 @@ void create_input_file( const char* file_name,
   if (create_bcsets) {
       // neumann set
     Range skin_ents;
-    rval = Skinner(&mb).find_skin(&elems[0], elems.size(), false, skin_ents);
+    rval = Skinner(&mb).find_skin(0, &elems[0], elems.size(), false, skin_ents);
     CHECK_ERR(rval);
     EntityHandle bcset;
     rval = mb.create_meshset( MESHSET_SET, bcset);

diff --git a/test/parallel/parmerge.cpp b/test/parallel/parmerge.cpp
index aef7987..f29445d 100644
--- a/test/parallel/parmerge.cpp
+++ b/test/parallel/parmerge.cpp
@@ -169,7 +169,7 @@ void print_output(moab::ParallelComm *pc, moab::Core *mb,
     skin.clear();
     ents.clear();
     mb->get_entities_by_dimension(0,3,ents);
-    skinner.find_skin(ents, 2, skin);
+    skinner.find_skin(0, ents, 2, skin);
     for(moab::Range::iterator s_rit = skin.begin(); 
         s_rit != skin.end(); s_rit++){
       pc->get_owner(*s_rit, tmp);

diff --git a/test/parallel/pcomm_serial.cpp b/test/parallel/pcomm_serial.cpp
index dd6752e..5e63851 100644
--- a/test/parallel/pcomm_serial.cpp
+++ b/test/parallel/pcomm_serial.cpp
@@ -81,7 +81,7 @@ int main( int argc, char* argv[] )
     CHECK_ERR(rval);
   }
   
-  rval = ParallelComm::resolve_shared_ents(&pc[0], nprocs, 3);
+  rval = ParallelComm::resolve_shared_ents(&pc[0], nprocs, 0, 3);
   CHECK_ERR(rval);
 
     // exchange interface cells

diff --git a/test/parallel/pcomm_unit.cpp b/test/parallel/pcomm_unit.cpp
index 5e1c5d3..f0eb372 100644
--- a/test/parallel/pcomm_unit.cpp
+++ b/test/parallel/pcomm_unit.cpp
@@ -326,7 +326,7 @@ ErrorCode create_shared_grid_2d(ParallelComm **pc, Range *verts, Range *quads)
     create_patch(pc[i]->get_moab(), verts[i], quads[i], 3, xyztmp, &gids[9*i]);
   }
 
-  ErrorCode rval = ParallelComm::resolve_shared_ents(pc, 4, 2);
+  ErrorCode rval = ParallelComm::resolve_shared_ents(pc, 4, 0, 2);
   CHECK_ERR(rval);
 
   return rval;
@@ -362,8 +362,8 @@ ErrorCode create_shared_grid_3d(ParallelComm **pc, Range *verts, Range *hexes)
                          (j-ijkmin[p][1])*nijk[p][0] + (i - ijkmin[p][0]))
 
   int p, i, j, k;
-  for (int p = 0; p < P; p++) {
-    for (int i = 0; i < 3; i++) {
+  for (p = 0; p < P; p++) {
+    for (i = 0; i < 3; i++) {
       nijk[p][i] =  ijkmax[p][i] - ijkmin[p][i] + 1;
       NIJK[i] = std::max(NIJK[i], nijk[p][i]);
     }
@@ -434,7 +434,7 @@ ErrorCode create_shared_grid_3d(ParallelComm **pc, Range *verts, Range *hexes)
     rval = pc[p]->get_moab()->write_file(fname.str().c_str());
     if (MB_SUCCESS != rval) return rval;
   }
-  rval = ParallelComm::resolve_shared_ents(pc, 4, 3);
+  rval = ParallelComm::resolve_shared_ents(pc, 4, 0, 3);
   CHECK_ERR(rval);
   return rval;
 }
@@ -1216,10 +1216,10 @@ void test_pack_set_parent_child()
     // look for a set with two child links (set3)
   set1 = set2 = set3 = 0;
   for (Range::iterator i = sets.begin(); i != sets.end(); ++i) {
-    int count;
-    rval = moab.num_child_meshsets( *i, &count );
+    int mcount;
+    rval = moab.num_child_meshsets( *i, &mcount );
     CHECK_ERR(rval);
-    if (count == 2) {
+    if (mcount == 2) {
       set3 = *i;
       break;
     }
@@ -1662,12 +1662,12 @@ void test_pack_variable_length_tag()
     rval = mb.get_coords( &*i, 1, coords );
     CHECK_ERR(rval);
     
-    int size;
+    int tsize;
     const void* valptr;
-    rval = mb.tag_get_by_ptr( tag, &*i, 1, &valptr, &size );
+    rval = mb.tag_get_by_ptr( tag, &*i, 1, &valptr, &tsize );
     CHECK_ERR(rval);
-    CHECK( size > 1 );
-    CHECK( size <= 4 );
+    CHECK( tsize > 1 );
+    CHECK( tsize <= 4 );
     
     const int* valarr = reinterpret_cast<const int*>(valptr);
     CHECK( valarr[0] >= 1 );
@@ -1889,14 +1889,14 @@ void test_filter_pstatus()
   rval = mb.get_entities_by_type( 0, MBVERTEX, dum_vertsr );
   CHECK_ERR(rval);
   vertsr.insert(dum_vertsr[0], dum_vertsr[8]);
-  for (unsigned int i = 0; i < 9; i++) verts.push_back(vertsr[i]);
+  for (int k = 0; k < 9; k++) verts.push_back(vertsr[k]);
 
   CHECK( !verts.empty() );
  
   ParallelComm *pcomm = new ParallelComm( &moab, MPI_COMM_WORLD );
 
   std::vector<int> procs(70, -1);
-  for (unsigned int i = 0; i < 6; i++) procs[i] = i;
+  for (int k = 0; k < 6; k++) procs[k] = k;
 
   std::vector<unsigned char> pvals(verts.size(), 0);
     // interface, owned

diff --git a/test/perf/perftool.cpp b/test/perf/perftool.cpp
index 26bf73d..c02273a 100644
--- a/test/perf/perftool.cpp
+++ b/test/perf/perftool.cpp
@@ -266,7 +266,7 @@ void skin_common( int interval, int dim, int num, bool use_adj )
   Skinner tool(gMB);
   
   t = clock();
-  rval = tool.find_skin( elems, true, verts, 0, use_adj, false );
+  rval = tool.find_skin( 0, elems, true, verts, 0, use_adj, false );
   t = clock() - t;
   if (MB_SUCCESS != rval) {
     std::cerr << "Search for skin vertices failed" << std::endl;
@@ -288,7 +288,7 @@ void skin_common( int interval, int dim, int num, bool use_adj )
     blockelems.merge( it, end );
     it = end;
     tt = clock();
-    rval = tool.find_skin( blockelems, true, verts, 0, use_adj, false );
+    rval = tool.find_skin( 0, blockelems, true, verts, 0, use_adj, false );
     t += clock() - tt;
     if (MB_SUCCESS != rval) {
       std::cerr << "Search for skin vertices failed" << std::endl;
@@ -312,7 +312,7 @@ void skin_common( int interval, int dim, int num, bool use_adj )
   
     skin.clear();
     t = clock();
-    rval = tool.find_skin( elems, false, skin, 0, use_adj, true );
+    rval = tool.find_skin( 0, elems, false, skin, 0, use_adj, true );
     t = clock() - t;
     if (MB_SUCCESS != rval) {
       std::cerr << "Search for skin vertices failed" << std::endl;
@@ -330,7 +330,7 @@ void skin_common( int interval, int dim, int num, bool use_adj )
       blockelems.merge( it, end );
       it = end;
       tt = clock();
-      rval = tool.find_skin( blockelems, false, skin, 0, use_adj, true );
+      rval = tool.find_skin( 0, blockelems, false, skin, 0, use_adj, true );
       t += clock() - tt;
       if (MB_SUCCESS != rval) {
         std::cerr << "Search for skin elements failed" << std::endl;

diff --git a/tools/depth.cpp b/tools/depth.cpp
index 1a63c52..080d1b7 100644
--- a/tools/depth.cpp
+++ b/tools/depth.cpp
@@ -126,7 +126,7 @@ void tag_depth( Interface& mb, Tag tag )
     if (--dim == 0)
       return; // no elements
   }
-  rval = tool.find_skin( elems, 0, verts ); check(rval);
+  rval = tool.find_skin( 0, elems, 0, verts ); check(rval);
   rval = get_adjacent_elems( mb, verts, elems ); check(rval);
   
   std::vector<int> data;

diff --git a/tools/skin.cpp b/tools/skin.cpp
index 9c126a0..66f0739 100644
--- a/tools/skin.cpp
+++ b/tools/skin.cpp
@@ -264,9 +264,9 @@ int main( int argc, char* argv[] )
   Range forward_lower, reverse_lower;
   Skinner tool( iface );
   if (use_scd) 
-    result = tool.find_skin( skin_ents, false, forward_lower, NULL, false, true, true);
+    result = tool.find_skin( 0, skin_ents, false, forward_lower, NULL, false, true, true);
   else
-    result = tool.find_skin( skin_ents, false, forward_lower, &reverse_lower );
+    result = tool.find_skin( 0, skin_ents, false, forward_lower, &reverse_lower );
   Range boundary;
   boundary.merge( forward_lower );
   boundary.merge( reverse_lower );


https://bitbucket.org/fathomteam/moab/commits/2a15d27204df/
Changeset:   2a15d27204df
Branch:      master
User:        iulian07
Date:        2013-08-19 19:40:29
Summary:     Merged in vijaysm/moab/skinnerfix (pull request #10)

API breaking interface changes to allow flexible data manipulation with file sets.
Affected #:  16 files

diff --git a/src/GeomTopoTool.cpp b/src/GeomTopoTool.cpp
index a302f0c..8f74453 100644
--- a/src/GeomTopoTool.cpp
+++ b/src/GeomTopoTool.cpp
@@ -901,7 +901,7 @@ ErrorCode GeomTopoTool::geometrize_surface_set(EntityHandle surface, EntityHandl
 
 
   Skinner tool(mdbImpl);
-  rval = tool.find_skin(surface_ents, 1, edge_ents);
+  rval = tool.find_skin(0, surface_ents, 1, edge_ents);
   if (MB_SUCCESS != rval)
     return rval;
   if (debugFlag)
@@ -1472,7 +1472,7 @@ bool GeomTopoTool::check_model()
     if (MB_SUCCESS!=rval)
       RETFALSE(" can't get surface elements from the face set ", faceSet)
 
-    rval = tool.find_skin(surface_ents, 1, edge_ents);
+    rval = tool.find_skin(0, surface_ents, 1, edge_ents);
     if (MB_SUCCESS != rval)
       RETFALSE("can't skin a surface ", surface_ents[0])
 

diff --git a/src/MergeMesh.cpp b/src/MergeMesh.cpp
index 3ea7623..71119a3 100644
--- a/src/MergeMesh.cpp
+++ b/src/MergeMesh.cpp
@@ -61,7 +61,7 @@ moab::ErrorCode MergeMesh::merge_entities(moab::Range &elems,
   // get the skin of the entities
   moab::Skinner skinner(mbImpl);
   moab::Range skin_range;
-  moab::ErrorCode result = skinner.find_skin(elems, 0, skin_range);
+  moab::ErrorCode result = skinner.find_skin(0, elems, 0, skin_range);
   if (moab::MB_SUCCESS != result) return result;
 
   // create a tag to mark merged-to entity; reuse tree_root
@@ -232,7 +232,7 @@ moab::ErrorCode MergeMesh::merge_higher_dimensions(moab::Range &elems)
   for(int dim = 1; dim <3; dim++){
     skinEnts.clear();
     moreDeadEnts.clear();
-    result = skinner.find_skin(elems, dim, skinEnts);
+    result = skinner.find_skin(0, elems, dim, skinEnts);
     //Go through each skin entity and see if it shares adjacancies with another entity
     for(moab::Range::iterator skinIt = skinEnts.begin(); skinIt != skinEnts.end(); skinIt++){
       adj.clear();

diff --git a/src/Skinner.cpp b/src/Skinner.cpp
index 5869777..57b3d51 100644
--- a/src/Skinner.cpp
+++ b/src/Skinner.cpp
@@ -185,7 +185,7 @@ void Skinner::add_adjacency(EntityHandle entity,
   }
 }
 
-ErrorCode Skinner::find_geometric_skin(Range &forward_target_entities) 
+ErrorCode Skinner::find_geometric_skin(const EntityHandle meshset, Range &forward_target_entities)
 {
     // attempts to find whole model skin, using geom topo sets first then
     // normal find_skin function
@@ -203,7 +203,7 @@ ErrorCode Skinner::find_geometric_skin(Range &forward_target_entities)
   Range face_sets;
   int two = 2;
   const void *two_ptr = &two;
-  result = thisMB->get_entities_by_type_and_tag(0, MBENTITYSET, &geom_tag, &two_ptr, 1,
+  result = thisMB->get_entities_by_type_and_tag(meshset, MBENTITYSET, &geom_tag, &two_ptr, 1,
                                                  face_sets);
 
   Range::iterator it;
@@ -240,7 +240,8 @@ ErrorCode Skinner::find_geometric_skin(Range &forward_target_entities)
   return result;
 }
 
-ErrorCode Skinner::find_skin( const Range& source_entities,
+ErrorCode Skinner::find_skin( const EntityHandle meshset,
+                              const Range& source_entities,
                               bool get_vertices,
                               Range& output_handles,
                               Range* output_reverse_handles,
@@ -264,7 +265,8 @@ ErrorCode Skinner::find_skin( const Range& source_entities,
     this_core->a_entity_factory()->create_vert_elem_adjacencies();
     
   if (this_core && this_core->a_entity_factory()->vert_elem_adjacencies())
-    return find_skin_vertices( source_entities, 
+    return find_skin_vertices( meshset,
+                               source_entities,
                                get_vertices ? &output_handles : 0,
                                get_vertices ? 0 : &output_handles,
                                output_reverse_handles,
@@ -276,7 +278,7 @@ ErrorCode Skinner::find_skin( const Range& source_entities,
   if (!source_entities.all_of_dimension(d))
     return MB_TYPE_OUT_OF_RANGE;
   
-  rval = thisMB->get_entities_by_dimension( 0, d-1, prev );
+  rval = thisMB->get_entities_by_dimension( meshset, d-1, prev );
   if (MB_SUCCESS != rval)
     return rval;
   
@@ -297,7 +299,7 @@ ErrorCode Skinner::find_skin( const Range& source_entities,
   
   if (!create_skin_elements) {
     Range new_skin;
-    rval = thisMB->get_entities_by_dimension( 0, d-1, new_skin);
+    rval = thisMB->get_entities_by_dimension( meshset, d-1, new_skin);
     if (MB_SUCCESS != rval)
       return rval;
     new_skin = subtract( new_skin, prev );
@@ -1062,13 +1064,14 @@ bool Skinner::has_larger_angle(EntityHandle &entity1,
 }
 
   // get skin entities of prescribed dimension
-ErrorCode Skinner::find_skin(const Range &entities,
+ErrorCode Skinner::find_skin(const EntityHandle this_set,
+                             const Range &entities,
                                  int dim,
                                  Range &skin_entities,
                                  bool create_vert_elem_adjs) 
 {
   Range tmp_skin;
-  ErrorCode result = find_skin(entities, (dim==0), tmp_skin, 0, 
+  ErrorCode result = find_skin(this_set, entities, (dim==0), tmp_skin, 0,
                                  create_vert_elem_adjs, true);
   if (MB_SUCCESS != result || tmp_skin.empty()) return result;
   
@@ -1086,7 +1089,8 @@ ErrorCode Skinner::find_skin(const Range &entities,
   return result;
 }
 
-ErrorCode Skinner::find_skin_vertices( const Range& entities,
+ErrorCode Skinner::find_skin_vertices( const EntityHandle this_set,
+                                       const Range& entities,
                                            Range* skin_verts,
                                            Range* skin_elems,
                                            Range* skin_rev_elems,
@@ -1104,7 +1108,7 @@ ErrorCode Skinner::find_skin_vertices( const Range& entities,
     // are we skinning all entities
   size_t count = entities.size();
   int num_total;
-  rval = thisMB->get_number_entities_by_dimension( 0, dim, num_total );
+  rval = thisMB->get_number_entities_by_dimension( this_set, dim, num_total );
   if (MB_SUCCESS != rval)
     return rval;
   bool all = (count == (size_t)num_total);

diff --git a/src/moab/Skinner.hpp b/src/moab/Skinner.hpp
index 94463af..7ec5450 100644
--- a/src/moab/Skinner.hpp
+++ b/src/moab/Skinner.hpp
@@ -54,7 +54,7 @@ public:
   //! destructor
   ~Skinner();
 
-  ErrorCode find_geometric_skin(Range &forward_target_entities);
+  ErrorCode find_geometric_skin(const EntityHandle meshset, Range &forward_target_entities);
   
     /**\brief will accept entities all of one dimension and 
      *        return entities of n-1 dimension; NOTE: get_vertices argument controls whether
@@ -72,7 +72,8 @@ public:
      *        of skin entities, otherwise only skin entities already extant 
      *        will be returned
      */
-  ErrorCode find_skin( const Range &entities,
+  ErrorCode find_skin( const EntityHandle meshset,
+                       const Range &entities,
                        bool get_vertices,
                        Range &output_handles,
                        Range *output_reverse_handles = 0,
@@ -97,7 +98,8 @@ public:
      *        of skin entities, otherwise only skin entities already extant 
      *        will be returned
      */
-  ErrorCode find_skin( const EntityHandle *entities,
+  ErrorCode find_skin( const EntityHandle this_set,
+                       const EntityHandle *entities,
                        int num_entities,
                        bool get_vertices,
                        Range &output_handles,
@@ -113,7 +115,8 @@ public:
      * \param create_vert_elem_adjs If true, this function will cause 
      *        vertex-element adjacencies to be generated
      */
-  ErrorCode find_skin(const Range &entities,
+  ErrorCode find_skin(const EntityHandle this_set,
+                      const Range &entities,
                       int dim,
                       Range &skin_entities,
                       bool create_vert_elem_adjs = false);
@@ -189,7 +192,8 @@ protected:
      *                    will contain only those skin elements that already
      *                    exist.
      */
-  ErrorCode find_skin_vertices( const Range& entities,
+  ErrorCode find_skin_vertices( const EntityHandle this_set,
+                                const Range& entities,
                                   Range* skin_verts = 0,
                                   Range* skin_elems = 0,
                                   Range* rev_elems = 0,
@@ -281,7 +285,8 @@ protected:
                      bool create_skin_elements);
 };
 
-inline ErrorCode Skinner::find_skin( const EntityHandle *entities,
+inline ErrorCode Skinner::find_skin( const EntityHandle this_set,
+                                     const EntityHandle *entities,
                                      int num_entities,
                                      bool get_vertices,
                                      Range &output_handles,
@@ -292,7 +297,7 @@ inline ErrorCode Skinner::find_skin( const EntityHandle *entities,
 {
   Range ents;
   std::copy(entities, entities+num_entities, range_inserter(ents));
-  return find_skin(ents, get_vertices, output_handles, output_reverse_handles, 
+  return find_skin(this_set, ents, get_vertices, output_handles, output_reverse_handles,
                    create_vert_elem_adjs, create_skin_elements, look_for_scd);
 }
       

diff --git a/src/parallel/ParallelComm.cpp b/src/parallel/ParallelComm.cpp
index 90bab23..4977f91 100644
--- a/src/parallel/ParallelComm.cpp
+++ b/src/parallel/ParallelComm.cpp
@@ -3575,7 +3575,7 @@ ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
     return resolve_shared_ents(this_set, proc_ents, resolve_dim, shared_dim, id_tag);
   }
   
-  ErrorCode ParallelComm::resolve_shared_ents(EntityHandle /*this_set*/,
+  ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
                                               Range &proc_ents,
                                               int resolve_dim,
                                               int shared_dim,
@@ -3630,7 +3630,7 @@ ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
 
     // find the skin
     Skinner skinner(mbImpl);
-    result = skinner.find_skin(skin_ents[skin_dim+1], false, skin_ents[skin_dim],
+    result = skinner.find_skin(this_set, skin_ents[skin_dim+1], false, skin_ents[skin_dim],
                                NULL, true, true, true);
     RRA("Failed to find skin.");
     myDebug->tprintf(1, "Found skin, now resolving.\n");
@@ -3643,11 +3643,12 @@ ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
       RRA("Failed getting skin adjacencies.");
     }
 
-    return resolve_shared_ents(proc_ents, skin_ents,
+    return resolve_shared_ents(this_set, proc_ents, skin_ents,
                                resolve_dim, shared_dim, id_tag);
   }
 
-  ErrorCode ParallelComm::resolve_shared_ents(Range &proc_ents,
+  ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
+                                              Range &proc_ents,
                                               Range skin_ents[],
                                               int resolve_dim,
                                               int shared_dim,
@@ -3671,7 +3672,7 @@ ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
 
       else if (tag_created) {
         // just created it, so we need global ids
-        result = assign_global_ids(0, skin_dim+1,true,true,true);
+        result = assign_global_ids(this_set, skin_dim+1,true,true,true);
         RRA("Failed assigning global ids.");
       }
     }
@@ -3711,7 +3712,7 @@ ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
     // get total number of entities; will overshoot highest global id, but
     // that's ok
     int num_total[2] = {0, 0}, num_local[2] = {0, 0};
-    result = mbImpl->get_number_entities_by_dimension(0, 0, num_local);
+    result = mbImpl->get_number_entities_by_dimension(this_set, 0, num_local);
     if (MB_SUCCESS != result) return result;
     int failure = MPI_Allreduce(num_local, num_total, 1,
     MPI_INTEGER, MPI_SUM, procConfig.proc_comm());
@@ -3873,6 +3874,7 @@ ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
 
   ErrorCode ParallelComm::resolve_shared_ents(ParallelComm **pc, 
                                               const unsigned int np, 
+                                              EntityHandle this_set,
                                               const int part_dim) 
   {
     std::vector<Range> verts(np);
@@ -3882,9 +3884,9 @@ ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
     for (p = 0; p < np; p++) {
       Skinner skinner(pc[p]->get_moab());
       Range part_ents, skin_ents;
-      rval = pc[p]->get_moab()->get_entities_by_dimension(0, part_dim, part_ents);
+      rval = pc[p]->get_moab()->get_entities_by_dimension(this_set, part_dim, part_ents);
       if (MB_SUCCESS != rval) return rval;
-      rval = skinner.find_skin(part_ents, false, skin_ents, 0, true, true, true);
+      rval = skinner.find_skin(this_set, part_ents, false, skin_ents, 0, true, true, true);
       if (MB_SUCCESS != rval) return rval;
       rval = pc[p]->get_moab()->get_adjacencies(skin_ents, 0, true, verts[p],
                                                 Interface::UNION);
@@ -3951,7 +3953,7 @@ ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
 
     std::set<unsigned int> psets;
     for (p = 0; p < np; p++) {
-      rval = pc[p]->create_interface_sets(part_dim, part_dim-1);
+      rval = pc[p]->create_interface_sets(this_set, part_dim, part_dim-1);
       if (MB_SUCCESS != rval) return rval;
       // establish comm procs and buffers for them
       psets.clear();
@@ -4332,7 +4334,7 @@ ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
 
 
 
-  ErrorCode ParallelComm::create_interface_sets(int resolve_dim, int shared_dim) 
+  ErrorCode ParallelComm::create_interface_sets(EntityHandle this_set, int resolve_dim, int shared_dim)
   {
     std::map<std::vector<int>, std::vector<EntityHandle> > proc_nvecs;
   
@@ -4355,9 +4357,9 @@ ErrorCode ParallelComm::resolve_shared_ents(EntityHandle this_set,
                                                   
     Skinner skinner(mbImpl);
     Range skin_ents[4];
-    result = mbImpl->get_entities_by_dimension(0, resolve_dim, skin_ents[resolve_dim]);
+    result = mbImpl->get_entities_by_dimension(this_set, resolve_dim, skin_ents[resolve_dim]);
     RRA("");
-    result = skinner.find_skin(skin_ents[resolve_dim], false, 
+    result = skinner.find_skin(this_set, skin_ents[resolve_dim], false,
                                skin_ents[resolve_dim-1], 0, true, true, true);
     RRA("Failed to find skin.");
     if (shared_dim > 1) {
@@ -6896,7 +6898,8 @@ ErrorCode ParallelComm::post_irecv(std::vector<unsigned int>& shared_procs,
     Range entities;
     if (entities_in.empty()) 
       std::copy(sharedEnts.begin(), sharedEnts.end(), range_inserter(entities));
-    else entities = entities_in;
+    else
+      entities = entities_in;
 
     int dum_ack_buff;
 
@@ -6908,7 +6911,7 @@ ErrorCode ParallelComm::post_irecv(std::vector<unsigned int>& shared_procs,
       result = filter_pstatus(tag_ents, PSTATUS_SHARED, PSTATUS_AND, *sit);
       RRA("Failed pstatus AND check.");
     
-      // remove nonowned entities
+      // remote nonowned entities
       if (!tag_ents.empty()) {
         result = filter_pstatus(tag_ents, PSTATUS_NOT_OWNED, PSTATUS_NOT);
         RRA("Failed pstatus NOT check.");
@@ -6999,7 +7002,8 @@ ErrorCode ParallelComm::post_irecv(std::vector<unsigned int>& shared_procs,
       Range owned_ents;
       if (entities_in.empty()) 
         std::copy(sharedEnts.begin(), sharedEnts.end(), range_inserter(entities));
-      else owned_ents = entities_in;
+      else
+        owned_ents = entities_in;
       result = filter_pstatus(owned_ents, PSTATUS_NOT_OWNED, PSTATUS_NOT);
       RRA("Failure to get subset of owned entities");
   

diff --git a/src/parallel/ParallelMergeMesh.cpp b/src/parallel/ParallelMergeMesh.cpp
index e6e1cd1..f0b99c6 100644
--- a/src/parallel/ParallelMergeMesh.cpp
+++ b/src/parallel/ParallelMergeMesh.cpp
@@ -45,7 +45,7 @@ namespace moab{
     }
     
     //Get the local skin elements
-    rval = PopulateMySkinEnts(dim);
+    rval = PopulateMySkinEnts(0,dim);
     //If there is only 1 proc, we can return now
     if(rval != MB_SUCCESS || myPcomm->size() == 1){
       return rval;
@@ -107,12 +107,12 @@ namespace moab{
   }
 
   //Sets mySkinEnts with all of the skin entities on the processor
-  ErrorCode ParallelMergeMesh::PopulateMySkinEnts(int dim)
+  ErrorCode ParallelMergeMesh::PopulateMySkinEnts(const EntityHandle meshset,int dim)
   {
     /*Merge Mesh Locally*/
     //Get all dim dimensional entities
     Range ents;
-    ErrorCode rval = myMB->get_entities_by_dimension(0,dim,ents);
+    ErrorCode rval = myMB->get_entities_by_dimension(meshset,dim,ents);
     if(rval != MB_SUCCESS){
       return rval;
     }
@@ -137,7 +137,7 @@ namespace moab{
       -skinEnts[i] is the skin entities of dimension i*/  
     Skinner skinner(myMB);
     for(int skin_dim = dim; skin_dim >= 0; skin_dim--){
-      rval = skinner.find_skin(ents,skin_dim,mySkinEnts[skin_dim]);
+      rval = skinner.find_skin(meshset,ents,skin_dim,mySkinEnts[skin_dim]);
       if(rval != MB_SUCCESS){
 	return rval;
       }

diff --git a/src/parallel/moab/ParallelComm.hpp b/src/parallel/moab/ParallelComm.hpp
index 55bdd93..90cbad6 100644
--- a/src/parallel/moab/ParallelComm.hpp
+++ b/src/parallel/moab/ParallelComm.hpp
@@ -437,7 +437,8 @@ namespace moab {
 
      * \param skin_ents[] entity skin array by user
      */
-    ErrorCode resolve_shared_ents(Range &proc_ents,
+    ErrorCode resolve_shared_ents(EntityHandle this_set,
+                                  Range &proc_ents,
 				  Range skin_ents[],
 				  int resolve_dim = 3,
 				  int shared_dim = -1,
@@ -445,6 +446,7 @@ namespace moab {
     
     static ErrorCode resolve_shared_ents(ParallelComm **pc, 
                                          const unsigned int np, 
+                                         EntityHandle this_set,
                                          const int to_dim);
 
     /** Remove shared sets.
@@ -865,7 +867,7 @@ namespace moab {
                                     int resolve_dim, int shared_dim);
 
     // do the same but working straight from sharedEnts
-    ErrorCode create_interface_sets(int resolve_dim, int shared_dim);
+    ErrorCode create_interface_sets(EntityHandle this_set, int resolve_dim, int shared_dim);
 
     ErrorCode tag_shared_verts(TupleList &shared_ents,
 			       std::map<std::vector<int>, std::vector<EntityHandle> > &proc_nvecs,

diff --git a/src/parallel/moab/ParallelMergeMesh.hpp b/src/parallel/moab/ParallelMergeMesh.hpp
index a995bd5..aea3061 100644
--- a/src/parallel/moab/ParallelMergeMesh.hpp
+++ b/src/parallel/moab/ParallelMergeMesh.hpp
@@ -39,7 +39,7 @@ namespace moab {
     //Wrapper of merge() that performs the merge
     ErrorCode PerformMerge();
     //Determine the local skin entities (fills mySkinEnts)
-    ErrorCode PopulateMySkinEnts(int dim);
+    ErrorCode PopulateMySkinEnts(const EntityHandle meshset,int dim);
     //Get the global bounding box
     ErrorCode GetGlobalBox(double *gbox);
     //Fill out the local myTup before the first gather-scatter

diff --git a/test/MBTest.cpp b/test/MBTest.cpp
index 7394c63..df947cf 100644
--- a/test/MBTest.cpp
+++ b/test/MBTest.cpp
@@ -4442,7 +4442,7 @@ ErrorCode mb_merge_test()
       //get Hexes from model
   }
   result = MB->get_entities_by_type(0, MBHEX, entities);
-  Skinner_Obj.find_skin(entities,false,forward_lower,&reverse_lower);
+  Skinner_Obj.find_skin(0,entities,false,forward_lower,&reverse_lower);
   cout <<"num hexes = "<<entities.size()<<"\n";
   cout <<"fl = "<<forward_lower.size()<<" rl = "<<reverse_lower.size()<<"\n";
   
@@ -6146,7 +6146,7 @@ ErrorCode mb_skin_curve_test_common( bool use_adj )
   
   Range skin;
   Skinner tool(mb);
-  rval = tool.find_skin( edges, 0, skin, use_adj );
+  rval = tool.find_skin( 0, edges, 0, skin, use_adj );
   if (MB_SUCCESS != rval) {
     std::cerr << "Skinner failure at " __FILE__ ":" << __LINE__ << std::endl;
     return MB_FAILURE;
@@ -6169,7 +6169,7 @@ ErrorCode mb_skin_curve_test_common( bool use_adj )
   EntityHandle edge = edges.front();
   Range range(edge,edge);
   skin.clear();
-  rval = tool.find_skin( range, 0, skin, use_adj );
+  rval = tool.find_skin( 0, range, 0, skin, use_adj );
   if (MB_SUCCESS != rval) {
     std::cerr << "Skinner failure at " __FILE__ ":" << __LINE__ << std::endl;
     return MB_FAILURE;
@@ -6238,7 +6238,7 @@ ErrorCode mb_skin_surface_test_common( bool use_adj )
   
   Range skin;
   Skinner tool(mb);
-  rval = tool.find_skin( source, 1, skin, use_adj );
+  rval = tool.find_skin( 0, source, 1, skin, use_adj );
   if (MB_SUCCESS != rval) {
     std::cerr << "Skinner failure at " __FILE__ ":" << __LINE__ << std::endl;
     return MB_FAILURE;
@@ -6331,7 +6331,7 @@ ErrorCode mb_skin_volume_test_common( bool use_adj )
   
   Range skin;
   Skinner tool(mb);
-  rval = tool.find_skin( source, 2, skin, use_adj );
+  rval = tool.find_skin( 0, source, 2, skin, use_adj );
   if (MB_SUCCESS != rval) {
     std::cerr << "Skinner failure at " __FILE__ ":" << __LINE__ << std::endl;
     return MB_FAILURE;
@@ -6361,10 +6361,10 @@ ErrorCode mb_skin_scd_test()
   Skinner tool(mb);
   Range ents(this_box->start_element(), this_box->start_element()+this_box->num_elements()-1),
       scd_skin_ents, skin_ents;
-  rval = tool.find_skin(ents, false, scd_skin_ents, NULL, true, true, true);
+  rval = tool.find_skin(0, ents, false, scd_skin_ents, NULL, true, true, true);
   if (MB_SUCCESS != rval) return rval;
 
-  rval = tool.find_skin(ents, false, skin_ents, NULL, true, true, false);
+  rval = tool.find_skin(0, ents, false, skin_ents, NULL, true, true, false);
   if (MB_SUCCESS != rval) return rval;
 
     // should be same number of entities
@@ -6374,10 +6374,10 @@ ErrorCode mb_skin_scd_test()
   scd_skin_ents.clear();
   
     // now test getting faces and vertices, also with existing faces now
-  rval = tool.find_skin(ents, true, scd_skin_ents, NULL, true, true, true);
+  rval = tool.find_skin(0, ents, true, scd_skin_ents, NULL, true, true, true);
   if (MB_SUCCESS != rval) return rval;
 
-  rval = tool.find_skin(ents, true, skin_ents, NULL, true, true, false);
+  rval = tool.find_skin(0, ents, true, skin_ents, NULL, true, true, false);
   if (MB_SUCCESS != rval) return rval;
 
     // again, should have same numbers
@@ -6532,7 +6532,7 @@ ErrorCode mb_skin_verts_common( unsigned dim, bool skin_elems )
   
     // Get skin vertices using skinner
   Range actual;
-  rval = tool.find_skin( ents, !skin_elems, actual );
+  rval = tool.find_skin( 0, ents, !skin_elems, actual );
   if (MB_SUCCESS != rval)
     return rval;
  
@@ -6761,7 +6761,7 @@ ErrorCode mb_skin_poly_test()
   
   Skinner tool(&mb);
   Range skin;
-  rval = tool.find_skin( regions, true, skin, 0, true, false );
+  rval = tool.find_skin( 0, regions, true, skin, 0, true, false );
   if (MB_SUCCESS != rval) {
     std::cout << "Vertex skinning failed with: " << mb.get_error_string(rval) << std::endl;
     return rval;
@@ -6784,7 +6784,7 @@ ErrorCode mb_skin_poly_test()
   }
   
   skin.clear();
-  rval = tool.find_skin( regions, false, skin, 0, true, false );
+  rval = tool.find_skin( 0, regions, false, skin, 0, true, false );
   if (MB_SUCCESS != rval) {
     std::cout << "Non-create face skinning failed with: " << mb.get_error_string(rval) << std::endl;
     return rval;
@@ -6800,7 +6800,7 @@ ErrorCode mb_skin_poly_test()
   }
   
   skin.clear();
-  rval = tool.find_skin( regions, false, skin, 0, true, true );
+  rval = tool.find_skin( 0, regions, false, skin, 0, true, true );
   if (MB_SUCCESS != rval) {
     std::cout << "Create face skinning failed with: " << mb.get_error_string(rval) << std::endl;
     return rval;
@@ -6906,7 +6906,7 @@ ErrorCode mb_skin_higher_order_faces_common( bool use_adj )
   Skinner tool(&mb);
   Range skin;
   
-  rval = tool.find_skin( faces, true, skin, 0, use_adj, false );
+  rval = tool.find_skin( 0, faces, true, skin, 0, use_adj, false );
   if (MB_SUCCESS != rval) {
     std::cout << "Vertex skinning failed with: " << mb.get_error_string(rval) << std::endl;
     return rval;
@@ -6919,7 +6919,7 @@ ErrorCode mb_skin_higher_order_faces_common( bool use_adj )
   const int skin_edges[5][3] = {
     {0,1,2}, {2,3,4}, {4,9,12}, {12,11,10}, {10,5,0} };
   skin.clear();
-  rval = tool.find_skin( faces, false, skin, 0, use_adj, true );
+  rval = tool.find_skin( 0, faces, false, skin, 0, use_adj, true );
   if (MB_SUCCESS != rval) {
     std::cout << "Edge skinning failed with: " << mb.get_error_string(rval) << std::endl;
     return rval;
@@ -7034,7 +7034,7 @@ ErrorCode mb_skin_higher_order_regions_common( bool use_adj )
   Skinner tool(&mb);
   Range skin;
 
-  rval = tool.find_skin( hexes, true, skin, 0, use_adj, false );
+  rval = tool.find_skin( 0, hexes, true, skin, 0, use_adj, false );
   if (MB_SUCCESS != rval) {
     std::cout << "Vertex skinning failed with: " << mb.get_error_string(rval) 
               << std::endl;
@@ -7057,7 +7057,7 @@ ErrorCode mb_skin_higher_order_regions_common( bool use_adj )
   }
   
   skin.clear();
-  rval = tool.find_skin( hexes, false, skin, 0, use_adj, true );
+  rval = tool.find_skin( 0, hexes, false, skin, 0, use_adj, true );
   if (MB_SUCCESS != rval) {
     std::cout << "Element skinning failed with: " << mb.get_error_string(rval) << std::endl;
     return rval;
@@ -7202,7 +7202,7 @@ ErrorCode mb_skin_reversed_common( int dim, bool use_adj )
   
   Range forward, reverse;
   Skinner tool(&mb);
-  rval = tool.find_skin( elems, false, forward, &reverse, use_adj, true );
+  rval = tool.find_skin( 0, elems, false, forward, &reverse, use_adj, true );
   if (MB_SUCCESS != rval) {
     std::cout << "Skinner failed." << std::endl;
     return rval;
@@ -7284,7 +7284,7 @@ ErrorCode mb_skin_subset_common( int dimension, bool use_adj )
   
   Range skin;
   Skinner tool(&mb);
-  rval = tool.find_skin( input, true, skin, 0, use_adj, false );
+  rval = tool.find_skin( 0, input, true, skin, 0, use_adj, false );
   if (MB_SUCCESS != rval) {
     std::cout << "Skinner failed to find skin vertices" << std::endl;
     return MB_FAILURE;
@@ -7303,7 +7303,7 @@ ErrorCode mb_skin_subset_common( int dimension, bool use_adj )
   std::vector<EntityHandle> sv( skin.begin(), skin.end() );
   std::vector<int> counts( sv.size(), 0 );
   skin.clear();
-  rval = tool.find_skin( input, false, skin, 0, use_adj, true );
+  rval = tool.find_skin( 0, input, false, skin, 0, use_adj, true );
   if (MB_SUCCESS != rval) {
     std::cout << "Skinner failed to find skin elements" << std::endl;
     return MB_FAILURE;
@@ -7418,7 +7418,7 @@ ErrorCode mb_skin_full_common( int dimension, bool use_adj )
   
   Range skin;
   Skinner tool(&mb);
-  rval = tool.find_skin( input, false, skin, 0, use_adj, true );
+  rval = tool.find_skin( 0, input, false, skin, 0, use_adj, true );
   if (MB_SUCCESS != rval) {
     std::cout << "Skinner failed to find skin elements" << std::endl;
     return MB_FAILURE;
@@ -7552,7 +7552,7 @@ ErrorCode mb_skin_adjacent_surf_patches()
     Range edges[4];
     for (int grp = 0; grp < 4; ++grp) {
         // get the skin edges
-      rval = tool.find_skin( ranges[grp], 1, edges[grp], use_adj );
+      rval = tool.find_skin( 0, ranges[grp], 1, edges[grp], use_adj );
       if (MB_SUCCESS != rval) {
         std::cout << "Skinner failed for run " << run << " group " << grp << std::endl;
         return rval;

diff --git a/test/parallel/parallel_hdf5_test.cc b/test/parallel/parallel_hdf5_test.cc
index 680d4bd..2b2a1c8 100644
--- a/test/parallel/parallel_hdf5_test.cc
+++ b/test/parallel/parallel_hdf5_test.cc
@@ -335,9 +335,9 @@ void print_partitioned_entities( Interface& moab, bool list_non_shared = false )
           else {
             buffer << rank << ":\t" << topo_names_s[t] << " " << id << ":\t"
                    << "processors ";
-            for (int j = 0; j < MAX_SHARING_PROCS; ++j)
-              if (ent_procs[j] != -1)
-                buffer << ent_procs[j] << ", ";
+            for (int k = 0; k < MAX_SHARING_PROCS; ++k)
+              if (ent_procs[k] != -1)
+                buffer << ent_procs[k] << ", ";
             if (num_owned)
               buffer << " (owned by this processor)";
             buffer << std::endl;
@@ -856,7 +856,7 @@ void create_input_file( const char* file_name,
   if (create_bcsets) {
       // neumann set
     Range skin_ents;
-    rval = Skinner(&mb).find_skin(&elems[0], elems.size(), false, skin_ents);
+    rval = Skinner(&mb).find_skin(0, &elems[0], elems.size(), false, skin_ents);
     CHECK_ERR(rval);
     EntityHandle bcset;
     rval = mb.create_meshset( MESHSET_SET, bcset);

diff --git a/test/parallel/parmerge.cpp b/test/parallel/parmerge.cpp
index aef7987..f29445d 100644
--- a/test/parallel/parmerge.cpp
+++ b/test/parallel/parmerge.cpp
@@ -169,7 +169,7 @@ void print_output(moab::ParallelComm *pc, moab::Core *mb,
     skin.clear();
     ents.clear();
     mb->get_entities_by_dimension(0,3,ents);
-    skinner.find_skin(ents, 2, skin);
+    skinner.find_skin(0, ents, 2, skin);
     for(moab::Range::iterator s_rit = skin.begin(); 
         s_rit != skin.end(); s_rit++){
       pc->get_owner(*s_rit, tmp);

diff --git a/test/parallel/pcomm_serial.cpp b/test/parallel/pcomm_serial.cpp
index dd6752e..5e63851 100644
--- a/test/parallel/pcomm_serial.cpp
+++ b/test/parallel/pcomm_serial.cpp
@@ -81,7 +81,7 @@ int main( int argc, char* argv[] )
     CHECK_ERR(rval);
   }
   
-  rval = ParallelComm::resolve_shared_ents(&pc[0], nprocs, 3);
+  rval = ParallelComm::resolve_shared_ents(&pc[0], nprocs, 0, 3);
   CHECK_ERR(rval);
 
     // exchange interface cells

diff --git a/test/parallel/pcomm_unit.cpp b/test/parallel/pcomm_unit.cpp
index 5e1c5d3..f0eb372 100644
--- a/test/parallel/pcomm_unit.cpp
+++ b/test/parallel/pcomm_unit.cpp
@@ -326,7 +326,7 @@ ErrorCode create_shared_grid_2d(ParallelComm **pc, Range *verts, Range *quads)
     create_patch(pc[i]->get_moab(), verts[i], quads[i], 3, xyztmp, &gids[9*i]);
   }
 
-  ErrorCode rval = ParallelComm::resolve_shared_ents(pc, 4, 2);
+  ErrorCode rval = ParallelComm::resolve_shared_ents(pc, 4, 0, 2);
   CHECK_ERR(rval);
 
   return rval;
@@ -362,8 +362,8 @@ ErrorCode create_shared_grid_3d(ParallelComm **pc, Range *verts, Range *hexes)
                          (j-ijkmin[p][1])*nijk[p][0] + (i - ijkmin[p][0]))
 
   int p, i, j, k;
-  for (int p = 0; p < P; p++) {
-    for (int i = 0; i < 3; i++) {
+  for (p = 0; p < P; p++) {
+    for (i = 0; i < 3; i++) {
       nijk[p][i] =  ijkmax[p][i] - ijkmin[p][i] + 1;
       NIJK[i] = std::max(NIJK[i], nijk[p][i]);
     }
@@ -434,7 +434,7 @@ ErrorCode create_shared_grid_3d(ParallelComm **pc, Range *verts, Range *hexes)
     rval = pc[p]->get_moab()->write_file(fname.str().c_str());
     if (MB_SUCCESS != rval) return rval;
   }
-  rval = ParallelComm::resolve_shared_ents(pc, 4, 3);
+  rval = ParallelComm::resolve_shared_ents(pc, 4, 0, 3);
   CHECK_ERR(rval);
   return rval;
 }
@@ -1216,10 +1216,10 @@ void test_pack_set_parent_child()
     // look for a set with two child links (set3)
   set1 = set2 = set3 = 0;
   for (Range::iterator i = sets.begin(); i != sets.end(); ++i) {
-    int count;
-    rval = moab.num_child_meshsets( *i, &count );
+    int mcount;
+    rval = moab.num_child_meshsets( *i, &mcount );
     CHECK_ERR(rval);
-    if (count == 2) {
+    if (mcount == 2) {
       set3 = *i;
       break;
     }
@@ -1662,12 +1662,12 @@ void test_pack_variable_length_tag()
     rval = mb.get_coords( &*i, 1, coords );
     CHECK_ERR(rval);
     
-    int size;
+    int tsize;
     const void* valptr;
-    rval = mb.tag_get_by_ptr( tag, &*i, 1, &valptr, &size );
+    rval = mb.tag_get_by_ptr( tag, &*i, 1, &valptr, &tsize );
     CHECK_ERR(rval);
-    CHECK( size > 1 );
-    CHECK( size <= 4 );
+    CHECK( tsize > 1 );
+    CHECK( tsize <= 4 );
     
     const int* valarr = reinterpret_cast<const int*>(valptr);
     CHECK( valarr[0] >= 1 );
@@ -1889,14 +1889,14 @@ void test_filter_pstatus()
   rval = mb.get_entities_by_type( 0, MBVERTEX, dum_vertsr );
   CHECK_ERR(rval);
   vertsr.insert(dum_vertsr[0], dum_vertsr[8]);
-  for (unsigned int i = 0; i < 9; i++) verts.push_back(vertsr[i]);
+  for (int k = 0; k < 9; k++) verts.push_back(vertsr[k]);
 
   CHECK( !verts.empty() );
  
   ParallelComm *pcomm = new ParallelComm( &moab, MPI_COMM_WORLD );
 
   std::vector<int> procs(70, -1);
-  for (unsigned int i = 0; i < 6; i++) procs[i] = i;
+  for (int k = 0; k < 6; k++) procs[k] = k;
 
   std::vector<unsigned char> pvals(verts.size(), 0);
     // interface, owned

diff --git a/test/perf/perftool.cpp b/test/perf/perftool.cpp
index 26bf73d..c02273a 100644
--- a/test/perf/perftool.cpp
+++ b/test/perf/perftool.cpp
@@ -266,7 +266,7 @@ void skin_common( int interval, int dim, int num, bool use_adj )
   Skinner tool(gMB);
   
   t = clock();
-  rval = tool.find_skin( elems, true, verts, 0, use_adj, false );
+  rval = tool.find_skin( 0, elems, true, verts, 0, use_adj, false );
   t = clock() - t;
   if (MB_SUCCESS != rval) {
     std::cerr << "Search for skin vertices failed" << std::endl;
@@ -288,7 +288,7 @@ void skin_common( int interval, int dim, int num, bool use_adj )
     blockelems.merge( it, end );
     it = end;
     tt = clock();
-    rval = tool.find_skin( blockelems, true, verts, 0, use_adj, false );
+    rval = tool.find_skin( 0, blockelems, true, verts, 0, use_adj, false );
     t += clock() - tt;
     if (MB_SUCCESS != rval) {
       std::cerr << "Search for skin vertices failed" << std::endl;
@@ -312,7 +312,7 @@ void skin_common( int interval, int dim, int num, bool use_adj )
   
     skin.clear();
     t = clock();
-    rval = tool.find_skin( elems, false, skin, 0, use_adj, true );
+    rval = tool.find_skin( 0, elems, false, skin, 0, use_adj, true );
     t = clock() - t;
     if (MB_SUCCESS != rval) {
       std::cerr << "Search for skin vertices failed" << std::endl;
@@ -330,7 +330,7 @@ void skin_common( int interval, int dim, int num, bool use_adj )
       blockelems.merge( it, end );
       it = end;
       tt = clock();
-      rval = tool.find_skin( blockelems, false, skin, 0, use_adj, true );
+      rval = tool.find_skin( 0, blockelems, false, skin, 0, use_adj, true );
       t += clock() - tt;
       if (MB_SUCCESS != rval) {
         std::cerr << "Search for skin elements failed" << std::endl;

diff --git a/tools/depth.cpp b/tools/depth.cpp
index 1a63c52..080d1b7 100644
--- a/tools/depth.cpp
+++ b/tools/depth.cpp
@@ -126,7 +126,7 @@ void tag_depth( Interface& mb, Tag tag )
     if (--dim == 0)
       return; // no elements
   }
-  rval = tool.find_skin( elems, 0, verts ); check(rval);
+  rval = tool.find_skin( 0, elems, 0, verts ); check(rval);
   rval = get_adjacent_elems( mb, verts, elems ); check(rval);
   
   std::vector<int> data;

diff --git a/tools/skin.cpp b/tools/skin.cpp
index 9c126a0..66f0739 100644
--- a/tools/skin.cpp
+++ b/tools/skin.cpp
@@ -264,9 +264,9 @@ int main( int argc, char* argv[] )
   Range forward_lower, reverse_lower;
   Skinner tool( iface );
   if (use_scd) 
-    result = tool.find_skin( skin_ents, false, forward_lower, NULL, false, true, true);
+    result = tool.find_skin( 0, skin_ents, false, forward_lower, NULL, false, true, true);
   else
-    result = tool.find_skin( skin_ents, false, forward_lower, &reverse_lower );
+    result = tool.find_skin( 0, skin_ents, false, forward_lower, &reverse_lower );
   Range boundary;
   boundary.merge( forward_lower );
   boundary.merge( reverse_lower );

Repository URL: https://bitbucket.org/fathomteam/moab/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.


More information about the moab-dev mailing list