> 5. 12. 2017 v 12:29, Matthew Knepley <[email protected]>:
> 
> On Mon, Dec 4, 2017 at 1:06 PM, Matthew Knepley <[email protected] 
> <mailto:[email protected]>> wrote:
> On Fri, Dec 1, 2017 at 11:10 AM, Vaclav Hapla <[email protected] 
> <mailto:[email protected]>> 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
>  
> <https://bitbucket.org/petsc/petsc/branch/knepley/fix-plex-interpolation-consistency>
> 
>    Matt

It looks good, thanks!

Vaclav

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

Reply via email to