[petsc-users] DMCreateRestriction with DMDA

Matthew Knepley knepley at gmail.com
Fri May 15 10:55:58 CDT 2020


On Fri, May 15, 2020 at 11:17 AM zakaryah . <zakaryah at gmail.com> wrote:

> Hi everyone,
>
> I am wondering about how to use PETSc to create a restriction on a
> structured mesh. The documentation for DMCreateRestriction says:
>
> For DMDA objects this only works for "uniform refinement", that is the
>> refined mesh was obtained DMRefine() or the coarse mesh was obtained by
>> DMCoarsen().
>>
>
> If the fine DMDA is dmf, shouldn't I be able to do the following?
>
> DMCoarsen(dmf,comm,&dmc);
>> DMCreateRestriction(dmc,dmf,&restriction);
>>
>
> When I try this, I get the error
>
>> [0]PETSC ERROR: --------------------- Error Message
>> --------------------------------------------------------------
>> [0]PETSC ERROR: No support for this operation for this object type
>> [0]PETSC ERROR: DM type da does not implement DMCreateRestriction
>>
>
> It seems to me it shouldn't be too hard to get the restriction for a
> uniform coarsening, so I'm sure I'm missing something. Thanks in advance
> for your help!
>

I believe we have only implemented DMCreateInterpolation().

  Thanks,

    Matt


> Cheers, Zak
>


-- 
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/20200515/617e5a83/attachment.html>


More information about the petsc-users mailing list