1. petsc
  2. PETSc
  3. petsc

Commits

Matt Knepley  committed f701924

DMPlex: Fix bug with intersecting submeshes
- The label for clamped vertices for a given submesh can get extraneous points from an adjacent submesh
- We filter these out before checking for cross-edges

  • Participants
  • Parent commits 9dbdea9
  • Branches master

Comments (0)

Files changed (1)

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

View file
  • Ignore whitespace
 
       ierr = DMLabelGetValue(blabel, point, &bval);CHKERRQ(ierr);
       if (bval >= 0) {
+        ierr = DMLabelGetValue(label, point, &val);CHKERRQ(ierr);
+        if ((val < 0) || (val > dim)) {
+          /* This could be a point added from splitting a vertex on an adjacent fault, otherwise its just wrong */
+          ierr = DMLabelClearValue(blabel, point, bval);CHKERRQ(ierr);
+        }
+      }
+    }
+    for (p = 0; p < numPoints; ++p) {
+      const PetscInt point = points[p];
+      PetscInt       val, bval;
+
+      ierr = DMLabelGetValue(blabel, point, &bval);CHKERRQ(ierr);
+      if (bval >= 0) {
         const PetscInt *cone,    *support;
         PetscInt        coneSize, supportSize, s, valA, valB, valE;