On Fri, Dec 1, 2017 at 11:10 AM, Vaclav Hapla <vaclav.ha...@erdw.ethz.ch> wrote:
> Hello > > I noticed DMPlexCreateFromFile ignores the interpolate flag for HDF5. It's > the only format for which PetscViewer API is used for loading, and this API > has no means to specify interpolation. I guess there should be at least > > if (interpolate) { > DM idm = NULL; > > ierr = DMPlexInterpolate(*dm, &idm);CHKERRQ(ierr); > ierr = DMPlexCopyCoordinates(*dm, idm);CHKERRQ(ierr); > ierr = DMCopyLabels(*dm, idm);CHKERRQ(ierr); > ierr = DMDestroy(dm);CHKERRQ(ierr); > *dm = idm; > } > > in DMPlexCreateFromFile after the DMLoad call. > Yes. > This brings me to more general thing to discuss. The behavior of different > mesh constructors for interpolate=PETSC_TRUE is not unified. The most > elaborate behavior is in DMPlexCreateDoublet which after DMPlexInterpolate > also copies the DM name, coordinates and labels. So I suggest all this > stuff is done in DMPlexInterpolate. > Yes. > BTW I think it's kind of weird the output DM passed to DMPlexInterpolate > must me nullified - cf. MatReuse. Yes. My original motivation turned out to be not important. I will get rid of it. I will make all changes in a branch and push to next. Thanks, Matt > > Vaclav -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/>