Commits

Matt Knepley committed a4fdf88 Merge

Merged in jed/fix-plex (pull request #9)

DMPlex: label distribution and vertex viewing

  • Participants
  • Parent commits 3964eb8, 2256686

Comments (0)

Files changed (2)

File src/dm/impls/plex/plex.c

       if (!rank) {ierr = PetscMemcpy(name, next->name, nameSize+1);CHKERRQ(ierr);}
       ierr = MPI_Bcast(name, nameSize+1, MPI_CHAR, 0, comm);CHKERRQ(ierr);
       ierr = PetscStrcmp(name, "depth", &isdepth);CHKERRQ(ierr);
-      if (isdepth) {ierr = PetscFree(name);CHKERRQ(ierr); continue;}
+      if (isdepth) {            /* skip because "depth" is not distributed */
+        ierr = PetscFree(name);CHKERRQ(ierr);
+        if (!rank) next = next->next;
+        continue;
+      }
       ierr           = PetscNew(struct _n_DMLabel, &newLabel);CHKERRQ(ierr);
       newLabel->name = name;
       /* Bcast numStrata (could filter for no points in stratum) */

File src/dm/impls/plex/plexvtu.c

           PetscInt cnt;
           for (v=vStart,cnt=0; v<vEnd; v++) {
             const PetscScalar *xpoint;
-            ierr     = DMPlexPointLocalRead(dm,c,x,&xpoint);CHKERRQ(ierr);
+            ierr     = DMPlexPointLocalRead(dm,v,x,&xpoint);CHKERRQ(ierr);
             y[cnt++] = xpoint[i];
           }
           if (cnt != piece.nvertices) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_PLIB,"Count does not match");