[petsc-users] DMLocalToLocal() and DMCoarsen() for DMPlex with Fortran

Matthew Knepley knepley at gmail.com
Fri Dec 16 10:18:16 CST 2022


On Thu, Dec 15, 2022 at 10:10 PM Mike Michell <mi.mike1021 at gmail.com> wrote:

> Hello PETSc developer team,
>
> I am a user of DMPlex in PETSc with Fortran. I have two questions:
>
> - Is DMLocalToLocal() now available for DMPlex with Fortran? I made
> similar inquiry before:
> https://www.mail-archive.com/petsc-users@mcs.anl.gov/msg44500.html
>

There is a DMDA example (
https://gitlab.com/petsc/petsc/-/blob/main/src/dm/tutorials/ex13f90.F90) so
the Fortran binding works. However, there is no Plex implementation. I can
add it to the TODO list.


> - Is there any example that can see how DMCoarsen() works? I can see
> either src/dm/impls/stag/tutorials/ex4.c  or  src/ksp/ksp/tutorials/ex65.c
> from the example folder. However, it is a bit tough to get an idea of how
> DMCoarsen() works. What can be the "coarsening" criteria? Is it uniformly
> coarsening over the domain? or Can it be variable-gradient based? Having
> more examples would be very helpful.
>

DMCoarsen really only applies to more structured grids. There is a
definition for unstructured grids, and we have written a paper
about it (https://arxiv.org/abs/1104.0261), but that code could not be
maintained and was difficult to generalize. Right now, if you want
unstructured coarsening, I would recommend trying DMPlexAdaptMetric() which
works with MMG, or DMPlexAdaptLabel() which works
with p4est.

  Thanks,

     Matt


> Thanks,
> Mike
>


-- 
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.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20221216/9b5c46f2/attachment-0001.html>


More information about the petsc-users mailing list