[MOAB-dev] Puzzling find_skin behaviour

Roman Putanowicz putanowr at l5.pk.edu.pl
Thu Feb 4 08:47:12 CST 2010


Hi,

I have encountered puzzling behaviour of find_skin of MBSkinner.

I have mesh in gmsh format partitioned into four partitions.
I read the mesh and then I want to draw boundary of each partition.
I reduce the line width for each partition in order to see edges
even if the overlap. The code to perform the above alrorithm is
shown below.

#----------------------------------------------------------
  MBRange elems;
  MBRange boundary;
  MBRange interface;

  MBSkinner skinner(&mesh);

  int npt;
  ierr = mesh.get_number_entities_by_type(0,MBENTITYSET, npt);

  lw = 32; /* line width in pixels */
  for (int s=3; s<=npt; s++) {  
   
   elems.clear();
    interface.clear();

    /* Get elements in partition s */
    MBEntityHandle partition;
    mesh.handle_from_id(MBENTITYSET, s, partition);
    mesh.get_entities_by_dimension(partition, 2, elems);

    /* find skin of partition s */
    skinner.find_skin(elems, 1, interface);

    /* show the skin */
    viewer.set_edge_ink(colors[s]);
    lw = lw-8;
    viewer.set_line_width(lw);
    viewer.entities(&mesh, interface);
  }

The output I got is in the attachment. You can see that only
the first of considered partitions has the closed boundary.
The skin of each subsequent partition is missing the edges that
are common with the boundary edges of the already considered
partitions.

Is this expected behaviour of MBSkinner ?
How to ensure that partitions are considered separately (just 
removing skin edges already found ?).

Again I will greatly appreciate your advice,

Regards

Roman




More information about the moab-dev mailing list