Created
October 11, 2014 12:22
-
-
Save wence-/9d6b7aca9be8598a8550 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/dm/impls/plex/plexrefine.c b/src/dm/impls/plex/plexrefine.c | |
| index c6acb18..5667f07 100644 | |
| --- a/src/dm/impls/plex/plexrefine.c | |
| +++ b/src/dm/impls/plex/plexrefine.c | |
| @@ -6139,6 +6139,12 @@ static PetscErrorCode CellRefinerCreateLabels(CellRefiner | |
| ierr = DMLabelGetStratumIS(label, values[val], &pointIS);CHKERRQ(ierr); | |
| ierr = ISGetLocalSize(pointIS, &numPoints);CHKERRQ(ierr); | |
| ierr = ISGetIndices(pointIS, &points);CHKERRQ(ierr); | |
| + /* Ensure refined label is created with same number of strata as | |
| + * original (even if no entries here). */ | |
| + if (!numPoints) { | |
| + ierr = DMLabelSetValue(labelNew, 0, values[val]);CHKERRQ(ierr); | |
| + ierr = DMLabelClearValue(labelNew, 0, values[val]);CHKERRQ(ierr); | |
| + } | |
| for (n = 0; n < numPoints; ++n) { | |
| const PetscInt p = points[n]; | |
| switch (refiner) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment