[petsc-dev] DMPlexCreate* and DMPlexInterpolate
Matthew Knepley
knepley at gmail.com
Tue Dec 5 05:29:56 CST 2017
On Mon, Dec 4, 2017 at 1:06 PM, Matthew Knepley <knepley at gmail.com> wrote:
> On Fri, Dec 1, 2017 at 11:10 AM, Vaclav Hapla <vaclav.hapla at 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.
>
It is here.
https://bitbucket.org/petsc/petsc/branch/knepley/fix-plex-interpolation-consistency
Matt
> 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/>
>
--
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/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20171205/378e0f6a/attachment.html>
More information about the petsc-dev
mailing list