Matt Knepley avatar Matt Knepley committed a4fdf88 Merge

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

DMPlex: label distribution and vertex viewing

Comments (0)

Files changed (2)

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) */

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");
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.